mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-23 06:35:42 +00:00
Whitespace cleanup
* remove trailing whitespace * remove empty lines at the end of files
This commit is contained in:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -95,7 +95,7 @@ sub count {
|
|||
#find sitename
|
||||
$file=~s/$site/$1/;
|
||||
$file=$vhost if $vhost;
|
||||
|
||||
|
||||
# skip broken lines
|
||||
next unless $file;
|
||||
|
||||
|
@ -103,7 +103,7 @@ sub count {
|
|||
my $vpm=clean_fieldname("$file");
|
||||
$temp{$vpm}{'label'}="$file";
|
||||
$temp{$vpm}{'label'}=~s/www\.//;
|
||||
|
||||
|
||||
# count all requests
|
||||
$temp{$vpm}{'requests'}++;
|
||||
|
||||
|
@ -118,13 +118,13 @@ sub count {
|
|||
# average bytes
|
||||
$temp{$vpm}{'avg_bytes'}=$temp{$vpm}{'bytes'}/$temp{$vpm}{'requests'} || 0;
|
||||
}
|
||||
|
||||
|
||||
# count by status / error code
|
||||
$temp{$vpm}{"status"}{$status}++ if $status;
|
||||
|
||||
if ($time) {
|
||||
# microsec to millisec
|
||||
$time=sprintf("%d",$time/1000);
|
||||
$time=sprintf("%d",$time/1000);
|
||||
|
||||
# min/max execution time
|
||||
$temp{$vpm}{'max_time'}=max($temp{$vpm}{'max_time'},$time) || 0;
|
||||
|
@ -144,9 +144,9 @@ while (1) {
|
|||
# tail files, calls &count with linearray
|
||||
$tail->read;
|
||||
|
||||
# begin transaction
|
||||
# begin transaction
|
||||
$share->lock(LOCK_EX);
|
||||
|
||||
|
||||
# get data (may be updated by other loggers too)
|
||||
my %old=eval{%{thaw($share->fetch)}}; # using eval to suppress thaw error on empty string at the first run
|
||||
|
||||
|
@ -182,7 +182,7 @@ while (1) {
|
|||
$share->store( freeze \%old );
|
||||
# end transaction
|
||||
$share->unlock;
|
||||
|
||||
|
||||
# parse/write every n seconds (plus processing time)
|
||||
sleep $nsec;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue