Questions tagged [proc]
procfs (or the proc filesystem) is a special filesystem in UNIX-like operating systems that presents information about processes and other system information in a hierarchical file-like structure
578 questions
1 vote
1 answer
74 views
file-nr keeps increasing forever
I have a cloud VM running linux-yocto 6.17 and a few daemon processes--postfix, dovecot, rspamd, nginx, sshd, fail2ban and redis. Ever since upgrading from 6.11 to 6.17, I've noticed that /proc/sys/fs/...
1 vote
1 answer
76 views
Why is there a discrepancy between the stack address in /proc/PID/maps vs. /proc/PID/stat?
Why does there appear to be a discrepancy between a process stack address within /proc/PID/maps compared to the stack start address within /proc/PID/stat, where the latter is a smaller subset of the ...
1 vote
1 answer
66 views
Discrepancies for entries for the same map in different /proc/*/smaps files
The snippet below: shows statistics for what appears to be the exact same memory mapping: same device number, same inode, same offset, same length (0x7f8656e78000-0x7f8656cbb000 = 0x7f2f4ef6a000-...
5 votes
1 answer
355 views
How to interpret the refcnt field in /proc/crypto?
Here's an example /proc/crypto entry: name : md5 driver : md5-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash ...
2 votes
1 answer
96 views
OpenBSD process maps
I am using OpenBSD 7.7. So I know that procfs is not mounted on /proc, and I need to use sysctl to fetch process maps. But this fails as I am not running as a root user. The secure level is set to 1 ...
4 votes
0 answers
146 views
Recovering text of Unsaved document from process memory? (frozen Xed window - process still "running" but in Sleeping status)
The window of my text editor Xed froze with Unsaved documents just as I was doing 'File'->'Save as...' to save them... [How ironic.] Since the process still exists, I am trying to recover the text ...
7 votes
2 answers
425 views
How can I find location of PRI in /proc
I have sshd with PID of 1957: mohsen@debian:~$ ps ax -o pid,nice,pri,cmd |grep 1957 1957 -2 21 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups According to above, my nice number is -2 ...
1 vote
0 answers
33 views
reading stdout from /proc [duplicate]
I'm running the following C program // hello.c #include <stdio.h> #include <unistd.h> int main() { while (1) { printf("Hello\n"); fflush(stdout); sleep(1); } ...
0 votes
0 answers
66 views
Finding actual memory usage of process
I have seen similar questions 1, 2, and understand the difference between RSS/VSZ. I've some uses of mmap'ing distinct virtual memory regions to the same underlying physical memory. In this case, /...
0 votes
2 answers
153 views
Why are some symlinks unreadable when their target is readable?
On Linux, I'm looking at /proc/1/cwd. This symlink is not readable as a normal user: $ ls /proc/1/cwd ls: cannot access '/proc/1/cwd': Permission denied But /proc/1 is accessible: $ ls /proc/1 <...
1 vote
1 answer
158 views
In /proc/$PID/smaps in the VmFlags what is the difference between "readable" and "may read"?
The man page describes the meaning of the VmFlags: The "VmFlags" line (available since Linux 3.8) represents the kernel flags associated with the virtual memory ...
0 votes
1 answer
176 views
Why is dd unable to read /proc/pid/mem?
Why is GNU Coreutil's dd unable to read /proc/pid/mem? PHP is able to read it, check this: $ dd if=/proc/357668/mem bs=100 skip=93824992231424 count=1 iflag=fullblock dd: /proc/357668/mem: cannot skip ...
0 votes
1 answer
116 views
Is there a linux kernel interface (/proc) that counts kernel error log messages?
The comand dmesg --level=emerg,alert,crit,err lists all error messages with a high severity. I wondered for monitoring purposes whether the count of messages is somehow exposed in the /proc filesystem....
0 votes
1 answer
82 views
Are reads of /proc/pid/environ atomic in Linux 6.x (e.g: 6.1.99)?
When a process execs, looking at kernel code for environ_read(), it seems that if the mm_struct doesn't yet exist / is null or the env_end member of that mm_struct is null, environ_read() will return ...
1 vote
1 answer
154 views
Unexpected behavior of 'some' PSI CPU metric
I am trying to understand the meaning of the "some" row of the Linux PSI metric for CPU. The Linux documentation (https://github.com/torvalds/linux/blob/master/Documentation/accounting/psi....