Welcome, Guest. Please login or register.
Did you miss your activation email?
Friday 06 December 2024, 10:35:26 am

Login with username, password and session length

The Latest Endian Firewall is now available for download HERE
14261 Posts in 4377 Topics by 6517 Members
Latest Member: Sandro
Search:     Advanced search
+  EFW Support
|-+  Support
| |-+  General Support
| | |-+  Does Endian have monthly bandwidth usage somewhere?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 [2]  All Go Down Print
Author Topic: Does Endian have monthly bandwidth usage somewhere?  (Read 45643 times)
maxim
Full Member
***
Offline Offline

Posts: 23

This forum was a waste of time.


« Reply #15 on: Tuesday 11 May 2010, 05:00:28 am »

Since I don't know perl at all, i've managed to convert the section that generates the graph into a bash script. The RRD package that the perl script uses has a command line tool called rrdtool and it can be used to generate the same PNG file.

Here is an example which will grab the data from last month:
Code:
rrdtool graph\
                /home/httpd/html/graphs/green-mtd.png\
                --start 20100401 --end 20100501 -aPNG -i -z\
                --alt-y-grid -w 600 -h 100\
                --color SHADEA#EAE9EE\
                --color SHADEB#EAE9EE\
                --color BACK#EAE9EE\
                -t "$titletraffic"\
                -v "$legend"\
                DEF:incoming=/var/log/rrd/GREEN.rrd:incoming:AVERAGE\
                DEF:outgoing=/var/log/rrd/GREEN.rrd:outgoing:AVERAGE\
                VDEF:inctotal=incoming,TOTAL\
                VDEF:outtotal=outgoing,TOTAL\
                \
                "COMMENT:\\s"\
                "COMMENT:  "\
                "COMMENT:                 Maximum"\
                "COMMENT:                 Average"\
                "COMMENT:                 Current"\
                "COMMENT:\\n"\
                \
                "AREA:incoming#00FF00:Incoming traffic"\
                "GPRINT:incoming:MAX:%12.3lf %sBps"\
                "GPRINT:incoming:AVERAGE:%12.3lf %sBps"\
                "GPRINT:incoming:LAST:%12.3lf %sBps\\n"\
                \
                "LINE1:outgoing#0000FF:Outgoing traffic"\
                "GPRINT:outgoing:MAX:%12.3lf %sBps"\
                "GPRINT:outgoing:AVERAGE:%12.3lf %sBps"\
                "GPRINT:outgoing:LAST:%12.3lf %sBps\\n"\
                "GPRINT:inctotal:Total Incoming\\:%12.3lf %sB\\n"\
                "GPRINT:outtotal:Total Outgoing\\:%12.3lf %sB\\n"
It doesn't look exactly the same due to spacing, the title, and the legend, but for the most part it's there. This type of graph could be incorporate into the WebUI if a user was so inclined to write the code to accomplish it. I'm not that person though, perl is not my forte.

Even so, if this was incorporated into the UI it doesn't include the address of who was using the bandwidth, it doesn't include the IP address of individual work stations.
Logged
Pages: 1 [2]  All Go Up Print 
« previous next »
Jump to:  

Page created in 0.047 seconds with 18 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com