Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Sep 2012 21:41:19 +0700
From:      "Ivan Alexandrovich" <ivsan@ngs.ru>
To:        freebsd-net@freebsd.org
Subject:   getting counters for a plenty of vlan ifaces
Message-ID:  <web-25219141@mx16.intranet.ru>

next in thread | raw e-mail | index | archive | help
Hi

We are running freebsd9.0 on a router with
more than 1000 of subscriber's vlan interfaces.
Outgoing packet rate is approximately 40 kpps.

There's a need to collect bytes and packets
counters for all those vlan interfaces every
minute (or even twice a minute) and store them
in a plain text file:
<em1.757> <bytes_in> <bytes_out> <pkts_in> <pkts_out>
<em1.761> <bytes_in> <bytes_out> <pkts_in> <pkts_out>
...
Also I'd like to copy the whole arp table
into a file (not so frequently).

Our observations show that using common tools
like a snmp daemon can create a significant
CPU load. If I'm not mistaken this is due to
high rate of context switches that are need
to access kernel data from the userspace.

So it is desirable to run this tasks - saving
counters and arp table into files on a dedicated
cpu core. So that copying data from kernel
will not affect router performance - packet delays,
for example.

I would like to ask for an advice about possible
solutions.

Currently there are two scenarios I can think of:
  1) Our custom daemon using userspace APIs (rtmsg,
     if_* functions, don't know for sure).
  2) Our kld module that will store the data
     needed directly from the kernel into the files.

Thanks,
Ivan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?web-25219141>