ADSM-L

Re: ADSM Activity log

1999-06-15 09:45:51
Subject: Re: ADSM Activity log
From: "Agnew, Doug" <dagnew AT CHARLOTTEPIPE DOT COM>
Date: Tue, 15 Jun 1999 09:45:51 -0400
I ended up writing a small ADSM script and awk program to print the number
of errors by severity level, summarize the E's by message number and detail
out the 'S' and 'D' errors.  Then, if an 'E' error occurs that is of
interest, I see it the next day and can 'q act' to see the exact message.

Here's the ADSM script --
select 'DATE',max(current_date - $1 day) from Domains
select 'COUNT',severity,count(*) from actlog where date(date_time) =
current_date - $1 day group by severity
select severity, msgno, count(*), max(message) from actlog where
date(date_time) = current_date -$1 day and severity='E' group by
severity,msgno order by 3 desc
select severity,time(date_time),message from actlog where
date(date_time)=current_date - $1 day and severity in('S','D') order by 2

The awk program is --

BEGIN {
       FS=",";
      }
END   {
       print " "
       print "******  END OF REPORT *******"
      }
$1 ~ /DATE/ {
      print "ADSM Console Activity for",$2
      }
$1 ~ /COUNT/ {
      count_recs++
      if (count_recs == 1) print " "
      if (count_recs == 1) print "Message Count by Severity"
      print $3,"messages at severity",$2
      }
$1 ~ /^E$/ {
      error_recs++
      if (error_recs == 1) print " "
      if (error_recs == 1) print "Error messsages by frequency, with sample
text
"
      print "Count",$3,"Text:",$4
      }
$1 ~ /^[DS]$/ {
      severe_recs++
      if (severe_recs == 1) print " "
      if (severe_recs == 1) print "Severe messsages"
      print $2,$3
      }

The two are tied together with the following shell script, which is executed
via cron every day.

dsmadmc -id=admin -pass=xxxxx -commadelimited run console_report 1>
/tmp/console_report.txt
awk -f /home/tape/console_report.awk /tmp/console_report.txt >
/tmp/console_report.lst
lpr -Pop11 /tmp/console_report.lst



<Prev in Thread] Current Thread [Next in Thread>
  • Re: ADSM Activity log, Agnew, Doug <=