This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Script : CPU alert
#2
Here you have this script:
Code:
f = assert (io.popen("cat /proc/loadavg"))
loadavg = {}
for line in f:lines() do
 table.insert(loadavg, line)
end -- for loop
 
f:close()

log(loadavg)

First 3 values means averaged 1min, 5min, 15min where 0 means 0% and 1 means 100%. Further values are current number of runnable tasks and the process ID of the process that most recently ran.

See also:
http://www.loadavg.com/2012/01/what-is-loadavg/
Reply


Messages In This Thread
Script : CPU alert - by hfebraud - 03.05.2017, 14:52
RE: Script : CPU alert - by buuuudzik - 03.05.2017, 17:20
RE: Script : CPU alert - by hfebraud - 04.05.2017, 07:49
RE: Script : CPU alert - by buuuudzik - 04.05.2017, 09:02

Forum Jump: