mirror of https://github.com/mikaku/Monitorix.git
included the Status Word 'o' when selecting the peer in 'ntp.pm'
This commit is contained in:
parent
85c7cc2e9f
commit
dcce87e826
2
Changes
2
Changes
|
@ -30,6 +30,8 @@ N.N.N - DD-MMM-2015
|
||||||
- Added a message in 'libvirt.pm' if the MAC address of a VM is not found.
|
- Added a message in 'libvirt.pm' if the MAC address of a VM is not found.
|
||||||
- Added Slovak translation to monthly reports. [#157]
|
- Added Slovak translation to monthly reports. [#157]
|
||||||
- Improved a bit the documentation of socked type in MySQL. [#47]
|
- Improved a bit the documentation of socked type in MySQL. [#47]
|
||||||
|
- Included the Status Word 'o' when selecting the peer in 'ntp.pm'.
|
||||||
|
(suggested by Jeroen Kik, monitorix AT steelyard.nl)
|
||||||
- Fixed in 'libvirt.pm' limiting to 100 all CPU values greater than 100.
|
- Fixed in 'libvirt.pm' limiting to 100 all CPU values greater than 100.
|
||||||
- Fixed in 'libvirt.pm' to hide empty groups.
|
- Fixed in 'libvirt.pm' to hide empty groups.
|
||||||
(thanks to Pavel Bauer, pbauer AT algotech.cz for pointing this out)
|
(thanks to Pavel Bauer, pbauer AT algotech.cz for pointing this out)
|
||||||
|
|
|
@ -151,12 +151,13 @@ sub ntp_update {
|
||||||
my $e = 0;
|
my $e = 0;
|
||||||
foreach my $h (split(',', $ntp->{list})) {
|
foreach my $h (split(',', $ntp->{list})) {
|
||||||
$h = trim($h);
|
$h = trim($h);
|
||||||
open(IN, "ntpq -pn $args $h |");
|
open(IN, "ntpqq -pn $args $h |");
|
||||||
@data = <IN>;
|
@data = <IN>;
|
||||||
close(IN);
|
close(IN);
|
||||||
$cod = $str = $del = $off = $jit = 0;
|
$cod = $str = $del = $off = $jit = 0;
|
||||||
foreach(@data) {
|
foreach(@data) {
|
||||||
if(/^\*/) {
|
# select the first peer with Status Word as '*' or 'o'
|
||||||
|
if(/^[\*o]/) {
|
||||||
(undef, $cod, $str, undef, undef, undef, undef, $del, $off, $jit) = split(' ', $_);
|
(undef, $cod, $str, undef, undef, undef, undef, $del, $off, $jit) = split(' ', $_);
|
||||||
$cod =~ s/\.//g;
|
$cod =~ s/\.//g;
|
||||||
chomp($jit);
|
chomp($jit);
|
||||||
|
|
Loading…
Reference in New Issue