Linux / UNIX Tech Support Forum
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 ...
|
|||||||
| Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
|
||||
|
Yes it is possible, do you have sshd installed on all servers? Or atleast if you shoud allow it as follows:
main-server -> ssh -> Rest of all servers Let me know then we can create small script for job! Do you like to see output in text or html format?
__________________
Vivek Gite Linux Evangelist |
|
|||
|
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!
__________________
Vivek Gite Linux Evangelist |
|
|||
|
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 servers). 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!!!
__________________
Vivek Gite Linux Evangelist |
|
|||
|
IT WORKS! I can't believe I finally have a status script the way I like it! Thank you so much!!!! If you wish, I can PM you the statistics URL so you see it!
Thank you again Vivek! You rock! |
![]() |
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 | 24-03-2008 08:16 PM |
| single DHCP server with multiple VLAN's | frank | Computer Networking and Internet/broadband | 2 | 07-12-2007 12:38 PM |
| login into multiple servers thru script... | avcert1998 | Shell scripting | 2 | 17-03-2007 03:29 AM |
| Script to add users to multiple servers. | deepakhg | Shell scripting | 0 | 17-03-2007 03:02 AM |
| shell script that parses multiple log files and checks for a | Anonymous | Shell scripting | 1 | 15-11-2006 09:38 PM |