Project

General

Profile

$cpuload » History » Revision 6

Revision 5 (Per Amundsen, 03/14/2019 08:30 PM) → Revision 6/7 (Per Amundsen, 02/16/2023 09:20 PM)

_Added in 1.8.10_ 

 *$cpuload* 

 Returns current "cpu":https://en.wikipedia.org/wiki/Central_processing_unit load in percentage. 

 _Can take a while to return a value/freeze on first use._  

 ----------------------------------- 

 _Added in 3.4_ 

 *$cpuload(N)* 

 Returns the current "cpu":https://en.wikipedia.org/wiki/Central_processing_unit load in percentage for the Nth core. 

 *Parameters* 

 table(ktable). 
 |*Parameter*|*Description*| 
 | N | - If N = 0 returns number of cores, otherwise the load for the Nth cpu core. | 

 *Example* 

 <pre> 
 //echo -ag the current load for the 3rd core is $cpuload(3) 
 </pre>