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

3
votes
2answers
152 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
371 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
336 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
835 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
467 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
242 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
705 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
132 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
75 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
116 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 ...
4
votes
2answers
496 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
2answers
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
759 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
150 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
303 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
79 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
394 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 ...
15
votes
2answers
1k 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
236 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
484 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
96 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
607 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 ...
4
votes
1answer
429 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
279 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
446 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
343 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
969 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
896 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
267 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
647 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
3k 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
346 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
677 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
617 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 ...
7
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
2k 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 ...
11
votes
7answers
43k 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
240 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?
0
votes
1answer
587 views

Connecting various process attributes reported by top, ps, /proc/pid/statm, /proc/pid/status, /proc/pid/smaps [closed]

Here are some of the common attributes I figured out: top(VIRT) , smem(VSS), /proc/pid/statm (1st entry in pages), /proc/pid/status (VmSize), ps(VSZ) top(RES) , smem(RSS), /proc/pid/statm (2nd entry ...
2
votes
3answers
597 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 ...
7
votes
1answer
2k views

Is the sum of all PIDs “utime” the total system utime?

In order to measure a user's total CPU time, I'm using the "utime" field out of /proc/[pid]/stat: utime %lu Amount of time that this process has been scheduled in user mode, measured in ...
14
votes
1answer
746 views

“ss” command in iproute package; why query slab table for timewait sockets?

Forgive me if this isn't the best forum for this question, but it seems more relevant to the kernel than to the programming itself. I'm writing a script that queries the system for open ports so that ...
7
votes
2answers
232 views

Linux /proc/sys/kernel: where are the files sysrq-sticky, sysrq-key, and sysrq-timer?

Documentation for Red Hat Enterprise Linux 3 (section 5.3.9.3) mentions these files in /proc/sys/kernel/: sysrq sysrq-key sysrq-sticky sysrq-timer The documentation for RHEL 5 also mentions them. ...
1
vote
2answers
294 views

Making Bootable USB, problems copying /proc

I'm creating a bootable usb as a cloned partition and am running into problems copying /proc to the usb. I know /proc contains a lot of virtual files, but I'm not sure how to copy them over. It seems ...
5
votes
3answers
2k views

Changing the UID of files in /proc

In a follow up to this question about changing the UID of a user, it is recommended to change the ownership of all files on the system (this answer) find / -uid 1000 -exec chown 5000 '{}' \+ where ...
1
vote
0answers
177 views

Rogue Java process brings my computer to a halt

In reference to my earlier post: Is there a log of past threads that are now closed? I gave the process a kill -STOP signal and started examining the details. I can't seem to figure out why it is ...
4
votes
1answer
2k views

What is the difference between /proc/self/stack and output from pstack?

I have been looking through the documentation for /proc and the "stack" object being a new'ish object in proc, I have also looked through the kernel commit to create it -- however the documentation ...
3
votes
2answers
938 views

How can I test whether a block device is read-only from /sys or /proc?

On a CentOS6 system I have /dev/block/sr0 (read only) and /dev/block/sda (read/write). How can I find out programmatically which devices are read-only? There is a ro file in there, but it's '0' for ...