AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  SMIT in the background

    Posted Fri October 06, 2006 02:09 PM

    Originally posted by: SystemAdmin


    Is there any way that i can put a running process started with SMIT in the background so i can close the session and the process can keep running? Regards =D
    #AIX-Forum


  • 2.  Re: SMIT in the background

    Posted Sat October 07, 2006 12:45 AM

    Originally posted by: esv



    smit was desinged to be used interactibly, but there are two possible solutions to your request.

    1. when ready to type enter to fire the command, instead of <enter> type F6, you
    might need to type <esc>-6 for some terminal emulations, smit will print the
    script to execute, copy it and throw it into a file , lets say.. /opt/smit/scipt/script1.sh,

    2. give it read and execute permissions to it..
    chmod o+rx /opt/smit/scipt/script1.sh

    3. execute it via the at facility...

    echo '/opt/smit/scipt/script1.sh > /tmp/script1.log 2>&1 ' | at now

    4. logoff the system.

    the second option would be more obfuscated....

    1.- download and install the "screen" program.. it is a opensource program.
    2.- Once you logged in the box use "screen ksh" to spawn a screen shell.
    3.- fire smitty using the normal process...
    4.- execute the command u want ....
    5.- while executing type <ctrl>-x
    this will detach ur screen session from your login session...
    6.- logoff
    7 log back in using the same userid as before.
    8- type "screen -x " to reattach to your old screen session
    9. your smitty session should still be there.

    regards,
    enrique.
    #AIX-Forum


  • 3.  Re: SMIT in the background

    Posted Mon October 09, 2006 08:17 AM

    Originally posted by: SystemAdmin


    If you are on aix 5.3 and you have already kicked off some long-running smit command, you can try this:

    • start a shell with F9 or use a different terminal session
    • find smit's PID "ps -ef|grep smit"
    • ps -T [i]<PID-of-smit>[/i] shows you which child processes were spawned
    • run "nohup -p [i]<pid-of-smit-child-process>[/i]" for the smit process and all the processes' pids which you want to keep on running after you log off.
    • log off

    Joachim Gann
    #AIX-Forum


  • 4.  VNC recommended for next time :-)

    Posted Tue October 10, 2006 08:46 AM

    Originally posted by: nagger


    I recommend using VNC to run a X Windows session.
    You can then access the session via the vncviewer.

    You can later break the connection and rejoin it later on and every thing carries on running.

    For example, start some command at work, disconnect and when you get home reconnect over the web and the VNC/X Windows session is still running with all your xterms, smit panels, graphical application, WebSM to a HMC, etc.

    I use this every day and all day.
    #AIX-Forum


  • 5.  Re: VNC recommended for next time

    Posted Tue October 10, 2006 09:04 AM

    Originally posted by: SystemAdmin


    I totally agree with the VNC usage. If you normally use the WebSM client to connect to an HMC, use VNC to connect to your AIX server, then use wsm -host <HMC> and your response will be many times faster than the client connection.
    #AIX-Forum