# FlowScan Makefile for graphs # $Id: graphs.mf.in,v 1.8 2000/08/19 02:11:10 dplonka Exp $ # # Dave Plonka #SHELL = /bin/ksh SHELL = /bin/bash perl = /usr/bin/perl rrdtool = /usr/bin/rrdtool rrddir = . # you might want to specify these on the make(1) command line: width = 640 height = 150 hours = 48 # This is the time before which you do not want to graph the data values, # because they are unreliable: # Fri Apr 9 10:30:00 1999 totals_last_error = 923671800 past_hours = $$($(perl) -e 'print time - $(hours)*60*60') totals_past_hours = $$($(perl) -e '$$when = time - $(hours)*60*60; if (0 == $(totals_last_error) || $(totals_last_error) > $$when) { print "$(totals_last_error)" } else { print $$when } ') all: services hecn services.hecn services: services.daily services.weekly hecn: bsc dsu masu lrsc misu misu-b ndscs ndsu und vcsu wsc prairie-public hecn.east hecn.total hecn.percentile bsc: cd BSC; make percentile_95=`./95percentile` dsu: cd DSU; make percentile_95=`./95percentile` lrsc: cd LRSC; make percentile_95=`./95percentile` masu: cd MaSU; make percentile_95=`./95percentile` misu: cd MiSU; make percentile_95=`./95percentile` misu-b: cd MiSU-B; make percentile_95=`./95percentile` ndscs: cd NDSCS; make percentile_95=`./95percentile` ndsu: cd NDSU; make percentile_95=`./95percentile` und: cd UND; make percentile_95=`./95percentile` vcsu: cd VCSU; make percentile_95=`./95percentile` wsc: cd WSC; make percentile_95=`./95percentile` prairie-public: cd Prairie-Public; make percentile_95=`./95percentile` hecn.total: cd HECN.total; make percentile_95=`./95percentile` hecn.percentile: 95percentile.list.tmp mv 95percentile.list.tmp 95.percentile.list hecn.east: rrdtool graph \ 134.129.0.0_16.png \ -v 'Mbps' \ -h 320 -w 640 \ -t 'HECN EAST Internet 1' \ DEF:total_out=134.129.0.0_16.rrd:out_bytes:AVERAGE \ DEF:total_in=134.129.0.0_16.rrd:in_bytes:AVERAGE \ "CDEF:Total_out_Mbps=total_out,000008,*" \ "CDEF:Total_in_Mbps=total_in,000008,*" \ AREA:Total_in_Mbps#00c000:'In' \ LINE1:Total_out_Mbps#0000ff:'Out' codered: /var/log/flowscan/graphs/codered.search & #codered: # /usr/bin/flowdumper -se \ # '6 == $$protocol && 80 == $$dstport && 7 == $$pkts && 4327 == $$bytes \ # && ($$TH_FIN & $$tcp_flags)' /var/log/cflowd/flows/* >> /tmp/codered services.daily: make -f graphs.services.mf hours=48 tag="" filetype=gif organization=NDUS services.weekly: make -f graphs.services.mf hours=168 tag="_week" filetype=png organizatoin=NDUS services.hecn: cd protocols; make .SUFFIXES: .rrd .xml .rrd.xml: $(rrdtool) dump $< > $@ || rm -f $@