$cpuload » History » Version 7
Per Amundsen, 08/04/2023 06:47 AM
| 1 | 1 | Per Amundsen | _Added in 1.8.10_ |
|---|---|---|---|
| 2 | |||
| 3 | *$cpuload* |
||
| 4 | |||
| 5 | 7 | Per Amundsen | Returns current "CPU":https://en.wikipedia.org/wiki/Central_processing_unit load in percentage. |
| 6 | 2 | Per Amundsen | |
| 7 | _Can take a while to return a value/freeze on first use._ |
||
| 8 | 1 | Per Amundsen | |
| 9 | 7 | Per Amundsen | *Properties* |
| 10 | |||
| 11 | .cores - Returns the combined load of all "CPU":https://en.wikipedia.org/wiki/Central_processing_unit cores. |
||
| 12 | |||
| 13 | 5 | Per Amundsen | ----------------------------------- |
| 14 | |||
| 15 | _Added in 3.4_ |
||
| 16 | |||
| 17 | 1 | Per Amundsen | *$cpuload(N)* |
| 18 | 5 | Per Amundsen | |
| 19 | 7 | Per Amundsen | Returns the current "CPU":https://en.wikipedia.org/wiki/Central_processing_unit load in percentage for the Nth core. |
| 20 | 5 | Per Amundsen | |
| 21 | *Parameters* |
||
| 22 | |||
| 23 | 6 | Per Amundsen | table(ktable). |
| 24 | |*Parameter*|*Description*| |
||
| 25 | | N | If N = 0 returns number of cores, otherwise the load for the Nth cpu core. | |
||
| 26 | 5 | Per Amundsen | |
| 27 | *Example* |
||
| 28 | |||
| 29 | <pre> |
||
| 30 | //echo -ag the current load for the 3rd core is $cpuload(3) |
||
| 31 | </pre> |