Re: mksysb script



Yep: simply redirect stdout and stderr. (I use exec statements at the start
of my script).

It's worth considering using the verbose option. It significantly
increases the log size and usually it's of no interest at all but
occasionally it's valuable for debugging. It depends really how easy it is
for you to re-run a mksysb if you need to.

I've never done very well at scripting a check of the mksysb. If it fails,
that's clear enough but warnings are a bit tougher to distinguish: most of
them are OK, (typically /tmp or /var files which were deleted after the
mksysb started) but you can't tell that from the message numbers. The best
I've come up with is to say if it gets a "0512-038" message it's OK: if it
gets a "0512-003" it's probably OK but needs to be checked; if neither of
those is present it's no good.

--
Simon Green
Altria ITSC Europe s.a.r.l.

AIX-L Archive at https://lists.princeton.edu/listserv/aix-l.html

New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX

N.B. Unsolicited email from vendors will not be appreciated.
Please post all follow-ups to the list.


-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
Gergely Fóti
Sent: 13 April 2006 07:54
To: aix-l@xxxxxxxxxxxxx
Subject: Re: mksysb script


Hi Mark,

I didn't use mksysb that way before, but i think you can simply redirect the
output like "mksysb -i /dev/rmt0 > \tmp\output" (or you can use with nohup,
then all the outputs will be loged in nohup.out),
and you can verify the success of the command with if-then-else shell
built-ins like
if [ $? -eq 1 ]
then
Mail -s "mksysb: Error" your@xxxxxxxxxxxxx
else
Mail -s "mksysb: Success" your@xxxxxxxxxxxxx
fi
Or you can verify the whole image with "lsmksysb" for sure.



Relevant Pages

  • Re: Mksysb Script
    ... I have this script: ... echo `date`: Starting mksysb on $hostname>>$log ... Dave Zarnoch ...
    (AIX-L)
  • Re: Remote mksysb error handling
    ... It is just a script that runs a savevg (the command mksysb is running) and pipes it to another system. ... > ended up looking into the named pipe solution. ...
    (AIX-L)
  • Re: Mksysb Script
    ... echo `date`: Starting mksysb on $hostname>>$log ... mail -s "mksysb backup errors running $hostname mksysb.sh script" ... Dave Zarnoch ...
    (AIX-L)
  • Re: creating bootable mksysb?
    ... > or dvd-ram disk using the initial mksysb image on disk? ... The mksysb command is a shell script, you will learn a lot about ... restoring the image.data, bosinst.data, the correct kernel and about 120 ... Then you change the kernel to be tape bootable ...
    (comp.unix.aix)
  • newbie: how to run php from command line?
    ... I need to test a script and want to do so on a Linux box (logged in via SSH from another machine). ... Do I have to redirect STDOUT? ...
    (comp.lang.php)