Need help for bash scripts

bashar_at_dhakacom.com
Date: 10/27/05

  • Next message: Syed, Shadman: "RE: failover through Sun Cluster 3.1 when both I/O paths are disconnected"
    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


  • Next message: Syed, Shadman: "RE: failover through Sun Cluster 3.1 when both I/O paths are disconnected"

    Relevant Pages

    • Re: Cant connect to remote computer.
      ... This script is run by the SMS system which runs the script locally ... users password to be the same as the local Local Admin ... in the windows OS when you authenticate on remote systems. ... Let's say you want to map a drive to a remote system and ...
      (microsoft.public.scripting.wsh)
    • Re: help!!! I accidently rm -rf a directory
      ... script with dnotify driven rsync/unison copy to a remote system ... If you don't commit every modification, ...
      (comp.os.linux.misc)
    • Using WMI to correctly identify the current user on a remote syste
      ... I'm working on a status script for deployment in our W2kSP4 and WXPSP1 ... logged into the remote system I receive faulty data. ... context of a user who has local admin rights on all the target systems. ... administrator, the code returns "null". ...
      (microsoft.public.scripting.wsh)
    • Using WMI to correctly identify the current user on a remote syste
      ... I'm working on a status script for deployment in our W2kSP4 and WXPSP1 ... logged into the remote system I receive faulty data. ... context of a user who has local admin rights on all the target systems. ... administrator, the code returns "null". ...
      (microsoft.public.scripting.wsh)
    • logging / flushing output
      ... I have a simple script that does a straightforward interactive chat ... remote system interspersed with the text from the ECHO statements. ... ECHO statements is going into another buffer that isn't being flushed. ...
      (comp.protocols.kermit.misc)