2015-07-10 00:18:42 -04:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
#
|
2018-02-23 03:53:12 -05:00
|
|
|
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
2015-07-10 00:18:42 -04:00
|
|
|
#
|
2016-06-27 00:56:38 -04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2018-02-23 03:53:12 -05:00
|
|
|
#
|
|
|
|
|
# See the COPYRIGHT file distributed with this work for additional
|
|
|
|
|
# information regarding copyright ownership.
|
2015-07-10 00:18:42 -04:00
|
|
|
|
|
|
|
|
# server-xml.pl:
|
|
|
|
|
# Parses the XML version of the server stats into a normalized format.
|
|
|
|
|
|
|
|
|
|
use XML::Simple;
|
|
|
|
|
|
|
|
|
|
my $ref = XMLin("xml.stats");
|
|
|
|
|
my $counters = $ref->{server}->{counters};
|
|
|
|
|
foreach $group (@$counters) {
|
2017-04-23 21:17:18 -04:00
|
|
|
foreach $key (keys %{$group->{counter}}) {
|
2015-07-10 00:18:42 -04:00
|
|
|
print $group->{type} . " " . $key . ": ". $group->{counter}->{$key}->{content} . "\n";
|
|
|
|
|
}
|
|
|
|
|
}
|