$cpuload » History » Version 6
Per Amundsen, 02/16/2023 09:20 PM
1 | 1 | Per Amundsen | _Added in 1.8.10_ |
---|---|---|---|
2 | |||
3 | *$cpuload* |
||
4 | |||
5 | 4 | 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 | 5 | Per Amundsen | |
9 | ----------------------------------- |
||
10 | |||
11 | _Added in 3.4_ |
||
12 | |||
13 | *$cpuload(N)* |
||
14 | |||
15 | Returns the current "cpu":https://en.wikipedia.org/wiki/Central_processing_unit load in percentage for the Nth core. |
||
16 | |||
17 | *Parameters* |
||
18 | |||
19 | 6 | Per Amundsen | table(ktable). |
20 | |*Parameter*|*Description*| |
||
21 | | N | If N = 0 returns number of cores, otherwise the load for the Nth cpu core. | |
||
22 | 5 | Per Amundsen | |
23 | *Example* |
||
24 | |||
25 | <pre> |
||
26 | //echo -ag the current load for the 3rd core is $cpuload(3) |
||
27 | </pre> |