pfstat 2.2 and FreeBSD (was: SNMP access to pf ALTQ data?)

Fabian Keil freebsd-listen at fabiankeil.de
Sat Jul 8 11:12:38 UTC 2006


Daniel Hartmeier <daniel at benzedrine.cx> wrote:

> On Sat, Jul 08, 2006 at 02:18:12AM -0500, J. Buck Caldwell wrote:
> 
> > Is it possible to track pf ALTQ usage with MRTG? I notice that
> > FreeBSD's built-in bsnmpd has a module and mibs to support pf, but
> > I know too little about SNMP to figure out how to access the queue
> > stats.

> Some queue related values are available, take a look at
> 
> http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/bsnmpd/modules/snmp_pf/
> 
> especially the BEGEMOT-PF-MIB.txt file.
> 
> But pf_snmp.c doesn't use the DIOCGETQSTATS ioctl to fetch those byte
> counters you're looking for.
> 
> Maybe Philip can add them. One example of how to fetch the queue stats
> is pfctl itself, another is pfstat-2.2 pf.c query_queues(), see
> 
> http://www.benzedrine.cx/pfstat.html
> 
> (make sure to grab pfstat-2.2.tar.gz, older versions didn't fetch
> queue stats, either)

Yesterday I installed pfstat 2.2 on FreeBSD RELENG_6. It compiled cleanly,
but fetching the statistics failed with "ioctl DIOCIGETIFACES not supported
by device" (not the exact wording).

To get it running I used:
<http://www.fabiankeil.de/sourcecode/freebsd/pfstat-2.2.diff>
(update for sysutils/pfstat from 1.7 to 2.2)

Could someone with FreeBSD PF foo please check patch-pf.c
for correctness?

Fabian
-- 
http://www.fabiankeil.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-pf/attachments/20060708/ef60ca4b/signature.pgp


More information about the freebsd-pf mailing list