Sergey Andreyev
2014-09-09 11:37:59 UTC
Hello!
It seems like monitorix's net.pm got in trouble again with new release of
FreeBSD.
I have installed monitorix using pkg and found out that Network usage
graphs are empty while packets and errors are high.
After some research I have found that trouble is in the line with condition
for FreeBSD version check.
Here is my configuration:
uname -a
FreeBSD apt 10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #0: Tue Jul 8 06:34:23
UTC 2014 ***@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
i386
pkg info|grep monitorix
monitorix-3.5.1 Web based monitoring system
part of NET graph from monitorix.conf
# NET graph
#
-----------------------------------------------------------------------------
<net>
list = vr0, ste0
<desc>
vr0 = FastEthernet LAN, 0, 1000
ste0 = FastEthernet WAN, 0, 1000
</desc>
gateway = vr0
</net>
I had to comment this check in net.pm
# Idrop column added in 8.0
if($config->{kernel} gt "7.2")
and leave parse line as for 8.0 and higher version as is.
(undef, undef, undef, undef, $net_packs_in[$n], $net_error_in[$n], undef,
$net_bytes_in[$n], $net_packs_out[$n], $net_error_out[$n],
$net_bytes_out[$n]) = split(' ', $_);
Then Monitorix is working as intended.
So it seems like that "$config->{kernel} gt "7.2" is not working for
FreeBSD 10.0
I did not dig deeper in the code to find out how does that
$config->{kernel} variable sets, but I can guess it has trouble with its
length, may be it parses 10.0 to 0.0, but i don't know :)
It seems like monitorix's net.pm got in trouble again with new release of
FreeBSD.
I have installed monitorix using pkg and found out that Network usage
graphs are empty while packets and errors are high.
After some research I have found that trouble is in the line with condition
for FreeBSD version check.
Here is my configuration:
uname -a
FreeBSD apt 10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #0: Tue Jul 8 06:34:23
UTC 2014 ***@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
i386
pkg info|grep monitorix
monitorix-3.5.1 Web based monitoring system
part of NET graph from monitorix.conf
# NET graph
#
-----------------------------------------------------------------------------
<net>
list = vr0, ste0
<desc>
vr0 = FastEthernet LAN, 0, 1000
ste0 = FastEthernet WAN, 0, 1000
</desc>
gateway = vr0
</net>
I had to comment this check in net.pm
# Idrop column added in 8.0
if($config->{kernel} gt "7.2")
and leave parse line as for 8.0 and higher version as is.
(undef, undef, undef, undef, $net_packs_in[$n], $net_error_in[$n], undef,
$net_bytes_in[$n], $net_packs_out[$n], $net_error_out[$n],
$net_bytes_out[$n]) = split(' ', $_);
Then Monitorix is working as intended.
So it seems like that "$config->{kernel} gt "7.2" is not working for
FreeBSD 10.0
I did not dig deeper in the code to find out how does that
$config->{kernel} variable sets, but I can guess it has trouble with its
length, may be it parses 10.0 to 0.0, but i don't know :)
--
with best regards
Sergey Andreyev
with best regards
Sergey Andreyev