Bugfix: zmstat.out dramatically increasing in size with 'uninitialized' warnings for list variable

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
OliverR
Posts: 2
Joined: Wed May 29, 2019 8:54 pm

Bugfix: zmstat.out dramatically increasing in size with 'uninitialized' warnings for list variable

Postby OliverR » Wed May 29, 2019 9:30 pm

After fresh install of Zimbra 8.8 on Ubuntu 18.04.2 LTS I encountered issues with zmstat.out file increasing dramatically in short time (several hundred gigs in minutes) along with high CPU load.

zmstat.out mentioned issues with uninitialized variable $list in the /opt/zimbra/libexec/zmstat-io perl script on line 76.

After checking the line and comparing the output of /usr/bin/iostat, I figured the latter had no : after the Device entry.

Code: Select all

zimbra@sol:~$ iostat
Linux 4.15.0-50-generic (sol)   05/29/2019      _x86_64_        (2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          20.41    8.96    9.80    7.28    0.00   53.55

Device             tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sdc              27.82      1117.57      4601.60  119308677  491252548
sda              74.38      4111.18      2056.85  438896128  219582696
sdb              46.77      2488.03      4601.61  265614472  491253852
md1               0.00         0.04         0.00       4528         60
md3              65.43      3585.30      4580.76  382754949  489026940
md2              15.71        21.68        41.18    2314220    4396760


The zmstat-io perl script should thus have replaced all 5 occasions of the search string Device: by Device

Example:

Wrong code:

Code: Select all

while ($line !~ /^avg-cpu/ && $line !~ /^Device:/) {


Corrected code:

Code: Select all

while ($line !~ /^avg-cpu/ && $line !~ /^Device/) {


Hth!


User avatar
DualBoot
Elite member
Elite member
Posts: 1073
Joined: Mon Apr 18, 2016 8:18 pm
Location: Earth
ZCS/ZD Version: ZCS FLOSS - 8.7.11 Mutli servers

Re: Bugfix: zmstat.out dramatically increasing in size with 'uninitialized' warnings for list variable

Postby DualBoot » Thu Jun 27, 2019 9:17 am

Hi,

nice job. I got into that problem with Ubuntu 16.04 ZCS OSE 8.8.12 and I could solved it.

Regards,

Return to “Developers”

Who is online

Users browsing this forum: No registered users and 2 guests