News for hackers. Stuff that matters.
Re:Follow-up on "Linux server monitoring tools" by atmosx on Wednesday February 05, 2014 @07:28AM (#7183327)
I'm writing a ruby script to gather statistics from a Raspberry Pi. All the projects I've seen so far rely on Perl/Python/PHP scripts which are executing shell commands to extract informations every X minutes.

I wonder, isn't there some sort of API to access in Unix-based systems data like CPU usage, memory usage, etc in a more natural way?

Re:Follow-up on "Linux server monitoring tools" by dsr_ on Wednesday February 05, 2014 @08:09AM (#7183481)
Why, yes, there is.

Go run strace on ps or top and see what they call.

I'll save you some time: it turns out to be stat() and open() on things in /proc.