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.
Questions tagged [proc]
51 questions
140
votes
2 answers
Where is the /proc folder on Mac OS X?
I am reading a book that speaks about Bash in Linux systems. But I am a Mac OS X user and I cant find /proc folder in my machine.
Where I can see the Mac OS X terminal equivalent of the /proc folder?
sensorario
- 1,747
73
votes
5 answers
How does /proc/* work?
There are many files in /proc, like /proc/cpuinfo, /proc/meminfo, /proc/devices and so on, which, when opened, return system information.
These files do not seem to have any existence in reality, as running file on them only tells that they're…
test
- 1,456
52
votes
2 answers
cat /proc/meminfo what do all those numbers mean
In reading the man page on the free command in Linux. I found that is gets its info from /proc/meminfo.
I understand a few of the entries, like MemTotal and MemFree. What do the rest mean.
cat /proc/meminfo
MemTotal: 3973736 kB
MemFree: …
nelaaro
- 14,139
- 30
- 88
- 115
21
votes
2 answers
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 MemTotal /proc/meminfo
MemTotal: 38740876 kB
Now as…
Jacob Birkett
- 431
11
votes
1 answer
How can I get the number of threads running in a process from /proc/[pid]/stat in Linux?
I have the pid of the process. I would like to know the current number of thread running in the process. I know I can read /proc/pid/stat for this information, but I'm not sure how to specifically get the number of threads from stat. Can anyone…
Irlanco
- 213
8
votes
1 answer
Bash: permission denied for file write
I followed this tutorial guide on "How to Create Linux Proc Files in C Program using LKM".
I've successfully made my module and loaded it in. Now I want to echo to my proc file to make sure the method gets called that's supposed to be called.
I…
Sam
- 83
7
votes
1 answer
Why do symbolic links in /proc/$PID/fd/ act as hard links?
When the target of a symbolic link is deleted, it points to nothing and there's no way to get to the content of the deleted target.
Files in /proc/$PID/fd/ are displayed as symbolic links, but they allow you to get to the deleted target's content,…
user300811
- 101
5
votes
1 answer
Permission denied when setting values in sysctl on Ubuntu 12.04
I am trying to configure my Ubuntu 12.04 VPS (OpenVZ) to reboot when it runs out of memory. To do this I have added following lines to my "/etc/sysctl.conf" file.
vm.panic_on_oom = 1
kernel.panic = 14
But when I run the configuration using the…
Jay Bhatt
- 163
4
votes
1 answer
What is the policy for permissions on /proc//environ?
I see, that usual user process gets user-readable permissions:
-r-------- 1 1000 1000 0 Nov 19 13:51 /proc/9083/environ
but f.ex. SCREEN daemon gets root ownership:
-r-------- 1 root root 0 Nov 19 13:47 /proc/9167/environ
Though, 9167 is also user…
midenok
- 289
4
votes
2 answers
/proc/cpuinfo doesn't show CPU frequency at all
/proc/cpuinfo doesn't show CPU frequency at all.
I built the kernel on my own. Did I miss some kernel configuration?
pi@raspberrypi ~ $ cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
Features : swp half…
Younggun Kim
- 153
4
votes
2 answers
What is "ln -L" (--logical) for?
I can read in the ln man page:
-L, --logical
make hard links to symbolic link references
I read somewhere that ln -L could be used to re-link files that were deleted but which are still open, using the /proc filesystem. For example:
ln…
user36520
- 3,171
- 3
- 24
- 19
4
votes
2 answers
What do the different /proc/bus/pci/0x directories represent?
What do the different /proc/bus/pci/0x directories represent?
Do they represent the different PCI/PCI-E sockets on a board?
If I have one mini pci and 2 PCI-E sockets on my board, should I be seeing 3 different '0x' directories under…
freethinker
- 3,768
- 3
- 25
- 21
4
votes
1 answer
What is the difference between "mount -t ..." and "mount -o bind ..." with regard to chroot environment
So I am setting up a chroot where I need proc, sys and dev folders.
I have read that I need to mount them as follows:
mount -t proc /proc /mnt/chroot/proc
mount -t sysfs /sys /mnt/chroot/sys
mount -o bind /dev /mnt/chroot/dev
Answers obtained from…
code_fodder
- 1,687
3
votes
1 answer
Why tail -f is not working for a proc file?
I have a proc file which is updated by a driver. In user space I am reading using tail. It is working fine, But when i give -f option for tail, It is not working. This means it is reading file contents which are already there but it is not reading…
Chinna
- 2,449
3
votes
1 answer
How to enable sched_compat_yield?
I am not able to see the sched_compat_yield entry under /proc/sys/kernel/. How to enable this propery in the kernel (so that I can tweak it for some debugging purpose) ?
Currently Available Entries:
root@test ~ >ls…
Lunar Mushrooms
- 285
- 2
- 9