Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cpuLoad

Get the Recent CPU Load


Description

Get the Recent CPU Load

Usage

cpuLoad()

Details

This function works only Unix-like system with ‘/proc/loadavg’.

Value

A named numeric vector with three elements 1min, 5min, and 15min with non-negative values. These values represent estimates of the CPU load during the last minute, the last five minutes, and the last fifteen minutes [1]. An idle system have values close to zero, and a heavily loaded system have values near parallel::detectCores(). If they are unknown, missing values are returned.

References

  1. Linux Load Averages: Solving the Mystery, Brendan Gregg's Blog, 2017-08-08, http://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html

Examples

loadavg <- cpuLoad()
print(loadavg)

parallelly

Enhancing the 'parallel' Package

v1.25.0
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.