This is a discussion on multiple server status script within the Linux software forums, part of the Linux Getting Started category; Hello, Does anyone know a script which can gather information like uptime, disk usage, cpu usage, etc. from multiple servers ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hello,
Does anyone know a script which can gather information like uptime, disk usage, cpu usage, etc. from multiple servers and output the information on a single server (the one being accessed from)? Just like http://netsaint.kirenet.com Thank you, Marin Micoriciu |
| Sponsored Links | ||
|
|
|
||||
|
Sure one can write such script, but ulr http://netsaint.kirenet.com uses diffrent software and not scripting... here is what i do to find out uptime and what users are doing between multiple server
RH1-box1 RH2-box2 Suse-box3 Debian-mysystem At Debian-mysystem i have script like Code:
#!/bin/sh BOX="IP1 IP2 IP3 IP4" USR="jadmin" for ip in $BOX do echo "Server Uptime and Load @ $ip" ssh $USR@$ip uptime ssh $USR@$ip w echo "-----------------------------------------------------------" done This is just simple script you can modify it to send output to /var/www/mydomain.com/status dir in plain or html format |
|
|||
|
Can I gather information like uptime, disk usage? Memory usage? All that? from 3-4 servers and output them on one server? Can you help me, please? Any suggestions are much appreciated.
This website rocks! Thanks guys, Marin Micoriciu |
|
|||
|
Hi Vivek!
Yes, I have ssh access on each of the servers and yes, if possible I'd like it in html format so I can design it a bit, not just simple text output. I'd really appreciate if you could help me out with this! This website and you guys are awesome! Keep up great work! Kind Regards, Marin Micoriciu |
|
||||
|
Okay I have done some work and uploaded file aka script @ http://bash.cyberciti.biz/monitoring...ation.bash.php have a look it at script and try it. You need to setup Following for all your ips:
Code:
Q_HOST="192.168.1.2 127.0.0.1" You need to setup the ssh keys based authentication to avoid the password prompt see http://www.cyberciti.biz/nixcraft/vi...entication.php Once done that you can run the script as follows geninfo.bash > /var/www/html/output.html And test it into browser using http://www.mydom/output.html Hope this helps! |
|
|||
|
OMG It works WONDERFUL! I had to copy id_rsa.pub to authorized_keys2 on localhost (127.0.0.1) but it works wonderfully! Thank you sooo much Vivek!
I thought it would be easy to modify the html layout, but it's not quite easy. Would it be too much if I'd ask how can I output this in a table with 3 columns? (I have 3 server .Something like Quote:
Thank you so much!! |
|
||||
|
Okay done
See url http://cyberciti.biz/tmp/geninfo.bash.txt And download files http://cyberciti.biz/tmp/graph.gif http://cyberciti.biz/tmp/indicator.gif Rest of the info is same! Let me know if this works or not! Enjoy!!! |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hda: status timeout: status=0xd0 { Busy } | surmandal | Linux hardware | 3 | 03-24-2008 09:16 PM |
| single DHCP server with multiple VLAN's | frank | Computer Networking and Internet/broadband | 2 | 12-07-2007 01:38 PM |
| login into multiple servers thru script... | avcert1998 | Shell scripting | 2 | 03-17-2007 04:29 AM |
| Script to add users to multiple servers. | deepakhg | Shell scripting | 0 | 03-17-2007 04:02 AM |
| shell script that parses multiple log files and checks for a | Anonymous | Shell scripting | 1 | 11-15-2006 10:38 PM |