Results 1 to 2 of 2

Thread: [Improvement] Getting disk statistics even for near-full disks

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    7

    Lightbulb [Improvement] Getting disk statistics even for near-full disks

    Hello,

    I was running some tests with near-full disks (>80%) and noticed that I do get plenty of mails (thanks!), but the disk usage for that period is not available in the disk usage graphs.

    If you want this (IMHO critical) period to be visible from your server logs as well, apply the following patch to /opt/zimbra/libexec/zmdisklog:

    Code:
    --- zmdisklog--	2008-10-27 13:41:57.000000000 +0100
    +++ zmdisklog	2008-10-27 13:45:20.000000000 +0100
    @@ -89,13 +89,12 @@
         my $pct=int(($used/$total)*100) if ($total > 0);
         #print "TOTAL: $total USED: $used AVAIL: $avail PCT: $pct\n";
         my $lvl = "info";
         $lvl = "err" if ($pct > $DISK_WARN_THRESHOLD);
         $lvl = "crit" if ($pct > $DISK_CRIT_THRESHOLD);
    -    if ($lvl eq "info") {
    -		  Zimbra::Mon::Logger::Log( "$lvl", "$dt, DISK: ${hostname}: dev: $dev, mp: $mp, tot: $total, avail: $avail" );
    -    } else {
    +    Zimbra::Mon::Logger::Log( "info", "$dt, DISK: ${hostname}: dev: $dev, mp: $mp, tot: $total, avail: $avail" );
    +    if ($lvl ne "info") {
     		  Zimbra::Mon::Logger::Log( "$lvl", "Disk warning: ${hostname} $dev at $pct%" );
         }
     	}
       alarm(0);
     }
    This will make sure that the current disk usage is always logged (and thus later rendered into the statistics), even if a disk full warning is also generated.

    -Marcel

  2. #2
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Welcome to the forums,

    Could you file that in bugzilla?

Similar Threads

  1. Daily mail report always reports "No messages found"
    By McPringle in forum Installation
    Replies: 42
    Last Post: 06-13-2011, 09:57 AM
  2. Zimbra Disk Statistics, non-EXT3 Volumes
    By ccmacmil in forum Administrators
    Replies: 6
    Last Post: 04-07-2008, 10:59 AM
  3. server statistics for disk usage
    By melody in forum Administrators
    Replies: 2
    Last Post: 03-27-2008, 07:28 AM
  4. Disk statistics not being logged
    By jstrat in forum Administrators
    Replies: 4
    Last Post: 08-24-2006, 08:36 AM
  5. Possible bug in disk statistics page generation
    By gentoo_matt in forum Developers
    Replies: 4
    Last Post: 05-08-2006, 03:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •