Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-27-2008, 06:04 AM
Junior Member
 
Posts: 5
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
Reply With Quote
  #2 (permalink)  
Old 10-27-2008, 09:21 AM
Moderator
 
Posts: 6,237
Default

Welcome to the forums,

Could you file that in bugzilla?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.