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

4
votes
3answers
4k views

“echo 3 > /proc/sys/vm/drop_caches” - Permission denied as root

I am currently having some issues with the cache. It is a little too much right now so I wanted to clear it. I googled and found this little command: sync && echo 3 > ...
2
votes
1answer
41 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 ...
5
votes
3answers
411 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
1answer
754 views

/proc/cpuinfo showing zero cpu clock speed

I saw an interesting issue where the cpuinfo file from /proc filesystem shows the cpu clock speed as zero. It is a physical host with no virtualization. Can someone explain to me some probable reasons ...
2
votes
0answers
30 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
579 views

Accounting for /proc/net/dev reported traffic

I noticed that according to /proc/net/dev I am constantly receiving around 6Kb/s on my wireless usb interface. But I can't account for anything even close to that with the individual connections that ...
7
votes
3answers
2k views

Arch linux : pacman does not work when chrooting

I have Ubuntu installed on my computer. I decided to install Arch linux, but I skipped the part about Grub installation as it is already installed. Seeing that Arch does not show up in Grub's menu ...
2
votes
2answers
90 views

Detecting kernel thread on pre-3.0 kernels

Looking at the proc man page (http://man7.org/linux/man-pages/man5/proc.5.html) it is possible to detect which processes are kernel threads in /proc/<pid>/stat by looking at the flags value ...
2
votes
1answer
32 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
1answer
37 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 ...
0
votes
2answers
34 views

Skipping pseudo-directories with find /

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 ...
11
votes
3answers
591 views

Contents of /proc

Is there a site someplace that lists the contents of /proc and what each entry means?
6
votes
1answer
40 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
41 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
45 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 ...
4
votes
1answer
991 views

Explain EV in /proc/bus/input/devices data

Can anybody explain to me what the EV value in /proc/bus/input/devices is? The keyboard always has value 120013. Why?
3
votes
1answer
96 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 ...
1
vote
1answer
2k views

Modify 'Soft Limit' of 'Max processes'

I tried ulimit -u 2000 and ulimit -Su 2000 to modify the 'Max processes', and started up my program, but failed. I found file '/proc/pid/limit' is still: Max processes 1024 ...
0
votes
1answer
80 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 ...
3
votes
1answer
95 views

What's the correct value to base the maximum number of CPU's to sched_setaffinity to?

I have some confusion as to what's the correct value to use for the number of CPU's I can use to make a CPU_SET for a sched_setaffinity call on my system. My /proc/cpuinfo file: processor : 0 ...
5
votes
2answers
621 views

iotop but for particular disk?

Is there a tool like iotop but for monitoring IO on specific volumes? (Or perhaps I missed a way to filter iotop?) If not is there any way to get at this information via (say)/proc? (dstat etc. ...
4
votes
1answer
67 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 ...
1
vote
1answer
350 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
104 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
57 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 ...
2
votes
2answers
271 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 ...
4
votes
2answers
1k views

Notify of changes on a file under /proc

I have written a small 'daemon' in bash that will switch to the headphones if they are detected, and if not, switch to an external USB speaker with PulseAudio. What I'm looking for is some way to get ...
17
votes
7answers
670 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
93 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
345 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 ...
3
votes
1answer
249 views

Kernel /proc ipv6 settings precedence

I'm about to connect our network to the IPv6 Internet and need to control the kernel ipv6 settings found under /proc. I know there are configurations for each interface, for all interfaces, and the ...
5
votes
2answers
387 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, ...
11
votes
7answers
47k views

Tell fs to free space from deleted files NOW

Is there a way to tell the kernel to give back the free disk space now? Like a write to something in /proc/ ? Using Ubuntu 11.10 with ext4. This is probably an old and very repeated theme. After ...
55
votes
3answers
4k 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?
10
votes
1answer
1k views

sysctl: /proc/sys/net/ipv[46]/conf/: what's the difference between “all”, “default” and “eth*”?

In sysctl, the /proc/sys/net/ipv[46]/conf/ keys have the following subkeys: all, default, and a key for each network interface. For example, on a machine with a single network interface eth0, it will ...
0
votes
2answers
228 views

How to get total disk read/write in bytes per hdd device from /proc

How to get total disk read/write in bytes per hdd device? for example if i have sda, sdb, and sdc, is there any file on /proc that i could use similar to /proc/net/dev for networking?
3
votes
1answer
560 views

Does “syslogd” cause “cat /proc/kmsg” not to work properly?

I'm using cat /proc/kmsg to determine which process and file was involved in certain disc writes. I'm using the method given in this answer. But when I use cat /proc/kmsg, the output doesn't always ...
3
votes
1answer
1k views

Is there an easy way to log all commands executed, including command line arguments?

I am trying to find how to log a specific instantiation of rrdtool to see whether the path it is receiving is incorrect. I know I could wrap the executable in a shell script that would log the ...
2
votes
0answers
139 views

/proc/self/maps - 3rd mapped piece of file?

I'm running Arch linux on my laptop, which is kernel 3.12.9 right now. Something has changed about the way the kernel maps in a dynamically-linked executable and I can't figure it out. Here's the ...
1
vote
1answer
359 views

Do VmPeak & VmHWM have any measurement periods?

While reading kernel documentation I came across VmPeak & VmHWM, and it's a bit unclear to me. VmPeak in /proc/<pid>/status is described to be peak virtual memory size. Peak for what ...
2
votes
3answers
319 views

How to find out easily whether a block device (or a part of it) is mounted somehow

I want to know what the easiest way is to determine (without root privilege) whether a block device (say sdb) or any part of it is mounted (and which part of it). Checking /proc/mounts for sdb is not ...
3
votes
1answer
208 views

What is the Inverse of Idle in /proc/stat?

/proc/stat/ includes the following fields: "user", "nice", "system", "idle", "iowait", "irq", "softirq", "guest", "guest_nice", Which subset of those fields + idle accounts for 100% CPU? Is there ...
1
vote
2answers
108 views

processor(s) statistics that is one day old

I already know how to use grep -w cpu /proc/stat in order to get the cpu stats and identify the user mode. Percentage wise, I just divide it my the total time from the /proc/uptime. However, how can ...
1
vote
1answer
448 views

The amount of time since the system was last booted [duplicate]

I have used both uptime and cat /proc/uptime commands. I know the idle time in the later can be greater than running time (multiprocessors). However, when I add both running and idle times, and ...
0
votes
1answer
541 views

root permission denied on /proc/1/exe

I just performed a fresh ubuntu install and i am seeing the following in lsof: userA@az1:~$ lsof COMMAND PID TID USER FD TYPE DEVICE SIZE/OFF NODE NAME init 1 ...
8
votes
2answers
1k views

Determine if a specific process is 32- or 64-Bit

Given a 2.6.x or newer Linux kernel and existing userland that is capable of running both ELF32 and ELF64 binaries (i.e. well past How do I know that my CPU supports 64bit operating systems under ...
2
votes
2answers
687 views

Busybox ash script does not exit cleanly after executing cat; unable to get exit code

Consider the following script wrapcat.sh (a wrapper for cat) for illustrative purposes. It is run with busybox (ash) in an embedded Linux 2.6 box. #!/bin/sh cat $1 Under certain circumstances, this ...
2
votes
3answers
665 views

Is there a way to identify which process turns into Zombie process

One of the ubuntu server has 82 zombie processes. All processes shows '[sh] defunct' as process command. Is there a way to find out which process is becoming a zombie process? I tried checking the ...
2
votes
2answers
519 views

where does lspci gather its information from?

In kernel.org's documentation on proc I found "[The latest version of this document is available online". There I says: "… lspci is a synonym for cat /proc/pci". Which isn't the ...
4
votes
2answers
194 views

UUID in /etc/mtab

In some versions of Ubuntu. Disks are mounted by UUID. in My machine, /proc/mounts /dev/disk/by-uuid/UUID / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0 /etc/fstab UUID=U-U-I-D ...