Substituting Zimbra statistic collectors with other means

Revision as of 20:26, 8 January 2011 by Singkoo (talk | contribs) (Substituting Zimbra statistics with other means)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Substituting Zimbra statistics with other means

Author - Sing Koo

Statistics in Zimbra is collected periodically. I am not suggesting anyone to run Zimbra with a blind eye by turning it off. Not having statistic is like doing just that navigating in the dark. However, there are alternate means of achieving the similar (or perhaps some what less) without paying for the overhead. For example, one can turn on JMX and uses JCONSOLE to monitor the performance of a JVM. If Zimbra is the only thing running in the JVM, you will be effectively monitoring its performance. The advantage of JCONSOLE is that you can run it from a remote client such as a desktop machine. Thus reliefs the server from collecting and rendering statistics. Zimbra statistic collection can become resource intensive, especially when you are using a low end server hardware. Beside JCONSOLE, there are other means that can do similar things, for example, Visual VM. For JCONSOLE, you have to turn on JMX in your JVM. For Visual VM, you have to run "jstatd" in the OS where Zimbra is residing. Either way, you will be incurring some processing and memory resource. If statistics is to be monitored outside the box, there may be some limited security risk if your environment is not protected by firewall correctly. Another thing to consider is that JCONSOLE or Visual VM are on demand monitors as compare to Zimbra statistic collectors which are full time processes. Therefore, before you perform the following procedure to stop the statistic collectors, you may want to evaluate different statistic and monitoring strategies.


The script responsible for launching statistic collectors is /opt/zimbra/bin/zmstatctl.

Locate with the script near line 130 for the following Perl script code:

       foreach my $tool (@TOOL_ALL) {
           my $cmd = "$toolpath/$tool";
           print "Invoking: $cmd\n";
           system("$cmd >> $outfile 2>&1 &");
       }
       if ($doMysql) {
           my $cmd = "$toolpath/$TOOL_MYSQL";
           print "Invoking: $cmd\n";
           system("$cmd >> $outfile 2>&1 &");
           if (!$isMac) {
                # doMysql implies that convertd is also on the system
                $cmd = "$toolpath/$TOOL_CONVERTD";
                print "Invoking: $cmd\n";
                system("$cmd >> $outfile 2>&1 &");
           }
       }
       if ($doMtaQueue) {
           my $cmd = "$toolpath/$TOOL_MTAQUEUE";
           print "Invoking: $cmd\n";
           system("$cmd >> $outfile 2>&1 &");
       }
       if ($doNginx) {
           my $cmd = "$toolpath/$TOOL_NGINX";
           print "Invoking: $cmd\n";
           system("$cmd >> $outfile 2>&1 &");
       }


Commenting out this segment of script will prevent the statistic scripts from being launched.

Jump to: navigation, search