Skip to main content

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
65 views

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/...
amateurece's user avatar
1 vote
1 answer
61 views

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 ...
genericuser99's user avatar
1 vote
1 answer
55 views

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-...
Thriller's user avatar
5 votes
1 answer
345 views

Here's an example /proc/crypto entry: name : md5 driver : md5-generic module : kernel priority : 0 refcnt : 1 selftest : passed internal : no type : shash ...
asizo's user avatar
  • 61
2 votes
1 answer
81 views

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 ...
well-mannered-goat's user avatar
4 votes
0 answers
123 views

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 ...
The Quark's user avatar
  • 454
7 votes
2 answers
414 views

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 ...
PersianGulf's user avatar
  • 11.3k
1 vote
0 answers
31 views

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); } ...
MaPo's user avatar
  • 319
0 votes
0 answers
50 views

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, /...
muser's user avatar
  • 101
0 votes
2 answers
138 views

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 <...
codeandfire's user avatar
1 vote
1 answer
150 views

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 ...
Joseph Garvin's user avatar
0 votes
1 answer
170 views

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 ...
hanshenrik's user avatar
0 votes
1 answer
106 views

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....
maxammann's user avatar
  • 103
0 votes
1 answer
64 views

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 ...
Gregg Leventhal's user avatar
1 vote
1 answer
143 views

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....
aaw's user avatar
  • 21
1 vote
1 answer
144 views

I am seeing a very odd behavior. /proc/1154/cmdline exists, and kill -0 1154 succeeds, but ps -ef | grep 1154 and ls /proc | grep 1154 do not show anything. 1154 was a postgres process in the middle ...
Hari Krishna S's user avatar
0 votes
1 answer
152 views

I'm developing an application that I'm shipping as a Docker image. My application consists of a single executable file that links just against libc and libcrypto. I'm thinking about making my image ...
Daniel Walker's user avatar
2 votes
0 answers
146 views

I always assumed that /proc/[PID]/status shows capabilities that PID has in the user namesapce of the process that opens /proc/[PID]/status, not in the user namespace of PID, but it seems that I was ...
user643357's user avatar
0 votes
1 answer
175 views

The man page for the proc file system says that memory usage for /proc/[pid]/statm and others is "measured in pages". I'm not sure what this means when multiple page sizes are used. Let's ...
builtin.ctz's user avatar
1 vote
1 answer
159 views

In Linux, there are user limits for accessing system resources. Shell built-in command ulimit can be used to see user limits for the current user. ulimit -a # soft limits ulimit -a -H # hard ...
Amith's user avatar
  • 323
0 votes
1 answer
65 views

I'm currently trying to build a Linux image with Yocto Kirkstone. The final image will include an application that requires the ephemeral port range for ip4 to be edited a certain way. Is there a way ...
Klickmann's user avatar
  • 103
2 votes
1 answer
499 views

I am encountering a "Permission denied" error when trying to access the symbol link of an nginx worker process which running under the adg user. Similar question: Owner can't read /proc/$...
hartvon's user avatar
  • 23
0 votes
2 answers
96 views

We know that process information can be obtained from the /proc directory, such as being able to see the PID of all processes, etc. And many user commands, such as top, ps, and so on, essentially ...
w zc's user avatar
  • 1
0 votes
1 answer
179 views

Iam trying to get the stack pointer of some thread using the /proc//stat, whenever i run the command,cat /proc/<pid>/stat | cut -d" " -f29 i end up getting zero, but when i run sudo ...
Hodgson Tetteh's user avatar
0 votes
1 answer
181 views

