Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/apache/apache_byprojects/byprojects_inout_bandwidth | ||
|---|---|---|
| 3 | 3 |
# |
| 4 | 4 |
# byprojects_inout_bandwidth |
| 5 | 5 |
# |
| 6 |
# Perl script to monitor in/out bandwidth *byprojects* (e.g. vhost) from
|
|
| 6 |
# Perl script to monitor in/out bandwidth *byprojects* (e.g. vhost) from |
|
| 7 | 7 |
# multiple files and/or regex. |
| 8 | 8 |
# |
| 9 |
# Danny Fullerton <northox@mantor.org>
|
|
| 9 |
# Danny Fullerton <northox@mantor.org> |
|
| 10 | 10 |
# Mantor Organization <www.mantor.org> |
| 11 | 11 |
# This work is licensed under a MIT license. |
| 12 | 12 |
# |
| ... | ... | |
| 17 | 17 |
# "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O"
|
| 18 | 18 |
# where %I is input and %O is output. |
| 19 | 19 |
# |
| 20 |
# Log can be gathered from multiple sources by simply specifying multiple log
|
|
| 20 |
# Log can be gathered from multiple sources by simply specifying multiple log |
|
| 21 | 21 |
# filename or using wildcards (glob). File content can be selected using regex. |
| 22 | 22 |
# |
| 23 | 23 |
# - 'prod' => [ {'path' => '/home/prod/log/access.log'} ],
|
| ... | ... | |
| 84 | 84 |
my @paths = glob $log->{'path'};
|
| 85 | 85 |
foreach my $path (@paths) {
|
| 86 | 86 |
my $state = $statepath.'/'.$project.$x.'_inoutbandwidth.state'; |
| 87 |
open(LT, "$logtail -f ".$log->{'path'}." -o $state |") or
|
|
| 87 |
open(LT, "$logtail -f ".$log->{'path'}." -o $state |") or
|
|
| 88 | 88 |
die "Can't open $logtail : $!"; |
| 89 | 89 |
while (<LT>) {
|
| 90 | 90 |
my $buf = $_; |
Formats disponibles : Unified diff