swinstall and autoreboot

HI
I am new on unix admin. I would like to know, if it is possible to
a. install the patch (like phss_25277) during normal business hours and
b. reboot the server during off peak hours on a production box

c. what is the normal practise for the patch installs on hp-ux (PA-RISC, B.11.11) boxes

thanks
sarma

Please make sure that you have read our rules. And note:
(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums.

As for your question: I have never tried anything quite like that. There is a way to install several patches at once and do only a single reboot after they all do in. I have done that. But I wouldn't try to let users use the box between patch installation and reboot. This addresses the "what is normal" part of your question.

But if you want to try, it is possible. Just leave off the "-x autoreboot=true " during swinstall.

HI
You replied :
There is a way to install several patches at once and do only a single reboot after they all do in.

How do you go about doing that ?

Also, if in the patch description, Autoreboot = Yes => that the patch will attempt to reboot after the instal or the -x autoreboot =y controls that behavior

thanks

check to make sure the patches you want to install do not impact the kernel or any system-critical processes ... if they do, i highly suggest you do the patching after you boot off all the users, get the system to as quiet a state as possible before patching it ... then reboot as required ... unless you want to run the risk of having to rebuild your server ...

I can tell you normal at my company is to schedule a maintenance window and then patch and reboot all at the same time. that is IF the patches require a reboot. Or if you wish to reboot to test the patch if it is related to a startup function.

If the patch is truly non-invasive, I would pick an off-hours time after the production day is done or has slowed down to a crawl. So as to have the least impact if anything goes awry.

I would never recommend patching during the production day. Unless you know for a fact that the patch is non-intrusive which includes any software that the users might be accessing in their normal course of work. Even though the box may not require rebooting some patches can affect services on the box and inturn affect the users.

Most patches seem to involve a reboot and thus it's been a while since I saw a patch that didn't what a reboot. But I think it works like this... a patch knows if it wants a reboot or not. After installation, you will get a message asking you want to reboot now. The -x autoreboot=y makes swinstall avoid that message and simply reboot. But I don't think it will reboot if the patch didn't want a reboot.

Here are my notes about consolidating patches...

Consolidated Installation of Patches

This procedure must be performed in multi-user mode.  It depends
on swagentd working and this daemon requires networking to be running or
it will hang.

1) First step is to acquire the individual depots of the patches to install.

      devhp2 # ls *.depot
      PHCO_11817.depot  PHKL_14061.depot  PHNE_16472.depot
      PHKL_13281.depot  PHKL_16409.depot

2) Create an empty destination directory

      devhp2 # mkdir /tmp/patch

