OpenBSD kernel memory statistics


The OpenBSD platform uses mbuf(9) data structures, macros, and function calls to manage the kernel memory used by the various networking protocols. An adequate supply of mbuf(9)‘s is required for proper operation, and mbuf(9) starvation can lead to kernel panics. You can monitor mbuf(9) usage with the netstat utilities “-m” option:

$ netstat -m

136 mbufs in use:
129 mbufs allocated to data
3 mbufs allocated to packet headers
4 mbufs allocated to socket names and addresses
33/56/256 mbuf cluster pages in use (current/peak/max)
576 Kbytes allocated to network (50% in use)
0 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines

If you run out of mbufs, you can increase the NMBCLUSTERS option to add more.

This article was posted by Matty on 2005-03-21 23:22:00 -0400 -0400