4
votes
3answers
373 views

Why can't I `tail -f /proc/$pid/fd/1`?

I wrote a simple script which echo-es its PID: #/bin/bash while true; do echo $$; sleep 0.5; done I'm running said script (it says 3844 over and over) in one terminal and trying to tail ...
1
vote
2answers
105 views

processor(s) statistics that is one day old

I already know how to use grep -w cpu /proc/stat in order to get the cpu stats and identify the user mode. Percentage wise, I just divide it my the total time from the /proc/uptime. However, how can ...
1
vote
1answer
383 views

The amount of time since the system was last booted [duplicate]

I have used both uptime and cat /proc/uptime commands. I know the idle time in the later can be greater than running time (multiprocessors). However, when I add both running and idle times, and ...
0
votes
1answer
613 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 ...