dm_linux_procfs_cpu_idle Function

public function dm_linux_procfs_cpu_idle(idle) result(rc)

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.

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: idle

CPU idle time [%].

Return Value integer


Calls

proc~~dm_linux_procfs_cpu_idle~~CallsGraph proc~dm_linux_procfs_cpu_idle dm_linux_procfs_cpu_idle proc~dm_is_error dm_is_error proc~dm_linux_procfs_cpu_idle->proc~dm_is_error