0
votes
2answers
28 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 ...
3
votes
1answer
79 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 ...
0
votes
1answer
32 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 ...
4
votes
1answer
52 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
135 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
75 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 ...
2
votes
2answers
103 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
1answer
71 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
166 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 ...
2
votes
0answers
109 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 ...
2
votes
3answers
240 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
147 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 ...
3
votes
2answers
2k 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 > ...
0
votes
1answer
413 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
921 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 ...
4
votes
2answers
167 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 ...
4
votes
1answer
100 views

Why is UID information not in /proc/X/stat?

This is a silly question for the sake of academics; I know where to get the UID information if I need it. According to the proc(5) man page: /proc/[number]/stat Status ...
6
votes
1answer
905 views

How do I know if a serial port is actually transmitting data, without opening the device?

I have a high-availability cluster (Heartbeat) connected via serial line and two ethernet NICs. I'd like to set up a monitoring script capable of recognizing disconnected serial line (basically the ...
1
vote
0answers
74 views

Value of /proc/sys/kernel/hostname

I've set computer hostname in /etc/hostname a while ago (also there are record in /etc/hosts). Everything worked fine, but recently I've noticed that value of hostname (and /proc/sys/kernel/hostname) ...
3
votes
1answer
114 views

Is there a way to show all flags in /proc/mounts?

Some filesystem flags seem to be hidden in /proc/mounts, depending on whether they are defined as defaults. Is there a way to show all flags in /proc/mounts, also including the default ones? And if ...
1
vote
1answer
1k 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 ...
1
vote
1answer
194 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 ...
10
votes
1answer
869 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
67 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
6
votes
2answers
690 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
670 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 ...
3
votes
1answer
696 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
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
836 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
469 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
243 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
706 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
133 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
498 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
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 ...
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 ...
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
430 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
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
972 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
897 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
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 ...