The directories of the form /proc/[pid]/ns get populated each time they are accessed. That is, each time they are accessed the kernel produces a symlink to somewhere in the namespace filesystem (not ...
caciquekampeon's user avatar
0 votes
0 answers
55 views

I'd like a monitoring daemon to be able to access /proc/<PID>/smaps_rollup of another process to be able to report swap usage of that process. I found information that access to that file is &...
AndreKR's user avatar
  • 1,238
0 votes
1 answer
113 views

I'm developing on Android 11 device. I am confused that the process' comm value is from last 15 characters of process name but the thread's comm value is from top 15 characters. Does any man page ...
czjabc's user avatar
  • 3
3 votes
1 answer
428 views

A Linux thread or forked process may change its name and/or its commandline as visible by ps or in the /proc filesystem. When using the python-setproctitle package, the same change occurs on /proc/pid/...
Juergen's user avatar
  • 754
1 vote
1 answer
130 views

In a Red Hat Linux 8 operating system, I examined the output of cat /proc/loadavg and obtained "5.20 5.78 8.04 16/1596 1954863". After 4 minutes, I rechecked the /proc/loadavg output and ...
GSK's user avatar
  • 11
0 votes
1 answer
128 views

From the author of htops answer https://stackoverflow.com/questions/41224738/how-to-calculate-system-memory-usage-from-proc-meminfo-like-htop/41251290#41251290 I got to know that the total memory in ...
ArunJose's user avatar
  • 103
2 votes
1 answer
799 views

My audit plugin process needs to be able to iterate through /proc and read /proc/pid/stat files, but SElinux refuses this. Process context of my plugin: ps auxZ | grep -i myplugin system_u:system_r:...
ibse's user avatar
  • 371
9 votes
2 answers
619 views

ps -o pid,ppid,stat,exe -e | grep deleted generates output like this: 1777 1346 Sl /usr/bin/python3.10 (deleted) 1778 1346 Sl /usr/bin/python3.10 (deleted) 1825 1327 Ss /usr/...
Dave The Dane's user avatar
2 votes
1 answer
599 views

PURPOSE: I am theorising as to how one would go about creating a pointer scanner in a Linux environment. DISCLAIMER: My findings have been tested on Debian Bookworm (current stable) and a Gentoo ...
vykt's user avatar
  • 21
1 vote
1 answer
1k views

There are many ways to obtain the PTS associated with a given process - such as using the tty command or resolving /proc/self/fd/0 (assuming it's open and not redirected) - but what about the inverse? ...
Tenders McChiken's user avatar
4 votes
1 answer
1k views

I've played around a bit with /proc/pid/mem and /proc/pid/maps. I wrote a simple c program that just periodically reads from a variable (whose address is written to stdout), and I was able to change ...
gypaete02's user avatar
1 vote
1 answer
842 views

If you build a custom GNU/Linux system for an embedded device, do you need to execute mount -t proc proc /proc mount -t sysfs sysfs /sys somewhere in init process or is this done automatically by the ...
mrn's user avatar
  • 159
0 votes
1 answer
330 views

I am on Debian 12 and I am trying to write a script to identify processes with certain inodes (from /proc/net/raw and /proc/net/packet). My original grep command is this (to get only the pid itself): ...
user avatar
0 votes
1 answer
117 views

Why linux /proc/meminfo show:" 1 MemTotal: 7038920 kB " (proc most likely is to mean Kibibyte) in a PC of 8 GB memory RAM, although its Kibibyte is 7812500 ?
user avatar
0 votes
0 answers
196 views

I'm trying to run an application that requires access to /proc in order to find the gnome-shell process and its environment variables. My guess is that this application used to work but default ...
Olumide's user avatar
  • 177
8 votes
2 answers
2k views

I'm curious about the file or symlink /etc/mtab. I believe this is a legacy mechanism. On every modern linux I've used this is a symbolic link to /proc/mounts and if mtab were to be a regular file on ...
Philip Couling's user avatar
1 vote
0 answers
125 views

I am developing an application on Android as a non-root user.  However, I need read access to all the /proc/{pid}/fd files so as to check the inode numbers from the symlink under fd. How do I do that ...
Mahavir Surana's user avatar
6 votes
1 answer
730 views

I'm trying to read two specific files, namely status and smaps_rollup for all the processes under /proc. All process directories have dr-xr-xr-x permission and I'm able to enter every one of these ...
Firelord's user avatar
  • 352
3 votes
1 answer
175 views

Yesterday, while writing an answer to How to get full path names of all opened pdf files (in zathura) - like rofi does, I noticed something weird about the ownership of files the /proc/PID/ directory ...
cas's user avatar
  • 84.9k
1 vote
1 answer
441 views

I am trying to set up a foreign chroot environment with QEMU, mostly as described at https://www.hellion.org.uk/blog/posts/foreign-chroots-with-schroot-and-qemu/. The host system is Ubuntu x86_64 (on ...
user149408's user avatar
  • 1,565
2 votes
0 answers
458 views

For some reason the value stored in the /proc/sys/kernel/sysrq file on my system changes to 16. It happens quite frequently, like once-twice an hour but in a random moment of time. As I understand, I ...
GRbit's user avatar
  • 21
1 vote
0 answers
173 views

Why is there more time_wait displayed in /proc/net/sockstat than it actually is? And how to fix it? [root@node09 ~]# netstat -ant | grep TIME_WAIT | wc -l 28 [root@node09 ~]# netstat -ant|awk '/^tcp/ ...
LiangZheng's user avatar
0 votes
1 answer
584 views

I can not get any reliable information about how do kernel logs get from Kernel Ring Buffer to /proc/kmgs and /dev/kmsg. Is there any source I could have possbily missed or does perhaps anyone know ...
GabrijelOkorn's user avatar
6 votes
2 answers
4k views

The ps command with the -T flag outputs the SPID column, which is also called TID(Thread ID). But what does SPID stand for? The ps source code doesn't seem to know why this name is either: trace("...
deevroman's user avatar
0 votes
1 answer
404 views

Is there some command I can use to monitor changes in /proc/interrupt? For example, using head -4 I can see that the file is changing, but only if I run head again and again: > head -4 /proc/...
emacs drives me nuts's user avatar
0 votes
1 answer
238 views

I want to restrict access to files in /proc as much as possible using SELinux. When I try to chcon a directory in /proc, it fails: $ chcon -t staff_proc_t /proc/acpi chcon: failed to change context of ...
jiwopene's user avatar
  • 1,101

1
2 3 4 5
12