Topic: Need some help and guidance please?

Hello everyone, i'm currently doing a school project that requires me to write a web application that can find out the status of systems of a network such as CPU/memory usage, harddisk capacity/free space left, network utilization, service status and monitor if there are high usages in the system like CPU overload or over 90% utilization and reports it to the application. I'm told to use PHP/Ruby on Rails, MySQL, Apache. I'm sort of new to programming and i need some guidance as to what i should find out more about, look into or any books or links that can help? Thanks everyone.

Re: Need some help and guidance please?

PHP/Ruby on Rails... you mean PHP or Ruby on Rails?

And if you use RoR, FileUtils is a module you'll have to look into. I'm doing something similar to what you described, I am finding and parsing files on a computer. I  use the FileUtils module which acts as unix/linux commands to navigate the file system and join/read files etc.

FileUtils

- Ben

Re: Need some help and guidance please?

Yeah, if you are running on a linux/unix system or a mac then ultimately you're just going to be calling system (ie bash) commands which in ruby you can get the results back by using 'backticked' code.    Try it in the ruby irb console if you have ruby installed already:

>> puts "here is the disc usage summary"
here is the disc usage summary
=> nil
>> puts `df`
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             48521608  29234092  16822748  64% /
udev                   1026764       264   1026500   1% /dev
none                   1026764      1764   1025000   1% /dev/shm
none                   1026764       376   1026388   1% /var/run
none                   1026764         0   1026764   0% /var/lock
none                   1026764         0   1026764   0% /lib/init/rw

df is a program which gives you a disc usage summary.  Ultimately in your app you're just going to be calling system commands and writing the results into variables then showing them on a web page.  Easy peasy.  As for what you need to find out, i'd really recommend Ruby For Rails by David A Black which gives a great introduction to ruby and rails.  Don't dive into rails before you learn at least basic ruby, and also learn the basics of how the web works before you dive into rails.

###########################################
#If i've helped you then please recommend me at Working With Rails:
#http://www.workingwithrails.com/person/ … i-williams