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

1
vote
1answer
264 views

Ubuntu: /proc/pid/comm file missing

On my development box, under /proc/[pid]/ there is a file called comm containing the name of the executable for that process. I use this to validate the process to which I am sending a signal. On our ...
5
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 ...
12
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 ...
3
votes
2answers
72 views

How proc gets updated about the devices [duplicate]

If i do cat /proc/asound/cards it lists all the sound card details from where proc gets this information.This file is continuously updating what if i want to make a manual entry
7
votes
2answers
1k views

/proc/sys vs /sys/modules/mod/parameter

I've been wondering for last few days how exactly does it work. We can set kernel runtimes parameters using sysctl or echo boolen 1> /proc/sys/module/exactParameter but in ...
2
votes
1answer
826 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 ...
4
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
2answers
125 views

How to get environmental variables of a very short process?

I have a very short process for which i want to check the environmental variables for debugging purposes. The process is instant from a human perspective. The example illustrates it better. Example ...
3
votes
1answer
325 views

How to get the actual keyboard device given the output of /proc/bus/input/devices?

When I run: cat /proc/bus/input/devices ...I receive the following output: ... I: Bus=0003 Vendor=040b Product=2000 Version=0110 N: Name="Generic USB Keyboard" P: Phys=usb-0000:00:1d.0-1/input0 ...
0
votes
1answer
119 views

How are username, date and time are registered in kernel

How is the date and time of kernel compilation registered in kernel image? cat /proc/sys/kernel/version #35~precise1-Ubuntu SMP Fri Jan 25 17:15:33 UTC 2013
3
votes
2answers
188 views

Determining if a file system object is a procfs/sysfs/etc. “virtual file” which doesn't report its length correctly

Some kinds of pseudo-files, like many in the procfs and sysfs virtual file systems, have no file size (stat returns st_size == 0) and do not support SEEK_END in fseek. These file system objects, such ...
5
votes
2answers
476 views

mount options shown in /proc/mounts

IIRC then the mount options shown in /proc/mounts have changed. Some time ago acl and user_xattr were shown, now it seems that only noacl and nouser_xattr are shown if these features are turned off. ...
2
votes
3answers
395 views

files in /proc/$PID (e.g. ssh-agent, Chrome) are not owned by user but by root

I am just answering another question here :-) and thus had a look – wanted to have a look at /proc/$PID/fd of ssh-agent in order to find out which socket it uses. But I can't. I am quite surprised to ...
4
votes
1answer
1k 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?
22
votes
2answers
1k views

How frequently is the proc file system updated on Linux?

How frequently is the proc file system updated on Linux? Is it 20 milliseconds (time quantum)?
1
vote
1answer
534 views

How to clone a read-only portion of /proc file system

The problem with reading /proc file system is that it is not atomic. I tried using a library (procfs in Python) that wishes to read it, but it has glitches about 5% of the time because the process ...
1
vote
1answer
292 views

Do kernel counters for jiffies in state exist in Linux?

I am looking to get time/jiffie stats on the state of a daemon process. The states I'm referring to are mentioned in the Linux Kernel Proc Filesystem document. Running, Sleeping, uninterruptible ...
8
votes
2answers
913 views

A hidden process, what it is?

[root@datacenteronline ~]# ssh root@192.168.1.172 Last login: Wed Apr 17 09:55:45 2013 from 192.168.1.187 [root@localhost ~]# ls /proc/ | grep 2266 [root@localhost ~]# cd /proc/2266 [root@localhost ...
1
vote
1answer
154 views

Looking for /procfs documentation, describing values and units of measurement

