2 # fixscript will replace this line with code to load innshellvars
5 ## Display status of INN.
6 ## Written by Landon Curt Noll <chongo@toad.com>.
10 SYSLOG_NOTICE=news.notice
11 SYSLOGS="${SYSLOG_CRIT} ${SYSLOG_ERR} ${SYSLOG_NOTICE}"
13 ## Set up the list of log files.
15 if [ -f "${MOST_LOGS}/`basename ${ERRLOG}`" ]; then
16 LOGS="${LOGS} `basename ${ERRLOG}`"
18 LOGS="${LOGS} ${ERRLOG}"
20 if [ -f "${MOST_LOGS}/`basename ${LOG}`" ]; then
21 LOGS="${LOGS} `basename ${LOG}`"
30 ## Show disk usage. You might have to change this.
33 ${INNDF} ${SPOOL} ${OVERVIEWDIR} ${PATHETC} ${INCOMING} ${BATCH} \
34 ${PATHDB} ${MOST_LOGS} | sort -u
36 ## Show size of batch files.
38 echo 'Batch file sizes:'
39 ( cd ${BATCH}; ls -Cs | sed 1d )
41 ## Show size of log files.
43 echo 'Log file sizes:'
44 ( cd ${MOST_LOGS}; ls -Cs ${LOGS} *.log 2>&1 )
46 ## Show the lock files
54 echo 'Innwatch is not running'
59 echo 'Server connections:'
60 ctlinnd -t60 name '' 2>&1 \
62 next if m/(^((rem|local)conn|control)|:proc|:file):/;
63 s/^(\S+):(\d+):.*:.*:.*$/${1}:${2}/;
65 $c{$1} = [] unless $c{$1};
73 foreach $f (sort {$#{$c{$b}} <=> $#{$c{$a}}} keys %c) {
74 printf "%-35.35s %3d (%s", $f, 1 + $#{$c{$f}}, "@{$c{$f}})\n";
77 printf "\n%-35s %3d\n", "TOTAL: $n", $m;