As of now, waiting records being monitored and being reported via email, I think, we should also include dead records in the same email, so that it would give us an idea how rapidly its increasing and help us address the cause and keep the DB size under control.
Following construct could be introduced either in waiting-record file or a different file (I prefer in same file as one email would be sufficient to refer)
===
(
echo " Dead Records"
echo " ============"
echo " "
echo "`ls |
while read list
do echo -n "$list : " ; grep "^D" $list | wc -l
done`" |
awk -F" : " '{print $2,":",$1}' | sort -n
) | mail -s "Dead Records - `date`" krkrishn@cisco.com
===
Following is the output I received:
===
Dead Records
============
0 : _server
0 : form
0 : lpopt
0 : region
0 : vlan
3 : user
18 : model
21 : vendhw
165 : loccode
499 : pserver
675 : sgroup
1112 : locsgrp
3369 : actsrv
8565 : dynip
11851 : netinfo
12652 : drsetting
158703 : main
167629 : alias
===
However, if the above construct is used, it would send two emails, one for waiting record and the other for dead record. So, to address this, output from awk could be stored in a variables and contents of variables could be given as input to 'mail' command to send email.
Ticket moved from /p/ceps/feature-requests/317/
Can't be converted: