On Wed, 4 Sep 2019 12:49:10 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 04/09/2019 12.29, Carlos E. R. wrote:
On 04/09/2019 11.52, Per Jessen wrote:
Per Jessen wrote:
Again, no. That's the load at the end. I want to monitor a daemon, clamd, at any point. Instant CPU load.
"top" must obtain the data from somewhere. I want to obtain the same data top does, with calling another program. If there is no other way, I'll use top and parse the output.
Once (2014) I started to write a "top" equivalent, but only went as far as the header. I parsed /proc/stat, but my notes do not say where I obtained the definition of that file and I do not remember.
Well, I just googled for /proc/stat and immediately found a definition :) More useful is man proc(5) which hints that /proc/<pid>/stat is probably what you want if you're coding it yourself. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org