INN commit: branches/2.6/scripts (innstat.in)

INN Commit rra at isc.org
Tue Nov 28 20:48:45 UTC 2017


    Date: Tuesday, November 28, 2017 @ 12:48:45
  Author: iulius
Revision: 10196

innstat:  monitor disk usage of more directories, and add the unit

In daily Usenet reports, add disk usage for archive, http and tmp
directories.  Also mention the unit of the size of batch and log
files.

Modified:
  branches/2.6/scripts/innstat.in

------------+
 innstat.in |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

Modified: innstat.in
===================================================================
--- innstat.in	2017-11-28 20:48:08 UTC (rev 10195)
+++ innstat.in	2017-11-28 20:48:45 UTC (rev 10196)
@@ -30,8 +30,15 @@
 ##  Show disk usage.  You might have to change this.
 echo ''
 echo 'Disk usage:'
-${INNDF} ${SPOOL} ${OVERVIEWDIR} ${PATHETC} ${INCOMING} ${BATCH} \
-	${PATHDB} ${MOST_LOGS} | ${SORT} -u
+DISKUSAGE="${SPOOL} ${OVERVIEWDIR} ${PATHETC} ${INCOMING} ${BATCH}"
+DISKUSAGE="${DISKUSAGE} ${PATHDB} ${TMPDIR} ${MOST_LOGS}"
+if [ -d "${PATHARCHIVE}" ]; then
+    DISKUSAGE="${DISKUSAGE} ${PATHARCHIVE}"
+fi
+if [ -d "${PATHHTTP}" ]; then
+    DISKUSAGE="${DISKUSAGE} ${PATHHTTP}"
+fi
+${INNDF} ${DISKUSAGE} | ${SORT} -u
 
 ##  Show overview usage for buffindexed.
 [ ${OVMETHOD} = 'buffindexed' ] && {
@@ -42,12 +49,12 @@
 
 ##  Show size of batch files.
 echo ''
-echo 'Batch file sizes:'
+echo 'Batch file sizes (in Kbytes):'
 ( cd ${BATCH}; ls -Cs | sed 1d )
 
 ##  Show size of log files.
 echo ''
-echo 'Log file sizes:'
+echo 'Log file sizes (in Kbytes):'
 ( cd ${MOST_LOGS}; ls -Cs ${LOGS} *.log 2>&1 )
 
 ##  Show the lock files
@@ -71,7 +78,7 @@
      m/^(\S+):(\d+)$/;
      $c{$1} = [] unless $c{$1};
      @l = @{$c{$1}};
-     push @l, $2;
+     push(@l, $2);
      $c{$1} = [@l];
      $m++;
  



More information about the inn-committers mailing list