Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP! Telnet, rsh, cat help needed

Status
Not open for further replies.

jehixson

Programmer
Oct 15, 2003
12
0
0
US
Ok I have something I can not figure out. I am trying to do a few things here. I have the basic script down for one server but I need to run these comands on six servers. I need only one script with all of the output compiled to one (1) file.

Here is the script.

#!/bin/sh
find / -name core > list0
voldisk list (status of all disks on the server) >> list0
volprint -A (Verify disk are mirrored) >> list0
rsh (remote server host name) find / -name core >> list0
rsh (remote server host name) voldisk list >> list0
rsh (remote server host name) volprint -A >> list0
rsh (2nd remote server host name) find / -name core >> list0
rsh (2nd remote server host name) voldsik list >> list0
rsh (2nd remote server host name) volprint -A >> list0
cat list0 > weekly.txt
(named like this for the Windows people)
rm list0
mailx user@isp.com < weekly.txt


The problem I am having is, When I use a remote shell, I am not able to get the disk status (voldisk list) or the disk mirroring status (volprint -A).
I get the following output:
voldisk: Command not found.
volprint: Command not found.


I need to get the status of the disks and have all the output placed in one file (list0) on one server and then emailed out. currently I have a basic scrip on 6 different servers meaning I am getting 6 different emails. I would like to have this all compiled and only one script on the 1st server.

Any help would be Appreciated!
 
Have you tried to call the voldisk and volprint utilities with full pathname ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thank you thank you thank you.

Now I can remove the script from all the servers except the first one.

BTW it works. I do not know why I did not think of this.

This is why these forums are so great.
 
jehixson
i know, this has no inpact, why not shell
have a look:

#!/bin/sh
USRLIST=user1,user2,user3,userN
SUBJECT=abcdefg

( voldisk list (status of all disks on the server)
.... more cmds
.... more cmds
.... more cmds
rsh (2nd remote server host name) find ....
) | mailx -s $SUBJECT $USRLIST

don't forget, RTFMP
:) guggach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top