Tagged Questions
-1
votes
0answers
40 views
create a /proc symlink
I'm trying to build a module using the method shown in this answer.
Basically I need to create a symlink I got it to build, when I try to load it using insmod I get:
-1 invalid module format
and ...
2
votes
3answers
89 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 ...
2
votes
1answer
103 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?
20
votes
2answers
780 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
94 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
72 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
258 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
45 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
37 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
48 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 ...
1
vote
2answers
59 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. ...
1
vote
0answers
56 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
135 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 ...
12
votes
2answers
275 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 ...
2
votes
2answers
208 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 ...
7
votes
4answers
320 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 ...
3
votes
1answer
169 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 ...
2
votes
1answer
212 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 ...
1
vote
2answers
454 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
426 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
172 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
3answers
325 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 ...
3
votes
2answers
1k 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
412 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 ...
1
vote
0answers
176 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
331 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 ...
1
vote
2answers
165 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 ...
3
votes
2answers
383 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 ...
3
votes
1answer
690 views
Timer interrupts count in `/proc/interrupts` is updated very slowly and is very small
There is the result of cat /proc/interrupts|grep timer on my Ubuntu 11.04 machine:
0: 63 0 0 0 IO-APIC-edge timer
LOC: 59 44 27 ...
5
votes
3answers
1k views
How do I kill all a user's processes using their UID
I want to kill all running processes of a particular user from either a shell script or native code on a linux system.
Do I have to read the /proc directory and look for these?
Any ideas? Is there a ...
6
votes
3answers
4k views
Find out what device /dev/root represents in Linux?
On linux, there is a /dev/root device node. This will be the same block device as another device node, like /dev/sdaX. How can I resolve /dev/root to the 'real' device node in this situation, so ...
5
votes
3answers
554 views
How to check if /proc/ is mounted
How can I check if /proc/ is mounted?
Using /etc/mtab is discouraged as it
might be inconsistent.
Using /proc/mounts is also not an
option as might not exist if /proc/
is not mounted (although ...
7
votes
2answers
3k views
/proc/PID/fd/X link number
In Linux, in /proc/PID/fd/X, the links for file descriptors that are pipes or sockets have a number, like:
l-wx------ 1 user user 64 Mar 24 00:05 1 -> pipe:[6839]
l-wx------ 1 user user 64 Mar 24 ...
2
votes
1answer
367 views
Is there a utility that interprets /proc/interrupts data in time?
is there something out there ? Like top is for ps
1
vote
2answers
360 views
How can I disable /proc pseudo-filesystem on a shared Linux environment?
Is it possible to disable the /proc pseudo-filesystem to prevent w, ps, top, etc, from showing what other users are doing? Of course, I still want "everything else" to work correctly. Is there a ...
12
votes
4answers
2k views
Read the stack of another process?
I'm trying to read a child process's stack but with no luck.
I know it is possible using ptrace, but ptrace's interface allows you to read only one word at a time, and I'm trying to scan a larger ...
13
votes
4answers
371 views
How do I learn what I can do with /proc and /sys
I'd like to know more about the advanced uses of the /proc and /sys virtual filesystems, but I don't know where to begin. Can anyone suggest any good sources to learn from? Also, since I think sys has ...
41
votes
3answers
17k views
How do I read from /proc/$pid/mem under Linux?
The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me
$ cat /proc/$$/mem ...
10
votes
2answers
435 views
Contents of /proc
Is there a site someplace that lists the contents of /proc and what each entry means?
