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

« back to all changes in this revision

Viewing changes to node/node.d/acpi.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
# $Log: acpi.in,v $
 
4
# Revision 1.1  2004/05/06 21:39:54  jimmyo
 
5
# Added plugin acpi, contributed by Alexandre Dupouy.
 
6
#
 
7
#
 
8
#%# family=contrib
 
9
#%# capabilities=autoconf
 
10
 
 
11
if [ "$1" = "autoconf" ]; then
 
12
        acpi_available 2>/dev/null >/dev/null
 
13
        if [ "$?" = "0" ]; then
 
14
                echo yes
 
15
                exit 0
 
16
        else
 
17
                echo no
 
18
                exit 1
 
19
        fi
 
20
fi
 
21
 
 
22
if [ "$1" = "config" ]; then
 
23
 
 
24
        echo 'graph_title CPU temperature'
 
25
        echo 'graph_args --base 1000 -l 0'
 
26
        echo 'graph_vlabel temp in �C'
 
27
        echo cpu.label cpu
 
28
        exit 0
 
29
fi
 
30
 
 
31
t=$(echo "`acpi -t -B`" | awk '{print $4}' | tr '.' ' ' | cut -f 1 -d ' ')
 
32
echo "cpu.value $t"