From: mockturtle Date: 2008-09-17T19:02:37+09:00 Subject: Re: Ruby system programs Mohamed Hussain ha scritto: > Hai all, > Hope everybody fine. > But > I am not fine,because I got one assignment from my project head. > > The problem is :- > > 1) To find the Memory usage > 2) To find the CPU usage > 3) To find the UPTIME Status > 4) To find the Hard Disk space(used/available) > 5) To find the status of Service running (like MYSQL) > > I would like to know,how to write program. > Is there any way to find all the information above mentioned using Ruby? > If yes,Please let me know You do not specify the OS you are working with (Windows, Linux, ...). If you are in Linux, I guess you can find those informations in some pseudo-files under the /proc filesystem (e.g. /proc/loadavg --> http://www.linuxinsight.com/proc_loadavg.html). If you are working with other OSes, maybe you can call (with popen) some external utility which reports those informations and parse its output. > Thanks advance > Regards > Hussain > -- > Posted via http://www.ruby-forum.com/.