i put together a quick script to generate all the graphs for me based on a
time frame passed as the first command argument.

might be easier to read if i'd used a `case` statement (instead of all the
`if`s); didn't assume anyone would ever see it :p

RRDtool Version 1.2.27

============================
#!/bin/bash

cd ~/logger/playerCounter

if [ $1 = 'hour' ]; then
    FRAME=Hour
    start="-1h"
fi

if [ $1 = 'day' ]; then
    FRAME=Day
    start="-1d"
fi

if [ $1 = 'week' ]; then
    FRAME=Week
    start="-1w"
fi

if [ $1 = 'month' ]; then
    FRAME=Month
    start="-1M"
fi

if [ $1 = 'year' ]; then
    FRAME=Year
    start="-1y"
fi

/usr/bin/rrdtool graph players${FRAME}.png \
-t "zendeath.com | TF2 server" \
-w 800 \
-h 300 \
-r \
-v "Player Count" \
-l 0 \
-u 25 \
--start ${start} \
-E \
-W "`date`" \
DEF:PLYS=players.rrd:players:AVERAGE \
DEF:ZDPLYS=players.rrd:zd_players:AVERAGE \
VDEF:APLYS=PLYS,AVERAGE \
VDEF:ZDAPLYS=ZDPLYS,AVERAGE \
AREA:PLYS#AA0000:Total\ Players\\t\\t \
COMMENT:AVG\\: \
GPRINT:APLYS:%lf\\l \
AREA:ZDPLYS#440000:Zendeath\ Members\\t \
COMMENT:AVG\\: \
GPRINT:ZDAPLYS:%lf \
HRULE:APLYS#444444


On Mon, Mar 9, 2009 at 3:17 PM, Jaanus Lepik <jaa...@serverid.ee> wrote:

> Hi,
>
> What settings you use on graph making?
>
> The look so good. whats the rrdtool version?
>
> The Mad Crapper wrote:
> > i've been thinking about using Munin; Cacti is a good idea though.  Until
> i
> > can make up my lazy ass, i made my own watered down version
> >
> > http://www.zendeath.com/stats.html
> > http://www.zendeath.com/images/playerClassDay.png
> > http://www.zendeath.com/images/playerClassWeek.png
> >
> > I'm going to completely re-write it though to include player counts over
> a
> > played map overlay of sorts. I'd be more than willing to share if anyone
> > wants it... you have to just promise to not laugh at my code though :p
> >
> > On Mon, Mar 9, 2009 at 12:58 PM, Saint K. <sai...@specialattack.net>
> wrote:
> >
> >
> >> Any server admins here using cacti, and if so, would you mind sharing
> >> scripts for graphing player numbers, fps etc?
> >>
> >> Cheers,
> >>
> >>
> >> _______________________________________________
> >> To unsubscribe, edit your list preferences, or view the list archives,
> >> please visit:
> >> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
> >>
> >>
> >
> >
> >
> >
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>



-- 
"Tis not the software that is free, tis your self"

PGP Key - http://www.ryanwhelan.com/key.html
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to