Returns CPU idle time of from /proc/stat
(cpu
):
$ cat /proc/stat
cpu 569115 4513 94734 1378694599 139966 0 1666 0 0 0
cpu0 134298 1652 22827 344794259 38716 0 613 0 0 0
cpu1 129032 847 25983 344677697 19973 0 35 0 0 0
cpu2 148695 1615 23690 344454047 44426 0 284 0 0 0
cpu3 157088 398 22234 344768594 36849 0 733 0 0 0
The function returns the following error codes:
E_FORMAT
if output format is unexpected.E_PLATFORM
if current system is not Linux.E_READ
if pipe returned no bytes.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | idle |
CPU idle time [%]. |