Getting Linux process resource usage (cpu,disk,network) Getting Linux process resource usage (cpu,disk,network) linux linux

Getting Linux process resource usage (cpu,disk,network)


Some newer kernels have /proc/<pid_of_process>/io file. This is where IO stats are.It is not documented in man proc, but you can try to figure out the numbers yourself.

Hope it helps.Alex.


getrusage() accomplishes cpu, memory and disk etc.

man 2 getrusage

I don't know about network.


checkout glances.

It's got cpu disk and network all on one screen. It's not per process but it's better than looking at 3 separate tools.