swinstall and autoreboot


 
Thread Tools Search this Thread
Operating Systems HP-UX swinstall and autoreboot
# 1  
Old 05-02-2005
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

Last edited by Perderabo; 05-02-2005 at 11:24 AM.. Reason: Remove email address
# 2  
Old 05-02-2005
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.
# 3  
Old 05-02-2005
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
# 4  
Old 05-02-2005
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 ...
# 5  
Old 05-02-2005
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.
# 6  
Old 05-02-2005
Quote:
Originally Posted by schilukuri
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
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...
Code:
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

# 7  
Old 05-02-2005
Thank you all for the feedback
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

swinstall not working with target

Hi, I have installed a software using the command(swinstall -s /Softwares/Game.pkg AngryDog.nwr-cbin @/z_temp). During installation I didn't find any error, also I can find a folder structure(opt/angrydog...) getting created under "/z_temp" and all files are present. But software is not working.... (1 Reply)
Discussion started by: Thunderbird288
1 Replies

2. HP-UX

sos about swpackage AND swinstall

hi all, I just want to make a depot package.All steps: 1. make a psf file # PSF which define the myutil product depot layout_version 1.0 tag ddmi_linux_installer title ddmi_linux_installer # Product definition vendor tag HP title Hewlett-Packard Company product tag... (0 Replies)
Discussion started by: lb1111830
0 Replies

3. Solaris

swinstall: not found

i am having this error when i try to execute # swinstall -s /cdrom/volume_manager3.5/pkgs swinstall: not found anyone know why was it having this error? Thanks in advance. (2 Replies)
Discussion started by: beginningDBA
2 Replies

4. HP-UX

swinstall and swremove

can it have any command that swinstall and swremove without gui thanks (1 Reply)
Discussion started by: alert0919
1 Replies

5. HP-UX

swinstall issues

what the heck am I doing wrong? Im trying to install bastille and i keep getting errors. # cd - /var/spool/sw # ls B6849AA_B.02.01.03.depot catalog swagent.log var # swinstall -s /var/spool/sw B6849AA ======= 10/04/07 09:47:43 EDT BEGIN swinstall... (4 Replies)
Discussion started by: csaunders
4 Replies

6. HP-UX

How to run sqlscript in the swinstall ?

hi, I have prepared a script with contents /dboracle/orabase/product/9.2.0.6/bin/sqlplus -s rcrp/rcrp<<EOF CREATE TABLE ADDER_CUG_LIST ( CUG_ID VARCHAR2(15) NOT NULL, TEL_NO VARCHAR2(15), START_DATE DATE, END_DATE DATE ); exit; EOF ... (3 Replies)
Discussion started by: plaban.rout
3 Replies

7. HP-UX

swinstall

Hi, I am new to HP-UX. I am attempting some pre-requisites to an Oracle upgrade, part of which requires some OS patching. When I check using show_patches or swlist -l patch the patches do not exist. On visiting ItResource web page I see the patches and later "recommended" patches (that unlike... (2 Replies)
Discussion started by: malcqv
2 Replies

8. HP-UX

swinstall error

Our company recently purchased a couple of rp3440 machines. They arrived with HPUX 11.11 installed. The default setup has /lib as a symbolic link to /usr/lib. I wanted to use some of the enhanced features of GNU softare, so I went to the HP-UX Porting and Archive center and downloaded the Core... (2 Replies)
Discussion started by: SemiOfCol
2 Replies

9. HP-UX

Help with swinstall HP patches

I am having trouble installing some HPUX patches on my B1000 11.11. I am a novice at this so bear with me. I understand how to install depots. Very easy. Now I'm trying to patch my system so I can get the Oracle client installed. Oracle says I need these two patches: PHCO_23770, PHCO_23092 I... (4 Replies)
Discussion started by: natter
4 Replies

10. HP-UX

help with swinstall

I'm trying to install gcc from hp with swinstall but what happens is the following: I change source to the correct depot, it complains it can't find anything, when I change target to /usr/local, it shows the depot in the list. Next, I mark it for install, install it, but then it gets installed... (4 Replies)
Discussion started by: rein
4 Replies
Login or Register to Ask a Question