~ubuntu-branches/ubuntu/gutsy/munin/gutsy

« back to all changes in this revision

Viewing changes to node/node.d.linux/open_inodes.in

  • Committer: Bazaar Package Importer
  • Author(s): Tore Anderson
  • Date: 2004-05-21 20:51:19 UTC
  • Revision ID: james.westby@ubuntu.com-20040521205119-oz8bllbjp9hs80ig
Tags: upstream-0+1.0.0pre5
ImportĀ upstreamĀ versionĀ 0+1.0.0pre5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
3
# Plugin to monitor the number of open files in the system.
 
4
#
 
5
# $Log: open_inodes.in,v $
 
6
# Revision 1.1  2004/01/02 18:50:01  jimmyo
 
7
# Renamed occurrances of lrrd -> munin
 
8
#
 
9
# Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo
 
10
# Import of LRRD CVS tree after renaming to Munin
 
11
#
 
12
# Revision 1.2  2003/11/12 11:49:41  jimmyo
 
13
# Removed warning/critical (floating max)
 
14
#
 
15
# Revision 1.1  2003/11/10 17:46:50  jimmyo
 
16
# Contribution by Finn-Arn Johansen (SF#839210)
 
17
#
 
18
#
 
19
# Parameters:
 
20
#       
 
21
#       config   (required)
 
22
#       autoconf (optional - used by munin-config)
 
23
#
 
24
# Magic markers (Used by munin-config and some installation scripts.
 
25
# Optional):
 
26
#
 
27
#%# family=auto
 
28
#%# capabilities=autoconf
 
29
 
 
30
 
 
31
 
 
32
if [ "$1" = "autoconf" ]; then
 
33
        if [ -r /proc/sys/fs/inode-nr ]; then
 
34
                echo yes
 
35
                exit 0
 
36
        else
 
37
                echo no
 
38
                exit 1
 
39
        fi
 
40
fi
 
41
 
 
42
if [ "$1" = "config" ]; then
 
43
 
 
44
        echo 'graph_title Inode table usage'
 
45
        echo 'graph_args --base 1000 -l 0'
 
46
        echo 'graph_vlabel number of open inodes'
 
47
        echo 'used.label open inodes'
 
48
        echo 'max.label peak open inodes'
 
49
        exit 0
 
50
fi
 
51
 
 
52
awk '{print "used.value " $1-$2 "\nmax.value " $1}' < /proc/sys/fs/inode-nr