简体   繁体   中英

how to interprete sinfo cpu load %O?

sinfo --format "%O" gives the load of nodes.

Is this an average value of a specific time period?

And how is this value related with the load averages ( 1m,5m,15m ) of uptime command?

Thanks

Yes, it returns the 5min load average value.

SLURM uses sysinfo to measure the cpu load value (am using slurm 15.08.5 ).

In the source code of slurm, the following line measures the cpu load value.

float shift_float = (float) (1 << SI_LOAD_SHIFT);
if (sysinfo(&info) < 0) {
    *cpu_load = 0;
    return errno;
}
*cpu_load = (info.loads[1] / shift_float) * 100.0;

From the sysinfo man page:

           unsigned long loads[3];  /* 1, 5, and 15 minute load averages */

info.loads[1] returns the 5min average. sysinfo reads from the file /proc/loadavg

To understand why SI_LOAD_SHIFT is used, please read the reference

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM