Question about Error Report script

Hi

i need to understand what "errpt -s 0328000014" will do in script.
will this only capture data for 28th march at 00:00 hrs. if issue happen it is ok else nothing
or for 28th march and onwords it will run and and check every day at 00:00 hrs for issue to occur

below is the snippet taken from script

 
#!/bin/ksh
while true
do
for i in ds51tp1 ds55tp1 ds59tp1 ds63tp1
do
rsh $i errpt -s 0917000013 > $i.out
grep 'SOFTWARE PROGRAM ABNORMALLY TERMINATED' $i.out
if [ $? = 0 ];then
rsh $i "cp -p /node/alarms.out.?? /work/"
rsh $i "cp -p err/node/*core /work/"
rsh $i "gzip /work/alarms.out.?? /work/*core*"
echo capture alarms files on $i
exit
fi
done | tee -a collectErrptLogs.out.$$
sleep 180
done

thx in advance and sorry if my question looks vague.

Scriptor

From man errpt

       -s StartDate
            Specifies all records posted on and after the StartDate variable, where the StartDate variable has the format mmddhhmmyy (month, day, hour, minute, and year).

The rest of the script iterates through the list of servers, opens rsh connections to run the commands, write files and collect the files.
You could have a look at the man pages next time yourself. If you don't have access to them, you can find any command online easily yourself in the IBM Info Center.

The command is AIX specific, while the rest of the script is not. Moving it to the AIX forum though.

1 Like