~ubuntu-branches/ubuntu/maverick/munin/maverick

« back to all changes in this revision

Viewing changes to plugins/node.d.linux/forks.in

  • Committer: Bazaar Package Importer
  • Author(s): Holger Levsen, Stig Sandbeck Mathisen, Tom Feiner
  • Date: 2010-01-14 12:10:51 UTC
  • mfrom: (8.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20100114121051-6xovy6hqfh1wrl0u
Tags: 1.4.3-2
[ Stig Sandbeck Mathisen ]
* Add versioned dependency for librrds-perl.
  If used with librrds-perl 1.2 or older, the font path is wrong.

[ Tom Feiner ]
* Update watch file.
* Add patch from munin ticket #828, to suppress "occasional" unknown 
  states to avoid alerts. Thanks to Steve Wilson for the patch!
* Removed asterisks from NEWS.Debian and rewrite as non bulleted list, as
  advised by the developers reference.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!@@GOODSH@@
 
2
# -*- sh -*-
 
3
 
 
4
: << =cut
 
5
 
 
6
=head1 NAME
 
7
 
 
8
forks -Plugin to monitor the number of forks per second on the machine
 
9
 
 
10
=head1 CONFIGURATION
 
11
 
 
12
No configuration
 
13
 
 
14
=head1 AUTHOR
 
15
 
 
16
Unknown author
 
17
 
 
18
=head1 LICENSE
 
19
 
 
20
Unknown license
 
21
 
 
22
=head1 MAGICK MARKERS
 
23
 
 
24
 #%# family=auto
 
25
 #%# capabilities=autoconf
 
26
 
 
27
=cut
 
28
 
 
29
. $MUNIN_LIBDIR/plugins/plugin.sh
 
30
 
 
31
if [ "$1" = "autoconf" ]; then
 
32
        if [ -r /proc/stat ]; then
 
33
                echo yes 
 
34
                exit 0
 
35
        else
 
36
                echo "no (/proc/stat not readable)"
 
37
                exit 0
 
38
        fi
 
39
fi
 
40
 
 
41
if [ "$1" = "config" ]; then
 
42
 
 
43
        echo 'graph_title Fork rate'
 
44
        echo 'graph_args --base 1000 -l 0 '
 
45
        echo 'graph_vlabel forks / ${graph_period}'
 
46
        echo 'graph_category processes'
 
47
        echo 'graph_info This graph shows the number of forks (new processes started) per second.'
 
48
        echo 'forks.label forks'
 
49
        echo 'forks.type DERIVE'
 
50
        echo 'forks.min 0'
 
51
        echo 'forks.max 100000'
 
52
        echo 'forks.info The number of forks per second.'
 
53
        print_warning forks
 
54
        print_critical forks
 
55
        exit 0
 
56
fi
 
57
 
 
58
echo -n "forks.value "
 
59
awk '/processes/ {print $2}' /proc/stat
 
60
 
 
61
 
 
62