All, Thanks to all who responded....Basically most of them told me to use the bigbrother or sitescope. I got 2 good scripts which was useful. a) --------------------------------------------------- #!/usr/bin/perl @list = ("a","b","c","d"); if($#ARGV != 0) { print "Usage: $0 \"command_to_exec\"\n"; exit; } foreach $server (@list) { print "/usr/local/bin/ssh -a $server $ARGV[0]\n"; print `/usr/local/bin/ssh -a $server $ARGV[0]`; } ---------------------------------------------------- instead of a,b,c etc put names of your servers. you can use this script by this way for example: $script.pl 'ps -elf | grep -c httpd' the script just connects via ssh to all servers listed in @list definition and executes a command given as an argument ($ARGV[0] in the script). if you need to execute the same command all the time, you can 'hardcode' it into the script. Regards, Michael Groisman System Department, NetVision Ltd. b) #!/bin/sh ssh user@box1 "grep 'httpd' | grep -v grep" > box1_httpd ssh user@box2 "grep 'jre' | grep -v grep" > box2_wls You could of course get fancier and automate things (run script on each server that reads return value of grep to see if a match was made; telnet to the port, etc)... Really I think you're better off with big brother... -Scott All, Iam working in a e-biz environment which has 100 servers . My daily routine is to do a morning check to see if all the important process like weblogic,httpd is running.It is frustrating to log on each morning to each and every server to find if the process are running ok...I need a script that could do this and generate a report .co'z Iam not good at scripting.Below are the requirements. There are web servers running : httpd (ps -ef | grep -i httpd | grep -v grep) There are App servers running : weblogic (ps -ef | grep -i weblogic | grep -v grep) There are database servers on VCS running: oracle database (/opt/VRTSvcs/bin/hastatus -summary) I have one server (X) from which I have ssh access as root to all the servers.I can use the X server to run the script. Regards, ChandraReceived on Wed Oct 10 16:40:11 2001
This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:33 EDT