3) Run "swcopy -s /dir/PHxx_yyyy.depot PHxx_yyyy @ /tmp/patch" for each
   patch.  Note that full path names are required for each of the file
   parameters.  The swcopy command seems to key on the leading slash.
   I use ksh so I just used a loop for this step.  I got mucho output
   which is all shown below.  There are many screwy messages here but 
   I just ignored them.

      devhp2 # for x in *.depot ; do
      > swcopy -s /export1/p/$x ${x%%.*} @ /tmp/patch
      > done
      
      =======  09/30/98 17:55:25 EDT  BEGIN swcopy SESSION (non-interactive)
      
             * Session started for user "root@devhp2".
               
             * Beginning Selection Phase.
             * "devhp2:/tmp/patch":  This target does not exist and will be
               created.
             * "devhp2:/export1/p/PHCO_11817.depot":  This source is a
               tape device.
             * "devhp2:/export1/p/PHCO_11817.depot":  Cannot open the
               logfile on this target or source.  Possibly the media is
               read-only or there is a permission problem.  Check the daemon
               logfile and "/var/tmp/swagent.log" on this host for more
               information.
             * Source:                 /export1/p/PHCO_11817.depot
             * Targets:                devhp2:/tmp/patch
             * Software selections:
                   PHCO_11817.PHCO_11817,r=B.10.00.00.AA,a=HP-UX_B.10.10_700/800,v=HP
             * Selection Phase succeeded.
               
               
             * Beginning Analysis Phase.
             * Session selections have been saved in the file
               "/home/p/.sw/sessions/swcopy.last".
             * The analysis phase succeeded for "devhp2:/tmp/patch".
             * Analysis Phase succeeded.
               
               
             * Beginning Execution Phase.
             * The execution phase succeeded for "devhp2:/tmp/patch".
             * Execution Phase succeeded.
               
               
      NOTE:    More information may be found in the agent logfile (location
               is devhp2:/tmp/patch/swagent.log).
      
      =======  09/30/98 17:55:38 EDT  END swcopy SESSION (non-interactive)
      
      
      =======  09/30/98 17:55:39 EDT  BEGIN swcopy SESSION (non-interactive)
      
             * Session started for user "root@devhp2".
               
             * Beginning Selection Phase.
             * Target connection succeeded for "devhp2:/tmp/patch".
             * "devhp2:/export1/p/PHKL_13281.depot":  This source is a
               tape device.
             * "devhp2:/export1/p/PHKL_13281.depot":  Cannot open the
               logfile on this target or source.  Possibly the media is
               read-only or there is a permission problem.  Check the daemon
               logfile and "/var/tmp/swagent.log" on this host for more
               information.
             * Source:                 /export1/p/PHKL_13281.depot
             * Targets:                devhp2:/tmp/patch
             * Software selections:
                   PHKL_13281.PHKL_13281,r=B.10.00.00.AA,a=HP-UX_B.10.10_800,v=HP
             * Selection Phase succeeded.
               
               
             * Beginning Analysis Phase.
             * Session selections have been saved in the file
               "/home/p/.sw/sessions/swcopy.last".
             * The analysis phase succeeded for "devhp2:/tmp/patch".
             * Analysis Phase succeeded.
               
               
             * Beginning Execution Phase.
             * The execution phase succeeded for "devhp2:/tmp/patch".
             * Execution Phase succeeded.
               
               
      NOTE:    More information may be found in the agent logfile (location
               is devhp2:/tmp/patch/swagent.log).
      
      =======  09/30/98 17:55:49 EDT  END swcopy SESSION (non-interactive)
      
      
      =======  09/30/98 17:55:50 EDT  BEGIN swcopy SESSION (non-interactive)
      
             * Session started for user "root@devhp2".
               
             * Beginning Selection Phase.
             * Target connection succeeded for "devhp2:/tmp/patch".
             * "devhp2:/export1/p/PHKL_14061.depot":  This source is a
               tape device.
             * "devhp2:/export1/p/PHKL_14061.depot":  Cannot open the
               logfile on this target or source.  Possibly the media is
               read-only or there is a permission problem.  Check the daemon
               logfile and "/var/tmp/swagent.log" on this host for more
               information.
             * Source:                 /export1/p/PHKL_14061.depot
             * Targets:                devhp2:/tmp/patch
             * Software selections:
                   PHKL_14061.PHKL_14061,r=B.10.00.00.AA,a=HP-UX_B.10.10_800,v=HP
             * Selection Phase succeeded.
               
               
             * Beginning Analysis Phase.
             * Session selections have been saved in the file
               "/home/p/.sw/sessions/swcopy.last".
             * The analysis phase succeeded for "devhp2:/tmp/patch".
             * Analysis Phase succeeded.
               
               
             * Beginning Execution Phase.
             * The execution phase succeeded for "devhp2:/tmp/patch".
             * Execution Phase succeeded.
               
               
      NOTE:    More information may be found in the agent logfile (location
               is devhp2:/tmp/patch/swagent.log).
      
      =======  09/30/98 17:56:00 EDT  END swcopy SESSION (non-interactive)
      
      
      =======  09/30/98 17:56:00 EDT  BEGIN swcopy SESSION (non-interactive)
      
             * Session started for user "root@devhp2".
               
             * Beginning Selection Phase.
             * Target connection succeeded for "devhp2:/tmp/patch".
             * "devhp2:/export1/p/PHKL_16409.depot":  This source is a
               tape device.
             * "devhp2:/export1/p/PHKL_16409.depot":  Cannot open the
               logfile on this target or source.  Possibly the media is
               read-only or there is a permission problem.  Check the daemon
               logfile and "/var/tmp/swagent.log" on this host for more
               information.
             * Source:                 /export1/p/PHKL_16409.depot
             * Targets:                devhp2:/tmp/patch
             * Software selections:
                   PHKL_16409.PHKL_16409,r=B.10.00.00.AA,a=HP-UX_B.10.10_800,v=HP
             * Selection Phase succeeded.
               
               
             * Beginning Analysis Phase.
             * Session selections have been saved in the file
               "/home/p/.sw/sessions/swcopy.last".
             * The analysis phase succeeded for "devhp2:/tmp/patch".
             * Analysis Phase succeeded.
               
               
             * Beginning Execution Phase.
             * The execution phase succeeded for "devhp2:/tmp/patch".
             * Execution Phase succeeded.
               
               
      NOTE:    More information may be found in the agent logfile (location
               is devhp2:/tmp/patch/swagent.log).
      
      =======  09/30/98 17:56:12 EDT  END swcopy SESSION (non-interactive)
      
      
      =======  09/30/98 17:56:13 EDT  BEGIN swcopy SESSION (non-interactive)
      
             * Session started for user "root@devhp2".
               
             * Beginning Selection Phase.
             * Target connection succeeded for "devhp2:/tmp/patch".
             * "devhp2:/export1/p/PHNE_16472.depot":  This source is a
               tape device.
             * "devhp2:/export1/p/PHNE_16472.depot":  Cannot open the
               logfile on this target or source.  Possibly the media is
               read-only or there is a permission problem.  Check the daemon
               logfile and "/var/tmp/swagent.log" on this host for more
               information.
             * Source:                 /export1/p/PHNE_16472.depot
             * Targets:                devhp2:/tmp/patch
             * Software selections:
                   PHNE_16472.PHNE_16472,r=B.10.00.00.AA,a=HP-UX_B.10.10_800,v=HP
             * Selection Phase succeeded.
               
               
             * Beginning Analysis Phase.
             * Session selections have been saved in the file
               "/home/p/.sw/sessions/swcopy.last".
             * The analysis phase succeeded for "devhp2:/tmp/patch".
             * Analysis Phase succeeded.
               
               
             * Beginning Execution Phase.
             * The execution phase succeeded for "devhp2:/tmp/patch".
             * Execution Phase succeeded.
               
               
      NOTE:    More information may be found in the agent logfile (location
               is devhp2:/tmp/patch/swagent.log).
      
      =======  09/30/98 17:56:25 EDT  END swcopy SESSION (non-interactive)
      
