#!/bin/sh
# This has gotten very dirty. REWRITEME.
command='echo graph'
baseargs='-z --no-legend -E --no-minor -a PNG -h 108 -c CANVAS#000000 -c BACK#000000 -c FONT#ffffff -c ARROW#000000 -c SHADEA#000000 -c SHADEB#000000 -c MGRID#00000000'
do1="$command $baseargs -w 360 -s 'end-3h' --imginfo '
 | '"
do2="$command $baseargs -w 288 -s end-24h --imginfo ' | '"
do3="$command $baseargs -w 168 -s end-1w -x YEAR:1:YEAR:1:DAY:1:86400:%a --imginfo ' | '"
doM="$command $baseargs -w 180 -s end-30d -x YEAR:1:YEAR:1:WEEK:1:0:%d --imginfo ' | '"
do4="$command $baseargs -w 182 -s end-26w --imginfo ' | '"
do5="$command $baseargs -w 208 -s end-4y -x YEAR:1:YEAR:1:YEAR:1:31557600:%Y --imginfo ' | '"
do6="$command $baseargs -w 240 -s end-20y -x YEAR:10:YEAR:10:YEAR:5:157788000:%Y --imginfo ' |
'"
t1="past 3 hours"
t2="past 24 hours"
t3="past week"
tM="past month"
t4="past 6 months"
t5="past 4 years"
t6="past 20 years"
# Inet traffic
inetstuff='-l 0 DEF:out=$int.rrd:out:AVERAGE DEF:in=$int.rrd:in:AVERAGE LINE2:out#ff0000 LINE2:in#0000ff'
for int in eth0 eth1;do
eval \$do1 -t '"\"$int: $t1\""' $int.1.png $inetstuff
eval \$do2 -t '"\"$int: $t2\""' $int.2.png $inetstuff
eval \$do3 -t '"\"$int: $t3\""' $int.3.png $inetstuff
eval \$doM -t '"\"$int: $tM\""' $int.M.png $inetstuff
eval \$do4 -t '"\"$int: $t4\""' $int.4.png $inetstuff
eval \$do5 -t '"\"$int: $t5\""' $int.5.png $inetstuff
eval \$do6 -t '"\"$int: $t6\""' $int.6.png $inetstuff
done
# Latency
latencystuff='-l 0 DEF:delayinms=gatewayping.rrd:delay:AVERAGE CDEF:delay=delayinms,1000,/ LINE2:delay#cccc33'
$do1 -t "'Internet latency: $t1'" gatewayping.1.png $latencystuff
$do2 -t "'Internet latency: $t2'" gatewayping.2.png $latencystuff
$do3 -t "'Internet latency: $t3'" gatewayping.3.png $latencystuff
$doM -t "'Internet latency: $tM'" gatewayping.M.png $latencystuff
$do4 -t "'Internet latency: $t4'" gatewayping.4.png $latencystuff
$do5 -t "'Internet latency: $t5'" gatewayping.5.png $latencystuff
$do6 -t "'Internet latency: $t6'" gatewayping.6.png $latencystuff
# TCP queues
tcpqueuestuff='DEF:tx=tcp.rrd:tx_queue:AVERAGE DEF:rx=tcp.rrd:rx_queue:AVERAGE LINE2:tx#cc3333 LINE2:rx#3333cc'
$do1 -t "'Queued TCP data: $t1'" tcpqueue.1.png $tcpqueuestuff
$do2 -t "'Queued TCP data: $t2'" tcpqueue.2.png $tcpqueuestuff
$do3 -t "'Queued TCP data: $t3'" tcpqueue.3.png $tcpqueuestuff
$doM -t "'Queued TCP data: $tM'" tcpqueue.M.png $tcpqueuestuff
$do4 -t "'Queued TCP data: $t4'" tcpqueue.4.png $tcpqueuestuff
$do5 -t "'Queued TCP data: $t5'" tcpqueue.5.png $tcpqueuestuff
$do6 -t "'Queued TCP data: $t6'" tcpqueue.6.png $tcpqueuestuff
# TCP connections
tcpconnstuff='DEF:connections=tcp.rrd:connections:AVERAGE LINE2:connections#669966'
$do1 -t "'TCP connections: $t1'" tcpconn.1.png $tcpconnstuff
$do2 -t "'TCP connections: $t2'" tcpconn.2.png $tcpconnstuff
$do3 -t "'TCP connections: $t3'" tcpconn.3.png $tcpconnstuff
$doM -t "'TCP connections: $tM'" tcpconn.M.png $tcpconnstuff
$do4 -t "'TCP connections: $t4'" tcpconn.4.png $tcpconnstuff
$do5 -t "'TCP connections: $t5'" tcpconn.5.png $tcpconnstuff
$do6 -t "'TCP connections: $t6'" tcpconn.6.png $tcpconnstuff
# Disk space
diskspacestuff='-A -b 1024 DEF:used=diskspace.rrd:used:AVERAGE LINE2:used#cccccc'
extradiskspacestuff='-l 0 -r DEF:avail=diskspace.rrd:avail:AVERAGE LINE2:avail#666666'
$do1 -t "'disk space: $t1'" diskused.1.png $diskspacestuff
$do2 -t "'disk space: $t2'" diskused.2.png $diskspacestuff
$do3 -t "'disk space: $t3'" diskused.3.png $diskspacestuff
$doM -t "'disk space: $tM'" diskused.M.png $diskspacestuff
$do4 -t "'disk space: $t4'" diskused.4.png $diskspacestuff
$do5 -t "'disk space: $t5'" diskused.5.png $diskspacestuff $extradiskspacestuff
$do6 -t "'disk space: $t6'" diskused.6.png $diskspacestuff $extradiskspacestuff
# SILC chat activity
chatstuff='-l 0 DEF:chat=silcchat.rrd:chat:AVERAGE LINE2:chat#33cc33'
$do1 -t "'silc chat activity: $t1'" chat.1.png $chatstuff
$do2 -t "'silc chat activity: $t2'" chat.2.png $chatstuff
$do3 -t "'silc chat activity: $t3'" chat.3.png $chatstuff
$doM -t "'silc chat activity: $tM'" chat.M.png $chatstuff
$do4 -t "'silc chat activity: $t4'" chat.4.png $chatstuff
$do5 -t "'silc chat activity: $t5'" chat.5.png $chatstuff
$do6 -t "'silc chat activity: $t6'" chat.6.png $chatstuff
# Temperature
if false;then
tempstuff='-A
DEF:cpu1=temp.rrd:cpu1:MAX
DEF:cpu2=temp.rrd:cpu2:MAX
DEF:vrm1=temp.rrd:vrm1:MAX
DEF:vrm2=temp.rrd:vrm2:MAX
DEF:agp=temp.rrd:agp:MAX
DEF:ddr=temp.rrd:ddr:MAX
LINE1.7:vrm1#f90
LINE1.7:vrm2#fc0
LINE1.7:agp#c90
LINE1.7:ddr#6f3
LINE1.7:cpu1#f00
LINE1.7:cpu2#f00'
$do1 -t "'temp: $t1'" temp.1.png $tempstuff
$do2 -t "'temp: $t2'" temp.2.png $tempstuff
$do3 -t "'temp: $t3'" temp.3.png $tempstuff
$doM -t "'temp: $tM'" temp.M.png $tempstuff
$do4 -t "'temp: $t4'" temp.4.png $tempstuff
$do5 -t "'temp: $t5'" temp.5.png $tempstuff
$do6 -t "'temp: $t6'" temp.6.png $tempstuff
fi
# CPU Utilization
cpuutilstuff='-l 0 -u 100 DEF:util=cpuutil.rrd:util:AVERAGE LINE2:util#9999ff'
$do1 -t "'cpu%: $t1'" cpuutil.1.png $cpuutilstuff
$do2 -t "'cpu%: $t2'" cpuutil.2.png $cpuutilstuff
$do3 -t "'cpu%: $t3'" cpuutil.3.png $cpuutilstuff
$doM -t "'cpu%: $tM'" cpuutil.M.png $cpuutilstuff
$do4 -t "'cpu%: $t4'" cpuutil.4.png $cpuutilstuff
$do5 -t "'cpu%: $t5'" cpuutil.5.png $cpuutilstuff
$do6 -t "'cpu%: $t6'" cpuutil.6.png $cpuutilstuff
# Load Average
loadavgstuff='-l 0 DEF:util=loadavg.rrd:loadavg:AVERAGE LINE2:util#00cc99'
$do1 -t "'load: $t1'" loadavg.1.png $loadavgstuff
$do2 -t "'load: $t2'" loadavg.2.png $loadavgstuff
$do3 -t "'load: $t3'" loadavg.3.png $loadavgstuff
$doM -t "'load: $tM'" loadavg.M.png $loadavgstuff
$do4 -t "'load: $t4'" loadavg.4.png $loadavgstuff
$do5 -t "'load: $t5'" loadavg.5.png $loadavgstuff
$do6 -t "'load: $t6'" loadavg.6.png $loadavgstuff
# Interrupts
intrstuff='DEF:intr=intr.rrd:intr:AVERAGE LINE2:intr#999900'
$do1 -t "'interrupts: $t1'" intr.1.png $intrstuff
$do2 -t "'interrupts: $t2'" intr.2.png $intrstuff
$do3 -t "'interrupts: $t3'" intr.3.png $intrstuff
$doM -t "'interrupts: $tM'" intr.M.png $intrstuff
$do4 -t "'interrupts: $t4'" intr.4.png $intrstuff
$do5 -t "'interrupts: $t5'" intr.5.png $intrstuff
$do6 -t "'interrupts: $t6'" intr.6.png $intrstuff
# Context switches
contextstuff='DEF:context=context.rrd:context:AVERAGE LINE2:context#000099'
$do1 -t "'context switches: $t1'" context.1.png $contextstuff
$do2 -t "'context switches: $t2'" context.2.png $contextstuff
$do3 -t "'context switches: $t3'" context.3.png $contextstuff
$doM -t "'context switches: $tM'" context.M.png $contextstuff
$do4 -t "'context switches: $t4'" context.4.png $contextstuff
$do5 -t "'context switches: $t5'" context.5.png $contextstuff
$do6 -t "'context switches: $t6'" context.6.png $contextstuff
# Process count
processesstuff='
DEF:processes=processes.rrd:processes:AVERAGE
DEF:exim=eximdspam.rrd:exim:AVERAGE
DEF:dspam=eximdspam.rrd:dspam:AVERAGE
CDEF:noneximdspam=processes,exim,-,dspam,-
LINE1.3:noneximdspam#cc6666
LINE2:processes#ff9999'
$do1 -t "'processes: $t1'" processes.1.png $processesstuff
$do2 -t "'processes: $t2'" processes.2.png $processesstuff
$do3 -t "'processes: $t3'" processes.3.png $processesstuff
$doM -t "'processes: $tM'" processes.M.png $processesstuff
$do4 -t "'processes: $t4'" processes.4.png $processesstuff
$do5 -t "'processes: $t5'" processes.5.png $processesstuff
$do6 -t "'processes: $t6'" processes.6.png $processesstuff
# Forks
forksstuff='-l 0 DEF:forks=forks.rrd:forks:AVERAGE LINE2:forks#cccccc'
$do1 -t "'forks: $t1'" forks.1.png $forksstuff
$do2 -t "'forks: $t2'" forks.2.png $forksstuff
$do3 -t "'forks: $t3'" forks.3.png $forksstuff
$doM -t "'forks: $tM'" forks.M.png $forksstuff
$do4 -t "'forks: $t4'" forks.4.png $forksstuff
$do5 -t "'forks: $t5'" forks.5.png $forksstuff
$do6 -t "'forks: $t6'" forks.6.png $forksstuff
# VM stats
# Omitted:
# pgrefillnormal - own graph.
# nrslab, nrmapped - better shown on the memory usage graph.
vmstuff="
DEF:nrdirty=vm.rrd:nrdirty:AVERAGE
DEF:nrwriteback=vm.rrd:nrwriteback:AVERAGE
DEF:nrunstable=vm.rrd:nrunstable:AVERAGE
DEF:nrpagetablepages=vm.rrd:nrpagetablepages:AVERAGE
DEF:pgpgin=vm.rrd:pgpgin:AVERAGE
DEF:pgpgout=vm.rrd:pgpgout:AVERAGE
DEF:pswpin=vm.rrd:pswpin:AVERAGE
DEF:pswpout=vm.rrd:pswpout:AVERAGE
DEF:pgallocnormal=vm.rrd:pgallocnormal:AVERAGE
DEF:pgallocdma=vm.rrd:pgallocdma:AVERAGE
DEF:pgfree=vm.rrd:pgfree:AVERAGE
DEF:pgactivate=vm.rrd:pgactivate:AVERAGE
DEF:pgdeactivate=vm.rrd:pgdeactivate:AVERAGE
DEF:pgfault=vm.rrd:pgfault:AVERAGE
DEF:pgmajfault=vm.rrd:pgmajfault:AVERAGE
DEF:pgstealnormal=vm.rrd:pgstealnormal:AVERAGE
DEF:pgstealdma=vm.rrd:pgstealdma:AVERAGE
DEF:pgscankswapdnormal=vm.rrd:pgscankswapdnormal:AVERAGE
DEF:pgscankswapddma=vm.rrd:pgscankswapddma:AVERAGE
DEF:pgscandirectnormal=vm.rrd:pgscandirectnormal:AVERAGE
DEF:pgscandirectdma=vm.rrd:pgscandirectdma:AVERAGE
DEF:pginodesteal=vm.rrd:pginodesteal:AVERAGE
DEF:slabsscanned=vm.rrd:slabsscanned:AVERAGE
DEF:kswapdsteal=vm.rrd:kswapdsteal:AVERAGE
DEF:kswapdinodesteal=vm.rrd:kswapdinodesteal:AVERAGE
DEF:pageoutrun=vm.rrd:pageoutrun:AVERAGE
DEF:allocstall=vm.rrd:allocstall:AVERAGE
DEF:pgrotated=vm.rrd:pgrotated:AVERAGE
DEF:nrbounce=vm.rrd:nrbounce:AVERAGE
LINE1.7:nrdirty#3fc
LINE1.7:nrwriteback#8f2
LINE1.7:nrunstable#eb8
LINE1.7:nrpagetablepages#41d
LINE1.7:pgpgin#62f
LINE1.7:pgpgout#b8f
LINE1.7:pswpin#1eb
LINE1.7:pswpout#740
LINE1.7:pgallocnormal#da6
LINE1.7:pgallocdma#3fc
LINE1.7:pgfree#9f2
LINE1.7:pgactivate#fb8
LINE1.7:pgdeactivate#41e
LINE1.7:pgfault#a73
LINE1.7:pgmajfault#0d9
LINE1.7:pgstealnormal#2eb
LINE1.7:pgstealdma#741
LINE1.7:pgscankswapdnormal#da6
LINE1.7:pgscankswapddma#30c
LINE1.7:pgscandirectnormal#962
LINE1.7:pgscandirectdma#fb8
LINE1.7:pginodesteal#f1e
LINE1.7:slabsscanned#a74
LINE1.7:kswapdsteal#0d9
LINE1.7:kswapdinodesteal#63f
LINE1.7:pageoutrun#c9f
LINE1.7:allocstall#2eb
LINE1.7:pgrotated#841
LINE1.7:nrbounce#da7"
$do1 -t "'VM stats: $t1'" vm.1.png $vmstuff
$do2 -t "'VM stats: $t2'" vm.2.png $vmstuff
$do3 -t "'VM stats: $t3'" vm.3.png $vmstuff
$doM -t "'VM stats: $tM'" vm.M.png $vmstuff
$do4 -t "'VM stats: $t4'" vm.4.png $vmstuff
$do5 -t "'VM stats: $t5'" vm.5.png $vmstuff
$do6 -t "'VM stats: $t6'" vm.6.png $vmstuff
# Swap space usage
swapstuff='-l 0 -b 1024
DEF:SwapTotal=mem.rrd:SwapTotal:AVERAGE
DEF:SwapFree=mem.rrd:SwapFree:AVERAGE
DEF:Activek=mem.rrd:Active:AVERAGE
DEF:Inactivek=mem.rrd:Inactive:AVERAGE
CDEF:SwapUsed=SwapTotal,SwapFree,-,1024,*
CDEF:Active=Activek,1024,*
CDEF:Inactive=Inactivek,1024,*
LINE1.7:Inactive#c70
LINE1.7:Active#060
LINE3:SwapUsed#c00'
$do1 -t "'swap usage: $t1'" swap.1.png $swapstuff
$do2 -t "'swap usage: $t2'" swap.2.png $swapstuff
$do3 -t "'swap usage: $t3'" swap.3.png $swapstuff
$doM -t "'swap usage: $tM'" swap.M.png $swapstuff
$do4 -t "'swap usage: $t4'" swap.4.png $swapstuff
$do5 -t "'swap usage: $t5'" swap.5.png $swapstuff
$do6 -t "'swap usage: $t6'" swap.6.png $swapstuff
# Memory committed
commitstuff='-b 1024 DEF:committedk=mem.rrd:CommittedAS:AVERAGE CDEF:committed=committedk,1024,* LINE2:committed#63f'
$do1 -t "'memory committed: $t1'" committed.1.png $commitstuff
$do2 -t "'memory committed: $t2'" committed.2.png $commitstuff
$do3 -t "'memory committed: $t3'" committed.3.png $commitstuff
$doM -t "'memory committed: $tM'" committed.M.png $commitstuff
$do4 -t "'memory committed: $t4'" committed.4.png $commitstuff
$do5 -t "'memory committed: $t5'" committed.5.png $commitstuff
$do6 -t "'memory committed: $t6'" committed.6.png $commitstuff
# Mem usage
memstuff="
DEF:Buffersk=mem.rrd:Buffers:AVERAGE
DEF:Cachedk=mem.rrd:Cached:AVERAGE
DEF:Mappedk=mem.rrd:Mapped:AVERAGE
DEF:MemFreek=mem.rrd:MemFree:AVERAGE
DEF:Slabk=mem.rrd:Slab:AVERAGE
DEF:SwapCachedk=mem.rrd:SwapCached:AVERAGE
CDEF:Buffers=Buffersk,1024,*
CDEF:Cached=Cachedk,1024,*
CDEF:Mapped=Mappedk,1024,*
CDEF:MemFree=MemFreek,1024,*
CDEF:Slab=Slabk,1024,*
CDEF:SwapCached=SwapCachedk,1024,*
LINE1.7:Mapped#6f6
LINE1.7:Cached#399
LINE1.7:SwapCached#266
LINE1.7:Slab#cf2
LINE1.7:Buffers#c92
LINE1.7:MemFree#f00"
$do1 -t "'memory usage: $t1'" mem.1.png $memstuff
$do2 -t "'memory usage: $t2'" mem.2.png $memstuff
$do3 -t "'memory usage: $t3'" mem.3.png $memstuff
$doM -t "'memory usage: $tM'" mem.M.png $memstuff
$do4 -t "'memory usage: $t4'" mem.4.png $memstuff
$do5 -t "'memory usage: $t5'" mem.5.png $memstuff
$do6 -t "'memory usage: $t6'" mem.6.png $memstuff
# Recycled pages
refillstuff=" DEF:pgrefillnormal=vm.rrd:pgrefillnormal:AVERAGE DEF:pgrefilldma=vm.rrd:pgrefilldma:AVERAGE LINE2:pgrefillnormal#62f LINE2:pgrefilldma#c8f"
$do1 -t "'pages recycled: $t1'" refill.1.png $refillstuff
$do2 -t "'pages recycled: $t2'" refill.2.png $refillstuff
$do3 -t "'pages recycled: $t3'" refill.3.png $refillstuff
$doM -t "'pages recycled: $tM'" refill.M.png $refillstuff
$do4 -t "'pages recycled: $t4'" refill.4.png $refillstuff
$do5 -t "'pages recycled: $t5'" refill.5.png $refillstuff
$do6 -t "'pages recycled: $t6'" refill.6.png $refillstuff
# Disk I/O
diskiostuff='
DEF:writehda=hda.rrd:write:AVERAGE
DEF:writehdc=hdc.rrd:write:AVERAGE
DEF:writehde=hde.rrd:write:AVERAGE
DEF:writehdf=hdf.rrd:write:AVERAGE
DEF:writehdg=hdg.rrd:write:AVERAGE
DEF:writehdh=hdh.rrd:write:AVERAGE
DEF:writehdi=hdi.rrd:write:AVERAGE
DEF:writehdk=hdk.rrd:write:AVERAGE
DEF:readhda=hda.rrd:read:AVERAGE
DEF:readhdc=hdc.rrd:read:AVERAGE
DEF:readhde=hde.rrd:read:AVERAGE
DEF:readhdf=hdf.rrd:read:AVERAGE
DEF:readhdg=hdg.rrd:read:AVERAGE
DEF:readhdh=hdh.rrd:read:AVERAGE
DEF:readhdi=hdi.rrd:read:AVERAGE
DEF:readhdk=hdk.rrd:read:AVERAGE
CDEF:havedata=writehda,UN,writehdc,UN,*,writehde,UN,*,writehdf,UN,*,writehdg,UN,*,writehdh,UN,*,writehdi,UN,*,writehdk,UN,*,readhda,UN,*,readhdc,UN,*,readhde,UN,*,readhdf,UN,*,readhdg,UN,*,readhdh,UN,*,readhdi,UN,*,readhdk,UN,*,UNKN,1,IF
CDEF:whda=writehda,UN,0,writehda,IF
CDEF:whdc=writehdc,UN,0,writehdc,IF
CDEF:whde=writehde,UN,0,writehde,IF
CDEF:whdf=writehdf,UN,0,writehdf,IF
CDEF:whdg=writehdg,UN,0,writehdg,IF
CDEF:whdh=writehdh,UN,0,writehdh,IF
CDEF:whdi=writehdi,UN,0,writehdi,IF
CDEF:whdk=writehdk,UN,0,writehdk,IF
CDEF:rhda=writehda,UN,0,readhda,IF
CDEF:rhdc=writehdc,UN,0,readhdc,IF
CDEF:rhde=writehde,UN,0,readhde,IF
CDEF:rhdf=writehdf,UN,0,readhdf,IF
CDEF:rhdg=writehdg,UN,0,readhdg,IF
CDEF:rhdh=writehdh,UN,0,readhdh,IF
CDEF:rhdi=writehdi,UN,0,readhdi,IF
CDEF:rhdk=writehdk,UN,0,readhdk,IF
CDEF:writeagg=whda,whdc,whde,whdf,whdg,whdh,whdi,whdk,+,+,+,+,+,+,+,512,*,havedata,*
CDEF:readagg=rhda,rhdc,rhde,rhdf,rhdg,rhdh,rhdi,rhdk,+,+,+,+,+,+,+,512,*,havedata,*
LINE2:readagg#6666ff
LINE2:writeagg#ff6666'
$do1 -t "'disk I/O: $t1'" diskio.1.png $diskiostuff
$do2 -t "'disk I/O: $t2'" diskio.2.png $diskiostuff
$do3 -t "'disk I/O: $t3'" diskio.3.png $diskiostuff
$doM -t "'disk I/O: $tM'" diskio.M.png $diskiostuff
$do4 -t "'disk I/O: $t4'" diskio.4.png $diskiostuff
$do5 -t "'disk I/O: $t5'" diskio.5.png $diskiostuff
$do6 -t "'disk I/O: $t6'" diskio.6.png $diskiostuff
# Disk Utilization
diskutilstuff='-l 0 -u 100 -r
DEF:writetimefd0=fd0.rrd:writetime:AVERAGE
DEF:writetimehdc=hdc.rrd:writetime:AVERAGE
DEF:writetimehde=hde.rrd:writetime:AVERAGE
DEF:writetimehdg=hdg.rrd:writetime:AVERAGE
DEF:writetimehdi=hdi.rrd:writetime:AVERAGE
DEF:writetimehdk=hdk.rrd:writetime:AVERAGE
DEF:writetimehda=hda.rrd:writetime:AVERAGE
DEF:readtimefd0=fd0.rrd:readtime:AVERAGE
DEF:readtimehdc=hdc.rrd:readtime:AVERAGE
DEF:readtimehde=hde.rrd:readtime:AVERAGE
DEF:readtimehdg=hdg.rrd:readtime:AVERAGE
DEF:readtimehdi=hdi.rrd:readtime:AVERAGE
DEF:readtimehdk=hdk.rrd:readtime:AVERAGE
DEF:readtimehda=hda.rrd:readtime:AVERAGE
CDEF:utilfd0=readtimefd0,writetimefd0,+,10,/
CDEF:utilhdc=readtimehdc,writetimehdc,+,10,/
CDEF:utilhde=readtimehde,writetimehde,+,10,/
CDEF:utilhdg=readtimehdg,writetimehdg,+,10,/
CDEF:utilhdi=readtimehdi,writetimehdi,+,10,/
CDEF:utilhdk=readtimehdk,writetimehdk,+,10,/
CDEF:utilhda=readtimehda,writetimehda,+,10,/
LINE1:utilhdc#911
LINE2:utilfd0#222
LINE2:utilhda#190
LINE2:utilhdg#e74
LINE2:utilhdi#cc3
LINE2:utilhdk#4e7
LINE2:utilhde#36e
'
$do1 -t "'disk utilization: $t1'" diskutil.1.png $diskutilstuff
$do2 -t "'disk utilization: $t2'" diskutil.2.png $diskutilstuff
$do3 -t "'disk utilization: $t3'" diskutil.3.png $diskutilstuff
$doM -t "'disk utilization: $tM'" diskutil.M.png $diskutilstuff
$do4 -t "'disk utilization: $t4'" diskutil.4.png $diskutilstuff
$do5 -t "'disk utilization: $t5'" diskutil.5.png $diskutilstuff
$do6 -t "'disk utilization: $t6'" diskutil.6.png $diskutilstuff
# Uptime
uptimestuff='DEF:inseconds=uptime.rrd:uptime:MAX CDEF:indays=inseconds,86400,/ LINE2:indays#00ffff'
$do1 -t "'uptime: $t1'" uptime.1.png $uptimestuff
$do2 -t "'uptime: $t2'" uptime.2.png $uptimestuff
$do3 -t "'uptime: $t3'" uptime.3.png $uptimestuff
$doM -t "'uptime: $tM'" uptime.M.png $uptimestuff
$do4 -t "'uptime: $t4'" uptime.4.png -l 0 $uptimestuff
$do5 -t "'max uptime: $t5'" uptime.5.png -l 0 $uptimestuff
$do6 -t "'max uptime: $t6'" uptime.6.png -l 0 $uptimestuff
# Apache hits
apachestuff='-l 0
DEF:hits=apache.rrd:hits:AVERAGE
DEF:localhits=apache.rrd:localhits:AVERAGE
CDEF:localhitsorzero=localhits,UN,0,localhits,IF,
CDEF:nonlocalhits=hits,localhitsorzero,-
LINE2:nonlocalhits#ffffff'
$do1 -t "'apache hits: $t1'" apache.1.png $apachestuff
$do2 -t "'apache hits: $t2'" apache.2.png $apachestuff
$do3 -t "'apache hits: $t3'" apache.3.png $apachestuff
$doM -t "'apache hits: $tM'" apache.M.png $apachestuff
$do4 -t "'apache hits: $t4'" apache.4.png $apachestuff
$do5 -t "'apache hits: $t5'" apache.5.png $apachestuff
$do6 -t "'apache hits: $t6'" apache.6.png $apachestuff
# Spam
spamA='-l 0
DEF:spam=spam.rrd:spam:AVERAGE
DEF:missed=spam.rrd:missed:AVERAGE'
spamL='-l 0
DEF:spam=spam.rrd:spam:LAST
DEF:missed=spam.rrd:missed:LAST'
spamstuff='
CDEF:total=spam,missed,+
CDEF:perhalfminute=total,30,*
CDEF:perminute=total,60,*
CDEF:perday=total,86400,*'
spamperhalfminute='LINE2:perminute#dd6666'
spamperminute='LINE2:perminute#dd6666'
spamperday='LINE2:perday#dd6666'
$do1 -t "'spam: $t1'" spam.1.png $spamL $spamstuff $spamperhalfminute
$do2 -t "'spam/minute: $t2'" spam.2.png $spamA $spamstuff $spamperminute
$do3 -t "'spam/minute: $t3'" spam.3.png $spamA $spamstuff $spamperminute
$doM -t "'spam/minute: $tM'" spam.M.png $spamA $spamstuff $spamperminute
$do4 -t "'spam/day: $t4'" spam.4.png $spamA $spamstuff $spamperday
$do5 -t "'spam/day: $t5'" spam.5.png $spamA $spamstuff $spamperday
$do6 -t "'spam/day: $t6'" spam.6.png $spamA $spamstuff $spamperday
# Pan tasks
panstuff='DEF:tasks=pantasks.rrd:tasks:AVERAGE LINE2:tasks#cc6699'
$do1 -t "'Pan tasks: $t1'" pantasks.1.png $panstuff
$do2 -t "'Pan tasks: $t2'" pantasks.2.png $panstuff
$do3 -t "'Pan tasks: $t3'" pantasks.3.png $panstuff
$doM -t "'Pan tasks: $tM'" pantasks.M.png $panstuff
# $do4 -t "'Pan tasks: $t4'" pantasks.4.png $panstuff
# $do5 -t "'Pan tasks: $t5'" pantasks.5.png $panstuff
# $do6 -t "'Pan tasks: $t6'" pantasks.6.png $panstuff
# Wes' Car Collection
wesstuff='-l 0 DEF:cars=wescars.rrd:cars:AVERAGE LINE2:cars#33ff33'
# $do1 -t "'Wes cars: $t1'" wescars.1.png $wesstuff
# $do2 -t "'Wes cars: $t2'" wescars.2.png $wesstuff
# $do3 -t "'Wes cars: $t3'" wescars.3.png $wesstuff
# $doM -t "'Wes cars: $tM'" wescars.M.png $wesstuff
$do4 -t "'Wes cars: $t4'" wescars.4.png $wesstuff
$do5 -t "'Wes cars: $t5'" wescars.5.png $wesstuff
$do6 -t "'Wes cars: $t6'" wescars.6.png $wesstuff