Surprisingly, comprehensive documentation for /procfs is hard to find. For my specific question, I am looking at: cat /proc/1/statm (let's use pid=1 because it seems to be always there). I just ran ...
1
vote
0answers
82 views

Viewing shared segments created by shmget

I'm trying to "visualize" shared memory between two processes. I've created a little server-client example where the client writes some data to a shared memory location and the server reads from it. ...
1
vote
1answer
121 views

Determine how much a process is using each disk?

How do I tell how much load a particular process is contributing to each of several available volumes/mounts? It seems that dstat only shows aggregate stats across all processes per disk, and iotop ...
5
votes
2answers
729 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. ...
7
votes
3answers
3k 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
924 views

Is it possible to tell df to use /proc/mounts instead of /etc/mtab?

Installing gentoo in chroot I found that commands like mount and df doesn't work: they try to read file /etc/mtab (which of course is empty). Can I (for future use) setup or even recompile them so, ...
2
votes
0answers
158 views

/proc/net/wireless does not show values unless run as root

cat /proc/net/wireless does not show statistics for wireless devices unless it is run as root, even though the permissions on the file are 444. The same seems to apply when accessing statistics via ...
5
votes
2answers
312 views

Why do I have four CPUs listed in /proc/cpuinfo?

When I bought my Lenovo Thinkpad 520, it had Windows installed. I promptly cleaned that out and installed Fedora 16. I recently visited the /proc/cpuinfo and, much to my surprise, discovered that it ...
1
vote
0answers
86 views

how long use of linux? [duplicate]

/proc/uptime shows how long the system has been running since the last time I turned it on. Is there a way to determine the total amount of time the system has ever been on since I first installed it? ...
1
vote
1answer
440 views

vmstat on virtual machine and large values

Hi I'm using vmstat to track machine performance during some tests (jmeter). This is virtual machine running on a big machine where lots of other virtual machines are installed (about 20 virtual ...
16
votes
2answers
2k views

When was a process started

To know when was a process started, my first guess was to check the time when /proc/<pid>/cmdline was written/modified the last time. ps also shows a START field. I thought both of these ...
0
votes
0answers
297 views

Very large values for utime and stime for foo. Is foo still running?

I am running a program foo It has been running for close to 30 days now (even more) Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the ...
2
votes
2answers
564 views

No /proc in a Busybox-based embedded Linux distribution

I am making an embedded Linux distribution and my board is a Raspberry Pi. My kernel version is 3.2.27 without initramfs and my root file system as follows: /lib /* contains ...
2
votes
1answer
98 views

“ps” output and comments

I'm pretty sure you cant do this but maybe someone has some weird hack... Is there a way to get comments (#blahblah) to show up in ps output? My problem is that i have a script, lets call it ...
7
votes
4answers
688 views

Linking /proc/mnt to /proc/mounts

I understand that /proc filesystem reflects the output of various processes. Unfortunately, I have a propietary (romdump) binary that expects the mount table to appear as /proc/mtd, while my Android ...
5
votes
1answer
514 views

Timestamp of socket in /proc/<pid>/fd

If I list /proc/<pid>/fd I see a number of entries for sockets. These entries have timestamps. At first I thought they were when the socket was created. But it doesn't always appear to be the ...
1
vote
2answers
1k views

Is there a faster interface for info from /proc/net/tcp?

Given a linux TCP socket's inode (obtained via /proc/<pid>/fd), is there a faster way to look up the information that I can get from /proc/net/tcp about this socket? I have written a ...
1
vote
1answer
308 views

About sector and blocks, and a little confusion in /proc/diskstats

I've been studying about diskstats lately, and I get that the amount of hdd read comes in sectors. But in most places I've noticed that there exists a slight misunderstanding about sectors and blocks. ...
6
votes
1answer
508 views

Files bigger than max(off64_t) on Solaris, eg “/proc/../as”

How do I read or seek from a file that's bigger than the maximum off64_t? The problem arises because the address space of a process is represented in the /proc/.../as file, which is a huge sparse file ...
2
votes
1answer
391 views

System IDLE Time > System Uptime?

I was testing out the linux api while working on something but got stuck on the following output. [Abhii@localhost net]$ cat /proc/uptime 39135.53 149657.73 As per specs the first number should be ...
2
votes
2answers
1k views

File delete versus overwrite and link at /proc/pid/fd

It is well known that UNIX systems won't actually delete a file on disk while the file is in use. So if a file is being accessed by process 1 and process 2 deletes the file using rm, process 1 ...
3
votes
1answer
984 views

When do jiffies increment? How a process runs in a jiffy?

I know that jiffies length is selected at kernel compile time and it is defaulted to 250 (4ms). Source: man 7 time - The Software Clock, HZ, and Jiffies I wonder what happens inside a jiffy. What are ...
2
votes
1answer
294 views

What is the connection between jiffies and IPS? How to convert jiffies to IPS?

Reading from /proc/PID/stat a lot of information can be processed. I would like to see how many percentages has been used of CPU power by this process. There are a lot of variable around here (utime, ...
2
votes
2answers
723 views

Chroot Risks w/ /dev and /proc

I am planning to set up a few chroot jails for some users to run/test Java applications (lets just assume each application is untrusted). Is there any risk involved with mounting /dev and /proc into ...
4
votes
2answers
4k views

File descriptor linked to socket or pipe in proc [duplicate]

Possible Duplicate: /proc/PID/fd/X link number i have a question regarding the file descriptors and their linkage in the proc file system. I've observed that if i list the file descriptors ...
3
votes
1answer
390 views

Plotting the sleep/wait chain of a process

I often want to know why a process in the middle of a pipeline is sleeping and not busy processing data. My current method is: find the pid of interest sudo strace -pt pid to get the blocking ...
3
votes
1answer
734 views

Do I have PCLMUL instruction set support?

Here are the flags from /proc/cpuinfo: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc ...
5
votes
2answers
777 views

Is it possible to create a directory and file inside /proc/sys?

I am running CentOS 6.2 and I need to create a subdirectory named "crypto" inside /proc/sys. Inside /proc/sys/crypto, I need to create a file named test which contains the value "1". I have tried ...
8
votes
1answer
1k views

change environment of a running process

How might it be possible to alter some variable in the env of an already running process, for example through /proc/PID/environ? That "file" is read-only. Need to change or unset the DISPLAY variable ...
5
votes
2answers
3k views

How is /proc/self implemented in Linux?

I was tinkering around with the /proc filesystem in Linux, and I came across /proc/self, which is a symbolic link to the process directory of the current process. I would like to know how it is ...
13
votes
7answers
49k 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 ...
1
vote
0answers
263 views

Process VSS and Size: entry in /proc/pid/smaps

I was wondering why the sum of all 'Size:' entries in /proc/pid/smaps does not equal the process VSS as reported by top, ps, /proc/pid/status VmSize, /proc/pid/statm 1st entry? Any clues?