Questions tagged [proc]
The proc filesystem in Unix-like operating systems presents information about processes and other system information. Typically, it is mapped to a mount point named `/proc` at boot time.
52 questions
2
votes
1
answer
289
views
How to find the initial process that forks a fork of a fork of a… And so on
In this answer we see as a generic solution:
$ pstree -s 5698
init───mdm───mdm───init───at-spi-bus-laun───dbus-daemon
But for a more specific problem, if I launch foo from bash which then forks ...
1
vote
0
answers
77
views
gid=adm when setting hidepid=4 does not working while hidepid=2 does
I set my /etc/fstab like this
proc /proc proc defaults,nosuid,nodev,noexec,relatime,hidepid=4,gid=adm 0 0
When I reboot, users with adm doesn't see external processes. ...
1
vote
1
answer
185
views
Is /proc/pid/maps a snapshot?
I've written a little tool to grep inside the adddress space of a proces with a start and end delimiter in ECMAScript regex syntax. I'm parsing /proc/pid/maps twice to determine the largest mapping ...
2
votes
1
answer
105
views
How to refer to proc's own namespace inside an uplevel context in Tcl?
Inside a Tcl proc, I need to refer to variables both in the context of this proc as well as the level above because the file that is getting sourced uses variables there. So I tried writing something ...
0
votes
1
answer
85
views
What file format do key-value Linux procFS files use?
I'm most interested in the files which provide system information, like /proc/mdstat, /proc/crypto, and /proc/cpuinfo. /proc/mdstat demonstrates this most concisely:
#!/usr/bin/env sh
cat '/proc/...
0
votes
1
answer
687
views
list of /proc/fd/ path
I am using Ubuntu 22.04.3 LTS
When I execute ls /proc/$$/fd I got the following result
0 1 2 255
But when I execute ls /proc/$$/fd/* I got the following result
ls: cannot access '/proc/126708/fd/...
1
vote
0
answers
558
views
Processes randomly freezing, get stuck reading /proc/pid/environ
So my computer is behaving weirdly in many ways which might or might not be related to hardware problems. This question is about a reproducible symptom of that, which I'm trying to investigate.
When I ...
1
vote
0
answers
351
views
How to build a Container without /proc?
I would like to run my process in a container without /proc/ filesystem. How can it be achieved?
My intention is, that an attacker can not use a security flaw in a containerized application to read e....
0
votes
1
answer
341
views
Why is /proc/loadavg not factoring in the amount of cores on a linux system?
Why is it on linux systems with multiple processor cores (most systems of today), that the loadavg doesn't compensate for this?
When 1 core on my system is being utilized by 1 process, the loadavg ...
21
votes
2
answers
6k
views
What is the true meaning of the unit `kB` in `/proc/meminfo`?
I am freshly installing a distribution and want to set up a swap partition so that it is compatible with hibernate.
First, I must determine the amount of physical memory the system has.
$ grep ...
1
vote
1
answer
228
views
Does IP tables rules takes precedence over /proc/sys configuration?
If I configure both Case 1 and Case 2 in the same Linux server, which case will take precedence over the other?
Case 1 – echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
Case 2 – ...
0
votes
1
answer
187
views
How to test if a specific process ID is a terminal?
I'm writing a convenience script that will allow me to bring up an existing terminal upon pressing a keyboard shortcut, and spawn a new one if none currently exists.
Ideally, this would be agnostic to ...
0
votes
1
answer
553
views
warning: no inet socket available: No such file or directory
so there i am using chroot to chrooting into debian bootstrap everything worked just right on root account until i added a new user to figure out that i cannot do update or access xdisplay or ...
0
votes
1
answer
1k
views
Get absolute path on host for container PID's executable
Context:
CentOS 7 host
Ubuntu container
Dockerfile:
FROM ubuntu
ENTRYPOINT ["/bin/bash"]
Observation:
Building and running the above container, a new bash process will be launched on the ...
0
votes
1
answer
3k
views
grep: /proc/version : Permission Denied
I wanted to run vscode as non root user so I switched to another user by "su - username" and run "code" but it gave an error "grep : /proc/version : permission denied" ...