vnStat on FreeBSD2008年02月23日 18時39分06秒

vnStat was recently added to the FreeBSD ports collection.

% cat /usr/ports/net/vnstat/pkg-descr 
vnStat is a console-based network traffic monitor. It keeps a log of
hourly, daily and monthly network traffic for the selected intetface(s).
However, it isn't a packet sniffer. The traffic information is analyzed
from the proc(5) filesystem. That way vnStat can be used even
without root permissions.

WWW: http://humdi.net/vnstat/

Despite the fact that it claims that it reads proc filesystem, it seems working without mounting /proc on FreeBSD. Indeed, the proc filesystem is totally different between FreeBSD and Linux. It is quite mysterious.

Of course, the solution will be in the source code. In fact, it uses sysctl(8) to obtain the boot time and getifaddrs(3) to obtain network interface information. It is true for FreeBSD, NetBSD, and OpenBSD, as well as Apple Darwin.

So, vnStat does not require or use proc filesystem on *BSD systems.

コメント

コメントをどうぞ

※メールアドレスとURLの入力は必須ではありません。 入力されたメールアドレスは記事に反映されず、ブログの管理者のみが参照できます。

※なお、送られたコメントはブログの管理者が確認するまで公開されません。

名前:
メールアドレス:
URL:
コメント:

トラックバック

このエントリのトラックバックURL: http://uyota.asablo.jp/blog/2008/02/23/2655342/tb

※なお、送られたトラックバックはブログの管理者が確認するまで公開されません。