Need help for bash scripts
bashar_at_dhakacom.com
Date: 10/27/05
- Previous message: r.polanskis_at_uws.edu.au: "netboot v240 from bge1?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 27 Oct 2005 16:18:01 +0600 (BDT) To: <sunmanagers@sunmanagers.org>
Hi Guys,
Can any one help me to write a bash script which will perform the bellow
tasks?
"
Monitor processes on a remote system
a) Write a bash script located on server1 and named "/usr/bin/rtop" which
takes the hostname of the remote system as the only parameter. The tasks
of the script are:
- Use authentication keys to get the required information from the remote
system.
- Use top min its batch mode to monitor the processes on the remote system.
Hint:
When calling top on remote system it will most likely complain about "TERM
environment variable not set". Use "TERM=xterm top ...." to execute top.
- the delay between the cycles of top shall be 5 seconds.
- Execute top for 12 cycles (ie. ome minute in total).
- Write the output of top to a file located on server1 in the directory
/var/log/top/. The syntax of the filename has to be like this one"
/var.log/top/{hostname}-{date}.
An example would be: /var/log/top/server10-2004-09-12-10:14
Be sure to use the actual hostname of the machine top is running on, do
not set this by default to "server2"! (The script shall be flexible,
although in this scenario there is only one remote system available). For
date information use the time when starting top.
b) Run the script at least once to create output files.
"
Thanks in advance.
Best regards,
Bashar.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Previous message: r.polanskis_at_uws.edu.au: "netboot v240 from bge1?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|