Amanda-Users

I want to make the shell script to judge the amdump Success or Failed with no mail.

2007-12-21 08:35:23
Subject: I want to make the shell script to judge the amdump Success or Failed with no mail.
From: "Yoshihiro Ishikawa" <chiyotsu AT gmail DOT com>
To: amanda-users AT amanda DOT org
Date: Fri, 21 Dec 2007 22:26:01 +0900
Hello list,  
my English is bad, so  I want your amnesty.
 
I used
-----------------------------
Red Hat Enterprise Linux Server release 5 (Tikanga)
build: VERSION="Amanda-2.5.0p2"
       BUILT_DATE="Tue Dec 11 14:10:30 JST 2007"
------------------------------
 
So, my question is what is the best solution to judge the ※"last amdump result" Success or Failed with no mail.
※"last amdump result" is the adjacent amdump result.
 
First of all,I checked the amadmin command(amadmin DailySet01 find --sort d), but that wasn't complete.
I experienced to show the no line  when the amdump was failed.
Second of all, I checked the "amdump.1 log". But I don't know the all pattern about Success or Failed.
I know the next line's script isn't enough.
"less DailySet01/amdump.1 | grep -e -i "fail\|missing\|error"
 
Third of all, I checked the "amreport command". But that includes amreport's log.
Example: "amreport: ERROR unexpexted log line...."

I made the output  to do next line's script.
"$ amreport DailySet1 -f outputfile
 $ grep -e -i "fail\|missing\|error" outputfile"
 
At least amreport is not a chance because it includes amreport's log.

Please tell me the best solution to judge "last amdump result" Success or Failed with no mail.
I want to know the simple solution!


Best Regards,
Yoshihiro.

<Prev in Thread] Current Thread [Next in Thread>