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

learn more… | top users | synonyms

0
votes
0answers
11 views

How can I get read/write instant speed of a Hard Drive using /proc/diskstats data?

I know that the proc/diskstats file presents these data columns: 1 - major number 2 - minor mumber 3 - device name 4 - reads completed successfully 5 - reads merged 6 - sectors read 7 - time spent ...
0
votes
1answer
20 views

How does the proc/diskstats work to present that values? And for proc/stat and meminfo?

I am trying to get the diskstats data by same way that the file does. Is there any way to reach that values without reading that file? How the values are placed there? Is there any ".c" file that ...
7
votes
2answers
51 views

How does the /proc/<pid>/exe symlink differ from ordinary symlinks?

If I start a process and then delete the binary of it, I can still recover it from /proc/<pid>/exe: $ cp `which sleep` . $ ./sleep 10m & [1] 13728 $ rm sleep $ readlink /proc/13728/exe ...
0
votes
1answer
42 views

How can I edit /proc/net/tcp?

I need to edit 1 line in /proc/net/tcp while the file is also used by the linux kernel for updating other lines of it by the kernel. Background: Each line in /proc/net/tcp represents a TCP socket. ...
4
votes
2answers
40 views

htop shows only the processes of the user that's running it?

On my old Debian Wheezy I see as a normal user without sudo all processes from all user in htop. On my new Debian Wheezy I only see my own processes. Old system kernel: 3.2.0-4 New system kernel: ...
0
votes
0answers
20 views

Passing argument in tcl proc

