150b0
![]() |
|
|
|
|
|||||||
| Networking Network related discussions (including general TCP/IP stuff, routing, etc). |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I'm looking for a basic tool to monitor bandwidth on my machine so i can effectively set up altq. I remember using ntop of pfsense but it used to crash every 2-3 minutes...any thoughts?
all i really need is a graph showing my bandwidth throughout the day. |
|
#2
|
|||
|
|||
|
Try MRTG or zabbix. I'm working on a tool that measures per-IP usage (bandwidth / packet rate).
|
|
#3
|
|||
|
|||
|
i've used MRTG before.....it's been awhile.
I didn't need anything like that, i ended up using vnstat thanks though, i WILL check out zabbix just because i've never seen it |
|
#4
|
||||
|
||||
|
net/nload
![]() "screenshot": Code:
Device vlan13 [xx.xx.xx.xx] (8/8):
=========================================================================================================
Incoming:
Curr: 0.29 kBit/s
Avg: 0.60 kBit/s
Min: 101.37 kBit/s
. .. Max: 3.64 MBit/s
#| .#| .. ##...## . ... ..||## .##. ..... #### Ttl: 2.15 GByte
Outgoing:
Curr: 25.83 kBit/s
Avg: 66.96 kBit/s
Min: 3.26 kBit/s
Max: 0.56 kBit/s
. Ttl: 3.84 GByte
|
| The Following User Says Thank You to edhunter For This Useful Post: | ||
MG (May 16th, 2009) | ||
|
#5
|
||||
|
||||
|
You're already running pf, so sysutils/pfstat should be a breeze. You can monitor altq queues with it as well. It produces mrtg-like jpg/png graphs for any time interval you want.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Adminstrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
|
#6
|
|||
|
|||
|
And adding net/bmon for per interface statistics capable of being saved to a database, flat html and rrdtool.
Also, [file]sysutils/pftop[/port] view '8' is very useful for live monitoring of already existing queues, since the last time you reloaded the rules. Especially with borrows, it's good to see they are needed / being overloaded etc.
__________________
The core concept of freedom is the lack of rules, even those made to "protect freedom". Last edited by phoenix; December 16th, 2010 at 07:16. Reason: Add port tags |
| The Following User Says Thank You to Mel_Flynn For This Useful Post: | ||
prox (February 22nd, 2011) | ||
|
#7
|
|||
|
|||
|
thanks for the suggestions guys =)
|
|
#8
|
|||
|
|||
|
well i tried pfstat but i can't seem to get any graphs..when i do pfstat -q i get nothing
not sure what i did wrong. here is my config file Code:
#
collect 1 = interface "em0" pass bytes in ipv4 diff
collect 2 = interface "em0" pass bytes out ipv4 diff
collect 3 = global states entries
image "/usr/local/www/basic/pfstat/pfstat_day.jpg" {
from 1 days to now
width 980 height 200
left
graph 1 "in" "bytes/s" color 0 192 0 filled,
graph 2 "out" "bytes/s" color 0 0 255
right
graph 3 "states" "entries" color 192 192 0
}
image "/usr/local/www/basic/pfstat/pfstat_week.jpg" {
from 1 weeks to now
width 980 height 200
left
graph 1 "in" "bytes/s" color 0 192 0 filled,
graph 2 "out" "bytes/s" color 0 0 255
right
graph 3 "states" "entries" color 192 192 0
}
image "/usr/local/www/basic/pfstat/pfstat_month.jpg" {
from 1 months to now
width 980 height 200
left
graph 1 "in" "bytes/s" color 0 192 0 filled,
graph 2 "out" "bytes/s" color 0 0 255
right
graph 3 "states" "entries" color 192 192 0
}
#
collect 4 = interface "em0" pass packets in ipv4 diff
collect 5 = interface "em0" pass packets out ipv4 diff
collect 6 = interface "em0" block packets in ipv4 diff
collect 7 = interface "em0" block packets out ipv4 diff
image "/usr/local/www/basic/pfstat/pfstat-packets_day.jpg" {
from 1 days to now
width 980 height 200
left
graph 4 "pass in" "packets/s" color 0 192 0 filled,
graph 5 "pass out" "packets/s" color 0 0 255
right
graph 6 "block in" "packets/s" color 255 0 0,
graph 7 "block out" "packets/s" color 192 192 0
}
image "/usr/local/www/basic/pfstat/pfstat-packets_week.jpg" {
from 1 weeks to now
width 980 height 200
left
graph 4 "pass in" "packets/s" color 0 192 0 filled,
graph 5 "pass out" "packets/s" color 0 0 255
right
graph 6 "block in" "packets/s" color 255 0 0,
graph 7 "block out" "packets/s" color 192 192 0
}
image "/usr/local/www/basic/pfstat/pfstat-packets_month.jpg" {
from 1 months to now
width 980 height 200
left
graph 4 "pass in" "packets/s" color 0 192 0 filled,
graph 5 "pass out" "packets/s" color 0 0 255
right
graph 6 "block in" "packets/s" color 255 0 0,
graph 7 "block out" "packets/s" color 192 192 0
}
#
collect 8 = global states inserts diff
collect 9 = global states removals diff
collect 10 = global states searches diff
image "/usr/local/www/basic/pfstat/pfstat-states_day.jpg" {
from 1 days to now
width 980 height 200
left
graph 8 "inserts" "states/s" color 0 192 0 filled,
graph 9 "removals" "states/s" color 0 0 255
right
graph 10 "searches" "states/s" color 255 0 0
}
image "/usr/local/www/basic/pfstat/pfstat-states_week.jpg" {
from 1 weeks to now
width 980 height 200
left
graph 8 "inserts" "states/s" color 0 192 0 filled,
graph 9 "removals" "states/s" color 0 0 255
right
graph 10 "searches" "states/s" color 255 0 0
}
image "/usr/local/www/basic/pfstat/pfstat-states_week.jpg" {
from 1 weeks to now
width 980 height 200
left
graph 8 "inserts" "states/s" color 0 192 0 filled,
graph 9 "removals" "states/s" color 0 0 255
right
graph 10 "searches" "states/s" color 255 0 0
}
image "/usr/local/www/basic/pfstat/pfstat-states_month.jpg" {
from 1 months to now
width 980 height 200
left
graph 8 "inserts" "states/s" color 0 192 0 filled,
graph 9 "removals" "states/s" color 0 0 255
right
graph 10 "searches" "states/s" color 255 0 0
}
#
collect 15 = global counters match diff
collect 16 = global counters bad-offset diff
collect 17 = global counters fragment diff
collect 18 = global counters short diff
collect 19 = global counters normalize diff
collect 20 = global counters memory diff
collect 21 = global counters bad-timestamp diff
collect 22 = global counters congestion diff
collect 23 = global counters ip-option diff
collect 24 = global counters proto-cksum diff
collect 25 = global counters state-mismatch diff
collect 26 = global counters state-insert diff
collect 27 = global counters state-limit diff
collect 28 = global counters src-limit diff
collect 29 = global counters synproxy diff
image "/usr/local/www/basic/pfstat/pfstat-errors_day.jpg" {
from 1 days to now
width 980 height 200
left
graph 17 "frag" "/s" color 192 0 192,
graph 22 "cong" "/s" color 0 192 192,
graph 23 "iopt" "/s" color 0 0 255,
graph 24 "csum" "/s" color 192 192 0,
graph 25 "mism" "/s" color 255 0 0
#
right
graph 15 "match" "/s" color 0 192 0
}
image "/usr/local/www/basic/pfstat/pfstat-errors_week.jpg" {
from 1 weeks to now
width 980 height 200
left
graph 17 "frag" "/s" color 192 0 192,
graph 22 "cong" "/s" color 0 192 192,
graph 23 "iopt" "/s" color 0 0 255,
graph 24 "csum" "/s" color 192 192 0,
graph 25 "mism" "/s" color 255 0 0
# others are usually all zero here
right
graph 15 "match" "/s" color 0 192 0
}
image "/usr/local/www/basic/pfstat/pfstat-errors_month.jpg" {
from 1 months to now
width 980 height 200
left
graph 17 "frag" "/s" color 192 0 192,
graph 22 "cong" "/s" color 0 192 192,
graph 23 "iopt" "/s" color 0 0 255,
graph 24 "csum" "/s" color 192 192 0,
graph 25 "mism" "/s" color 255 0 0
right
graph 15 "match" "/s" color 0 192 0
}
#######################################################
#######################################################
Code:
* * * * * /usr/local/bin/pfstat -q -d /var/db/pfstat.db 10 6-19 * * * /usr/local/bin/pfstat -p -d /var/db/pfstat.db 25 3 * * * /usr/local/bin/pfstat -t 30 -d /var/db/pfstat.db |
|
#9
|
||||
|
||||
|
You will have to keep numbering on, not reuse 1, 2, 3 every time. Example:
Code:
collect 1 = interface "em0" pass bytes in ipv4 diff
collect 2 = interface "em0" pass bytes out ipv4 diff
image "/usr/local/www/data/bandwidth_em0_day.png" {
from 24 hours to now
type png
width 800 height 320
left
graph 1 bps "in" "bits/s" color 0 192 0 filled
right
graph 2 bps "out" "bits/s" color 0 0 255
}
collect 3 = interface "em1" pass bytes in ipv4 diff
collect 4 = interface "em1" pass bytes out ipv4 diff
image "/usr/local/www/data/bandwidth_em1_day.png" {
from 24 hours to now
type png
width 800 height 320
left
graph 3 bps "in" "bits/s" color 0 192 0 filled
right
graph 4 bps "out" "bits/s" color 0 0 255
}
collect 5 = interface "em0" pass bytes in ipv4 diff
collect 6 = interface "em0" pass bytes out ipv4 diff
image "/usr/local/www/data/bandwidth_em0_week.png" {
from 7 days to now
type png
width 800 height 320
left
graph 5 bps "in" "bits/s" color 0 192 0 filled
right
graph 6 bps "out" "bits/s" color 0 0 255
}
collect 7 = interface "em1" pass bytes in ipv4 diff
collect 8 = interface "em1" pass bytes out ipv4 diff
image "/usr/local/www/data/bandwidth_em1_week.png" {
from 7 days to now
type png
width 800 height 320
left
graph 7 bps "in" "bits/s" color 0 192 0 filled
right
graph 8 bps "out" "bits/s" color 0 0 255
}
collect 9 = global states entries
image "/usr/local/www/data/states.png" {
from 24 hours to now
type png
width 800 height 320
left
graph 9 "states" "entries" color 200 0 0 filled
}
You can use pfstat -vp and pfstat -vq for more info. I advise the use of png, much more lightweight. You can easily run -q every minute and -p every five minutes. I'm doing that on servers doing 125+ Mbit/s, and it's not even registering in 'top'.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Adminstrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
| The Following User Says Thank You to DutchDaemon For This Useful Post: | ||
Enter4 (January 13th, 2013) | ||
|
#10
|
|||
|
|||
|
Try iftop.......
__________________
Regards Kiran Patil |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] Use swat (Samba admin tool) over network? | michaelrmgreen | Web & Network Services | 4 | December 15th, 2010 15:41 |
| performance monitoring | jwhitt | General | 1 | November 2nd, 2010 07:04 |
| Webserver monitoring | solar_illuminations | Web & Network Services | 18 | May 5th, 2010 17:24 |
| Monitoring Bandwidth | atwinix | Networking | 4 | October 14th, 2009 00:06 |
| Serious network monitoring tool | Mad_Dud | Networking | 2 | April 25th, 2009 20:34 |