CPU usage numbers

(Elvar) #1

Maybe a dumb question, but I posted this screenshot of my tests of Topbeat on twitter

The CPU usage on the process I picked the perc value expecing it to be 0-100, but the number on the graph goes much higher, to 180. How is this counted? is it per core, per socket or ?

(ruflin) #2

Topbeat takes the data from the top command which can also show more then 100%. As far as I know, in case you have 4 cores and 3 of them are used 40%, the output will bet 120%.

(Elvar) #3

I see, very informative but makes me wonder. When you have statistics like that coming in, then writing a monitoring rule on top of that becomes difficult because the values you put in the rule change depending on how many cores the endpoint has. Is this something to worry over?

In hindsight when looking at historical metrics like this its very good to see values for individual cores. For the future would it be possible to include usage per core instead of the total?

hostname.proc.procname.cpu0, hostname.proc.procname.cpu1 and so on.

(ruflin) #4

That is actually a good point. I can't say if this is possible for Windows, but for Linux it should be doable as this information can also be fetched from top or other commands. If you open the top command and press 1, it shows the use per CPU.

Can you directly open an issue here so we keep this on the radar? https://github.com/elastic/topbeat

(Elvar) #5

Created an Issue https://github.com/elastic/topbeat/issues/40

(ruflin) #6

Thanks. We will update the issue as soon as we start to work on it.

In case you have some time, feel free to open a pull request yourself.

(system) #7