I have a tcl proc as follow: proc foo {a {b 300} {check FALSE} {c 100}} { //doing something here } Can I pass the value to c argument while still using default values for b and check arguments ...
0
votes
1answer
16 views

Finding vmstat's swap (si/so) data anywhere in /proc

Is it possible to find (or derive) the amount of data swapped in our out per second from information contained in the /proc filesystem? I'd like to get something like what vmstat provides in its ...
2
votes
1answer
166 views

CPU speed and cat /proc/cpuinfo

I use centos 6.4 64. I have old proc - CPU AMD Phenom II X4 810 (HDX810W) 2.6 GHz. However, when I execute the command cat /proc/cpuinfo I get the following: processor : 0 vendor_id : ...
1
vote
2answers
37 views

List running processes without procfs

I'd like to list running process (like using ps or top), but there is no procfs mounted. The procfs not being mounted is intentional, and is made to prevent malicious user to access systems ...
0
votes
1answer
41 views

How to read files in the proc directory? [closed]

I found that ls command can't read file in `/proc' Please see the attachment. There are many link files ,but you can't read it by ls.
0
votes
1answer
20 views

Which lines do change after a sync in /proc/meminfo ? [duplicate]

I was taught, that the sync command writes the data stored within the cache of the RAM onto hard-disk, this release should be displayed in /proc/meminfo. However when I cat /proc/meminfo before and ...
1
vote
1answer
91 views

lsof: measure I/O rate of a socket fd

I'm writing a script that parses the output of lsof to show a list of what processes have sockets open (similar to what netstat shows). lsof also gives me a file descriptor. What I want to do now is ...
3
votes
0answers
81 views

What is the meaning of the contents of /proc/net/unix?

On my Android device there is the file called /proc/net/unix who's content does not conform to that of any standard linux distribution (which show the unix domain sockets.) First few lines: Num ...
1
vote
1answer
36 views

How to see kernel time variables without using adjtimex?

The man page for adjtimex says Anyone may print out the time variables, but only the superuser may change them. How do I see the value shown by adjtimex -p as the tick variable without using ...
5
votes
2answers
228 views

ls -l /proc/self | increamental PID?

Each time, when the commandls -l /proc/self is executed, the link points to process who's PID keeps increasing. Why is this so ? Is it the PID of the ls command ?
1
vote
0answers
48 views

/proc/stat - is guest counted into user time?

I have a quick question. In man page for /proc/stat this is not clear to me: Is guest and guest_nice time included in user time in /proc/stat? http://man7.org/linux/man-pages/man5/proc.5.html in ...
1
vote
1answer
74 views

How is /proc/net files getting populated in Linux/Unix?

I'm working on a network monitor for Linux, without packet sniffing. I'm planning to read the network statistics and related data from /proc/net files. I know that /proc is the mount point of process ...
1
vote
0answers
86 views

Monitor the creation of new processes

I want to get a notification whenever a new process is created. I've tried to use inotify on /proc, but it didn't report any event even though a new directory appeared in /proc. I could list the ...
-1
votes
1answer
29 views

what directory is used to execute “expr” command,what holds it process-id and log record [closed]

What directory execute the expr command. What directory holds the the PID of the command. What directory hold the log file of this command.and how to read all these??
2
votes
1answer
167 views

how to read any process' /proc/pid/io

I'm trying to monitor disk activity of each process. One way that I found how to do this is to read /proc/pid/io file and compare fields with previous read. That works fine except my monitoring ...
0
votes
0answers
16 views

What are the /proc/drivers directories organisation for nouveau or radeon

The context: I need to get some basic informations from the graphic card in a lib in lua. The idea is to not rely on external software (like hwinfo for example). I know that for a system with an ...
0
votes
0answers
202 views

Mount proc filesystem in a docker container

i want to install gitlab vcs in a docker container with ubuntu base image on it. But when i run gitlab-ctl recofigure, it can't write to a file on proc fs. How to mount or run docker to provide rw ...
2
votes
1answer
143 views

Programmatically get CPUs 'detailed' usage, like top/htop

htop has a great way to show CPU usage. It shows the activity (usage in %) of each cores, and each core gauge is divided into three parts : blue: low priority processes green: normal processes red: ...
2
votes
2answers
182 views

How to print total number of file descriptors with index 24

How can I print the total number of file descriptors with index 24 for all the running processes on Linux? I tried $ ls /proc/*/fd 2> errors.txt > stdout.txt | grep "^24" stdout.txt | wc -l ...
1
vote
1answer
136 views

Permission denied on aio-max-nr file

I would like to edit the file aio-max-nr: root@node:~# echo 65536 > /proc/sys/fs/aio-max-nr -su: /proc/sys/fs/aio-max-nr: Permission denied Knowing that : root@node:~# ls -lrth ...
1
vote
0answers
22 views

How does /proc/$PID/fd actually work? [duplicate]

According to the terse documentation I managed to find, each file in /proc/$PID/fd is supposed to be a symlink to the actual file associated with that file descriptor. However, that doesn't appear to ...
0
votes
0answers
167 views

Cannot change CPU affinity on 3.13 kernel for eth0 interrupts

We are running 3.13 kernel (Ubuntu 14.04) on an IBM x3550 servers. I think I may have found a bug changing IRQ affinity for eth0 internet interface, that corresponds to IRQ 43 on this device. ...
8
votes
1answer
404 views

What's the purpose of the /proc/pid/mountinfo file?

What's the purpose of the /proc/pid/mountinfo file (with pid being numerical process id)? As far as I can see it reflects contents of the /proc/mounts file but with added information. Also the file ...
4
votes
0answers
152 views

Strange cpu usage values reported by pidstat

I have a script that reports the cpu usage of a specific program reading values from pidstat. The script launches as: pidstat -C ^frontend$ -h -l -p ALL 1 1 The values reported this way sometimes ...
2
votes
1answer
256 views

Dirty in /proc/meminfo for dd

I read from here that the below command gives me the amount of data that needs to be written to the disk. grep ^Dirty /proc/meminfo It particularly says Ever ask yourself "How much data would be ...
6
votes
3answers
1k views

Why can't I `tail -f /proc/$pid/fd/1`?

I wrote a simple script which echo-es its PID: #/bin/bash while true; do echo $$; sleep 0.5; done I'm running said script (it says 3844 over and over) in one terminal and trying to tail ...
2
votes
0answers
39 views

Why does each process folder under /proc contain the same information?

Under /proc/<PID>/net pseudo-file system each process seems to have files with the same content. For example I use cat /proc/<PID>/net/ip_tables_names to list iptables tables under the ...
3
votes
1answer
151 views

Pernicious USB-stick stall problem. Reverting workaround fix?

There's an issue with Ubuntu that hasn't been fixed yet, where the PC freezes or gets really slow whenever it is copying to an USB stick (see Why is my PC freezing while I'm copying a file to a ...
1
vote
2answers
275 views

With “find /”, skip directories like “/proc”, “/sys” and similar [duplicate]

There are some directories that can cause problem with find, and especially find /. These are directories in which the OS creates files which are not really files. Among these directories are /proc ...
2
votes
1answer
107 views

/proc/config.gz is of 0 bytes

I have an Android TV stck I compiled Linux for IT from https://github.com/Galland/rk3x_kernel_3.0.36 But when I booted that Image I found /proc/config.gz is of 0 bytes can some please explain how ...
7
votes
1answer
56 views

How do I know what decompression algorithms are compiled-in into the linux kernel?

If /proc/config.gz is unavailable, how do I know what decompression algorithms the running kernel is capable of using on a compressed cpio initramfs? Is the gzip algorithm always available, even when ...
3
votes
1answer
104 views

How do I find out what filesystem drivers are compiled-in into the linux kernel?

On a running linux system, what is a portable (among linux distributions) way to find out what filesystems the current kernel has compiled-in (not through modules) support for? Consider for example ...
0
votes
2answers
390 views

Using /proc/stat for the number of processes running on the system

How does one find out the true number of processes that is running on your system. A number of articles mention using ps in order to count the number of processes. But recently I looked at cat ...
3
votes
1answer
181 views

How to programmatically retrieve the GID of a running process

I need to write some C code to check the effective GID of a running process whose PID I know. I've not found any direct way to do this. There are a number of heavyweight kludges I could use, such as ...
0
votes
2answers
411 views

Is Inactive memory related to the Commited but unused?

From the Linux procfs documentation: Active: Memory that has been used more recently and usually not reclaimed unless absolutely necessary. Inactive: Memory which has been ...
5
votes
1answer
127 views

What causes /proc/<pid>/* resources to become owned by root, despite the procs being launched as a normal user?

I've noticed that some procs, such as bash, have their entire /proc/<pid>/ resources readable by the user who created that proc. However other procs, such as chrome or gnome-keyring-daemon, have ...
3
votes
1answer
3k views

Is it possible to get process group ID from /proc?

In "http://stackoverflow.com/questions/13038143/how-to-get-pids-in-one-process-group-in-linux-os" I see all answers mentioning ps and none mentioning /proc. "ps" seems to be not very portable ...
1
vote
2answers
279 views

In Linux, why do you need to be root to write to /proc/sysrq-trigger?

WARNING: THE NEXT KEY COMBINATION WILL CRASH YOUR COMPUTER Ok, I get that this is an administrative tool and all, but I realized that any user can do ALT + SysRq + C. This link explains what I'm ...
3
votes
1answer
164 views

OOM Killer value always one less than set

I am trying to set the oom_adj value for the out of memory killer, and each time I do (regardless of the process) I get back exactly one less than I set (at least for positive integers. I haven't ...
3
votes
2answers
1k views

/proc/pid/maps addresses (and converting them)

When looking at the memory maps in /proc/pid/maps, we can see different length addresses 00400000-0042e000 r-xp 00000000 fb:01 268953 /bin/nano 0062e000-0062f000 r--p ...
17
votes
7answers
819 views

How do I source another process's environment variables?

If I examine /proc/1/environ I can see a null-byte-delimited string of process 1's environment variables. I'd like to bring these variables into my current environment. Is there an easy way to do ...
4
votes
1answer
180 views

Does pipe's link target exist somewhere in the filesystem?

I'm talking about this: $ readlink <(echo test) pipe:[80076194] Is pipe:[80076194] a path to the target or just indication that the file descriptor is connected to the pipe and doesn't exist in ...
1
vote
1answer
2k views

how to determine the max user process value?

Which value is correct?(or they are all correct, but which one will take effect?) $ cat /proc/sys/kernel/pid_max 32768 $ ulimit -a |grep processes max user processes (-u) 77301 $ cat ...
5
votes
2answers
986 views

Portability of file descriptor links

I've always wondered this but never took the time to find out, so I'll do so now - how portable is the usage shown here of either /proc/$$/fd/$N or /dev/fd/$N? I understand POSIX guarantees /dev/null, ...
63
votes
3answers
10k views

What happens when I run the command cat /proc/cpuinfo?

What happens when I write cat /proc/cpuinfo. Is that a named pipe (or something else) to the OS which reads the CPU info on the fly and generate that text each time I call it?