Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/other/proc_ | ||
|---|---|---|
| 1 |
#!/usr/bin/perl
|
|
| 1 |
#!/usr/bin/perl |
|
| 2 | 2 |
# -*- perl -*- |
| 3 | 3 |
# |
| 4 | 4 |
# proc_ - Munin plugin to for Process information |
| ... | ... | |
| 7 | 7 |
# |
| 8 | 8 |
# Author: Kristian Lyngstøl <kristian@redpill-linpro.com> |
| 9 | 9 |
# Author: Trygve Vea <tv@redpill-linpro.com> |
| 10 |
#
|
|
| 10 |
# |
|
| 11 | 11 |
# This program is free software; you can redistribute it and/or modify |
| 12 | 12 |
# it under the terms of the GNU General Public License as published by |
| 13 | 13 |
# the Free Software Foundation; either version 2 of the License, or |
| 14 | 14 |
# (at your option) any later version. |
| 15 |
#
|
|
| 15 |
# |
|
| 16 | 16 |
# This program is distributed in the hope that it will be useful, |
| 17 | 17 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | 18 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | 19 |
# GNU General Public License for more details. |
| 20 |
#
|
|
| 20 |
# |
|
| 21 | 21 |
# You should have received a copy of the GNU General Public License along |
| 22 | 22 |
# with this program; if not, write to the Free Software Foundation, Inc., |
| 23 | 23 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| ... | ... | |
| 39 | 39 |
env.procname init |
| 40 | 40 |
env.category Process Info |
| 41 | 41 |
|
| 42 |
env.procname defines the processname as seen inside the parenthesis of the
|
|
| 42 |
env.procname defines the processname as seen inside the parenthesis of the |
|
| 43 | 43 |
second column in /proc/pid/stat. If you don't get the data you expect, you |
| 44 | 44 |
can check if the value is what you expect here. |
| 45 | 45 |
|
| ... | ... | |
| 121 | 121 |
'colour', 'info', 'type'); |
| 122 | 122 |
# Data structure that defines all possible graphs (aspects) and how they |
| 123 | 123 |
# are to be plotted. Every top-level entry is a graph/aspect. Each top-level graph |
| 124 |
# MUST have title set and 'values'.
|
|
| 125 |
#
|
|
| 124 |
# MUST have title set and 'values'. |
|
| 125 |
# |
|
| 126 | 126 |
# Graphs with 'DEBUG' set to anything is omitted from 'suggest'. |
| 127 |
#
|
|
| 127 |
# |
|
| 128 | 128 |
# 'rpn' on values allows easy access to graphs consisting of multiple |
| 129 | 129 |
# values from procstats. (Reverse polish notation). The RPN |
| 130 | 130 |
# implementation only accepts +-*/ and procstats-values. |
| 131 | 131 |
# |
| 132 |
# Any value left undefined will be left up to Munin to define/ignore/yell
|
|
| 132 |
# Any value left undefined will be left up to Munin to define/ignore/yell |
|
| 133 | 133 |
# about. |
| 134 | 134 |
# |
| 135 | 135 |
# See munin documentation or rrdgraph/rrdtool for more information. |
| ... | ... | |
| 258 | 258 |
exit 0; |
| 259 | 259 |
} |
| 260 | 260 |
|
| 261 |
# Suggest relevant aspects/values of $self.
|
|
| 261 |
# Suggest relevant aspects/values of $self. |
|
| 262 | 262 |
# 'DEBUG'-graphs are excluded. |
| 263 | 263 |
sub suggest |
| 264 | 264 |
{
|
| ... | ... | |
| 292 | 292 |
} |
| 293 | 293 |
|
| 294 | 294 |
# Walk through the relevant aspect and print all top-level configuration |
| 295 |
# values and value-definitions.
|
|
| 295 |
# values and value-definitions. |
|
| 296 | 296 |
sub get_config |
| 297 | 297 |
{
|
| 298 | 298 |
my $graph = $_[0]; |
| ... | ... | |
| 328 | 328 |
} |
| 329 | 329 |
} |
| 330 | 330 |
|
| 331 |
# Read and verify the aspect ($self).
|
|
| 331 |
# Read and verify the aspect ($self). |
|
| 332 | 332 |
sub set_aspect |
| 333 | 333 |
{
|
| 334 | 334 |
$self = $0; |
Formats disponibles : Unified diff