How does ESM calculate CPU usage of a Gateway

Document ID : KB000046367
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:

How does ESM calculates CPU usage of a Gateway.

Instructions:

1.By default ESM triggers a CPU usage request to gateway every 15 seconds. This time interval can be changed from monitoring setup field of ESM.

ESM.PNG

 

2.Upon ESM triggers the request the designated gateway run the following command, "vmstat 1 2" every 15 sec or according to the set interval in monitoring setup.

 

vmstat.png

3.The above command gets the CPU usage and other details, for the  machine as shown in above screenshot, its uptime on the first line, and in the 2nd line,it gives the CPU usage for the last one second, which is what we display in ESM.

4.So basically, in every 15 seconds, we get the CPU usage time for the last one second, and not the whole 15 seconds.

5.Now the CPU usage is calculated by "100-id", so the average CPU usage for the last one second would be 100 -79 =21%.