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

@ -46,14 +46,14 @@ FILE: for my $file (@files) {
my $object_name = shift @row;
my $epoch = shift @row;
my $owner_array_name = shift @row;
# Ignore if too old
next if ($epoch <= $spool_fetch_epoch);
# Don't do too much work : 4h each time is enough
$first_epoch ||= $epoch;
next if $epoch > $first_epoch + 60 * 60 * 4;
# Store Values
for (my $idx = 0; $idx < $nb_headers; $idx ++) {
@ -91,26 +91,26 @@ multigraph san
graph_title Vue globale
graph_order \
cpu_sp_a=san.cpu.sp_a \
cpu_sp_b=san.cpu.sp_b
cpu_sp_b=san.cpu.sp_b
EOF
;
# CPU
my @object_names = keys %$values;
gen_multigraph(
$values,
gen_multigraph(
$values,
"cpu",
[ grep { /^SP / } @object_names ],
);
# DISK
gen_multigraph(
gen_multigraph(
$values,
"disk",
[ grep { /^Bus \d+/ } @object_names ],
);
# Port
gen_multigraph(
gen_multigraph(
$values,
"port",
[ grep { /^Port / } @object_names ],
@ -118,7 +118,7 @@ EOF
);
# Pool
gen_multigraph(
gen_multigraph(
$values,
"pool",
[ grep { /^Pool / } @object_names ],
@ -130,17 +130,17 @@ multigraph san.lun
graph_title Luns Global
graph_order \
cpu_sp_a=san.cpu.sp_a \
cpu_sp_b=san.cpu.sp_b
cpu_sp_b=san.cpu.sp_b
EOF
;
# LUN Per Host
my %host_seen;
my @hosts = grep { $_ ne "" } grep { ! $host_seen{$_}++ }
my @hosts = grep { $_ ne "" } grep { ! $host_seen{$_}++ }
map { $1 if /^\w+ \[\d+; (\w+)/ } @object_names;
for my $host (@hosts) {
my $host_field = $host;
$host_field =~ tr/./_/;
gen_multigraph(
gen_multigraph(
$values,
"lun.$host_field",
[ grep { /^\w+ \[\d+; $host/ } @object_names ],
@ -153,7 +153,7 @@ EOF
last;
}
sub gen_multigraph
sub gen_multigraph
{
my ($values, $category, $object_names, $convert_to_label, $convert_to_field) = @_;
@ -169,7 +169,7 @@ multigraph san.$category
graph_title $category Global
graph_order \
cpu_sp_a=san.cpu.sp_a \
cpu_sp_b=san.cpu.sp_b
cpu_sp_b=san.cpu.sp_b
EOF
;
@ -191,7 +191,7 @@ EOF
}
}
sub hash_field_name
sub hash_field_name
{
my $name = shift;
$name = lc($name);
@ -212,7 +212,7 @@ sub trim
sub file_mtime
{
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat(shift);
return $mtime;
return $mtime;
}
__DATA__
@ -254,7 +254,7 @@ EOF
print ".\n";
my %MONTHS = get_months();
sub convert_to_epoch
sub convert_to_epoch
{
# converts "05/12/2011 03:57" to EPOCH
my ($date, $time) = split(/ /);
@ -302,7 +302,7 @@ multigraph san
graph_title Vue globale
graph_order \
cpu_sp_a=san.cpu.cpu_sp_a \
cpu_sp_b=san.cpu.cpu_sp_b
cpu_sp_b=san.cpu.cpu_sp_b
multigraph san.cpu
graph_title Utilization (%)
cpu_sp_a.label Utilization (%) for SP A