1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +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

@ -17,7 +17,7 @@
mktempfile () {
mktemp -t "$1"
}
}
LOGFILE=${logfile:-/var/log/proftpd/xferlog}
LOGTAIL=${logtail:-$(which logtail)}

View file

@ -20,7 +20,7 @@
#
# Configuration:
# Maybe need to add following lines to plugins config file
# (e.g. /etc/munin/plugin-conf.d/pure-ftpd) to run pure-ftpwho
# (e.g. /etc/munin/plugin-conf.d/pure-ftpd) to run pure-ftpwho
# as user with apropirate privilegs then restart munin-node.
#
# [pure-ftpd]

View file

@ -11,7 +11,7 @@
#
# Configuration:
# Maybe need to add following lines to plugins config file
# (e.g. /etc/munin/plugin-conf.d/pure-ftpd) to run pure-ftpwho
# (e.g. /etc/munin/plugin-conf.d/pure-ftpd) to run pure-ftpwho
# as user with apropirate privilegs then restart munin-node.
#
# [pure-ftpd-bw]

View file

@ -54,7 +54,7 @@ if (!(-e $logfile)) {
open LOG, "<$logfile" or print "Can't open logfile!\n";
my $last_line;
while(<LOG>) {
$last_line = $_ if eof;
$last_line = $_ if eof;
}
close LOG;
@em = split(/ /,$last_line);
@ -77,33 +77,33 @@ if (!(-e $logfile)) {
$put=0,
$mti=0,
$dsm=0;
open LOG, "<$logfile";
@log=<LOG>;
foreach $row (@log) {
@parts=split(/ /,$row);
$curr_ts = "$parts[3] $parts[4]";
$curr_ts =~ s/\[//g;
$curr_ts =~ s/\]//g;
$curr_ts =~ s/\]//g;
if ( Date_Cmp($curr_ts,$last_ts) > 0 ) {
if ( $parts[5]=~ /GET/ ) {
$get+=int($parts[8]);
if ($parts[2] eq "mti") {
$mti+=int($parts[8]);
}
}
if ($parts[2] eq "dsm") {
$dsm+=int($parts[8]);
}
}
}
if ( $parts[5]=~ /PUT/ ) {
$put-=int($parts[8]);
if ($parts[2] eq "mti") {
$mti-=int($parts[8]);
}
}
if ($parts[2] eq "dsm") {
$dsm-=int($parts[8]);
}
}
}
}
}