jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [trunk/] [rrdgraphram] - Blame information for rev 24

 

Line No. Rev Author Line
120simandl#!/bin/bash
2# chkconfig: 12345 55 45
3# description: System statistics
4 
521simandl#/etc/fstab line
6#opt /opt tmpfs rw,size=128M,nodev,mode=0755 0 0
7 
820simandlcd "/opt/HotSaNIC"
9 
10. ./settings
11 
12case $1 in
13 start)
14 echo "Loading rrdtimer folder..."
15 posledni=`ls -c /opt_* | head -n 1 `
16 cd "/"
17 tar xfz $posledni
18 cd "/opt/HotSaNIC"
19 
20 echo "Starting rrdtimer..."
21 ./rrdtimer.pl Dp
22 ;;
23 stop)
2424simandl ./rrdgraph save
2520simandl 
26 echo "Stopping rrdtimer..."
27 if [ -e "$PIDFILE" ]; then
28 PID=`cat "$PIDFILE"`
29 for nn in $PID ; do kill $nn; done
30 else
31 echo "pid-file not found, rrdtimer not running?!"
32 fi
33 ./clearall CLEAR_COUNTERS
34 ;;
3524simandl save)
36 echo "Saving rrdtimer folder..."
37 /bin/mount / -o remount,rw,noatime
38 datum=`date '+%Y%m%d%H%M%S'`
39 archiv=/opt_$datum.tgz
40 tar cfz $archiv /opt/HotSaNIC
41 /bin/mount / -o remount,ro,noatime
42 ;;
4320simandl status)
44 if [ -e $PIDFILE ]; then
45 echo "main process on PID `cat $PIDFILE` (according to PID-file)"
46 else
47 echo "pid-file not found, rrdtimer not running?!"
48 fi
49 ;;
50 restart)
51 ./rrdgraph stop
52 ./rrdgraph start
53 ;;
54 *)
5524simandl echo "usage: rrdgraph [start|stop|status|restart|save]"
5620simandl ;;
57 esac

Powered by WebSVN 2.2.1