1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 02:18:08 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -16,13 +16,13 @@
$XM = '/usr/sbin/xm';
$XMTOP = '/usr/sbin/xentop';
# ah, parameters coming in
# ah, parameters coming in
if ( defined($ARGV[0]))
{
if ($ARGV[0] eq 'config') { $arg = 'config'; }
if ($ARGV[0] eq 'autoconf') { $arg = 'autoconf'; }
if ( $arg eq 'autoconf' )
if ( $arg eq 'autoconf' )
{
if ( -e $XM && -e $XMTOP )
{
@ -35,7 +35,7 @@ if ( defined($ARGV[0]))
exit 0;
}
}
if ( $arg eq 'config' )
{
%cnf = (
@ -45,38 +45,38 @@ if ( defined($ARGV[0]))
'graph_category' => 'virtualization',
'graph_info' => 'Display the I/O operations for each domain',
);
@domains = `$XM list`;
shift(@domains); # we don't need the header line
foreach $domain ( @domains )
{
($dom, undef) = split(/\s/, $domain);
$dom =~ s/[-.]/_/g;
$cnf{ $dom.'RD' . '.label' } = 'read';
$cnf{ $dom.'RD' . '.type' } = 'COUNTER';
$cnf{ $dom.'RD' . '.graph' } = 'no';
$cnf{ $dom.'RD' . '.cdef' } = $dom.'RD,8,*';
$cnf{ $dom.'WR' . '.label' } = $dom;
$cnf{ $dom.'WR' . '.type' } = 'COUNTER';
$cnf{ $dom.'WR' . '.negative' } = $dom.'RD';
$cnf{ $dom.'WR' . '.cdef' } = $dom.'WR,8,*';
if ( "$cnt" == "0" )
{
$cnf { "$dom" . '.draw' } = 'AREA';
}
$cnt++;
}
foreach $key ( sort(keys(%cnf)) )
{
print "$key $cnf{$key}\n";
}
exit 0;
}
}
@ -98,12 +98,12 @@ foreach $domain (@stats)
{
$domain =~ s/^\s+//;
@tmp = split(/\s+/, $domain);
$domname = $tmp[0];
$domname =~ s/[-.]/_/g;
$vbdrd = $tmp[14];
$vbdwr = $tmp[15];
$vals{$domname."RD"}{'value'} = $vbdrd;
$vals{$domname."WR"}{'value'} = $vbdwr;
}
@ -112,4 +112,4 @@ foreach $key ( sort(keys(%vals)) )
{
print "$key.value " . ($vals{$key}{'value'}) . "\n";
}