Re: mksysb script
- From: "Green, Simon" <Simon.Green@xxxxxxxxxxxxx>
- Date: Thu, 13 Apr 2006 12:49:28 +0200
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.
- Prev by Date: Re: Bad auto-negotiate on network adapter ...
- Next by Date: How do you create a stanza to email root certain type of error conditions
- Previous by thread: Re: mksysb script
- Next by thread: How do you create a stanza to email root certain type of error conditions
- Index(es):
Relevant Pages
|
|