Wednesday, May 03, 2006

OpenBSD - Monitoring Network Interface

Sometime we need to monitor our network interface and having it's statistic shown in real time. If you are using OpenBSD, that's actually a nifty system tool to help you to monitor your network interface - systat, systat is used to monitor the system and showing it's statistic in real time. This nifty tool not only has capabilities such as monitor network interface but network stat(netstat) too, others such as disk usage and iostat can be monitored as well in real time. But here I just want to show how you can use it to monitor the network interface.

To monitor your network interface with 1 sec screen refresh rate, just run

shell>systat -w 1 ifstat 1

The first term shows the statistic of multiple network interface, the second one shows the bandwidth which I use the ifstat that installed from the OpenBSD package. Like I said, you can monitor netstat too, just run

shell>systat netstat

I think monitoring netstat in real time is sweet because most people might find it useful especially the Send-Q and Recv-Q that showing you the current network statistic of certain port/services.

If you want to switch to monitor your swap or iostat, you don't have to quit, for example if you want to switch to monitor swap, just run : with any other statistic you want to monitor. For example,


Other statisitcs that can be tracked are iostat, vmstat and etc. To refresh the screen manually, just type Control+L will do or if you want to suspend the monitoring, just run Control+Z.

Enough for now, I need to work on my Sguil stuffs again, ciao.

Cheers (:])

No comments: