How to get CPU usage

Hello,
I was confident I could use OS.execute (‘top -n1’) from a luup script until I realized that OS.execute does not return the output of the command. How could I do this?

Sent from my GT-I9100 using Tapatalk 2

Try io.popen() instead, although top may need special params unless it can only show one cycle of output.

http://www.lua.org/manual/5.1/manual.html#pdf-io.popen

You could try to pull the info from /proc.

I have tried that but I am not sure this is available.

Sent from my GT-I9100 using Tapatalk 2

Yes this is an option but it brings us back to io.popen

Sent from my GT-I9100 using Tapatalk 2

And I could check: this I’d not available By default but installable and works 8)

Sent from my GT-I9100 using Tapatalk 2