4)  Here is what /tmp/patch should look like now.

      devhp2 # ls /tmp/patch
      PHCO_11817   PHKL_14061   PHNE_16472   swagent.log
      PHKL_13281   PHKL_16409   catalog

5)  Now we need to register the depot.

      devhp2 # swreg -l depot /tmp/patch
      
      =======  09/30/98 17:57:04 EDT  BEGIN swreg SESSION (non-interactive)
      
             * Session started for user "root@devhp2".
               
             * Beginning Selection Phase.
             * Targets:                devhp2
             * Objects:                /tmp/patch
             * Selection Phase succeeded.
               
               
      
      =======  09/30/98 17:57:04 EDT  END swreg SESSION (non-interactive)
      
6)  Remove lock file.  HP's documentation left the "s" off products.
    If this file exists you must remove it.  

      devhp2 # rm /var/adm/sw/products/swlock

7)  Restart the swagent daemon.
      devhp2 # swagentd -r

8)  Final step, install the patches.

      devhp2 # swinstall -x autoreboot=true -x match_target=true -s /tmp/patch
      
      =======  09/30/98 18:02:03 EDT  BEGIN swinstall SESSION
               (non-interactive)
      
             * Session started for user "root@devhp2".
               
             * Beginning Selection Phase.
             * Target connection succeeded for "devhp2:/".
             * Source connection succeeded for "devhp2:/tmp/patch".
      WARNING: The software specified contains a kernel fileset.  It will be
               necessary to reconfigure and reboot the system to make the
               kernel software functional.
             * Source:                 /tmp/patch
             * Targets:                devhp2:/
             * Software selections:
                   PHCO_11817.PHCO_11817,r=B.10.00.00.AA,a=HP-UX_B.10.10_700/800,v=HP
                   PHKL_13281.PHKL_13281,r=B.10.00.00.AA,a=HP-UX_B.10.10_800,v=HP
                   PHKL_14061.PHKL_14061,r=B.10.00.00.AA,a=HP-UX_B.10.10_800,v=HP
                   PHKL_16409.PHKL_16409,r=B.10.00.00.AA,a=HP-UX_B.10.10_800,v=HP
                   PHNE_16472.PHNE_16472,r=B.10.00.00.AA,a=HP-UX_B.10.10_800,v=HP
             * Selection Phase succeeded.
               
               
             * Beginning Analysis Phase.
             * Session selections have been saved in the file
               "/home/p/.sw/sessions/swinstall.last".
             * The analysis phase succeeded for "devhp2:/".
             * Analysis Phase succeeded.
               
               
             * Beginning Execution Phase.
             * The execution phase succeeded for "devhp2:/".
             * Execution Phase succeeded.
               
               
      NOTE:    More information may be found in the agent logfile (location
               is devhp2:/var/adm/sw/swagent.log).
      
      =======  09/30/98 18:06:03 EDT  END swinstall SESSION (non-interactive)
      
      devhp2 # 
      script done due to signal on Wed Sep 30 18:06:05 1998

Thank you all for the feedback