Design and Implementation of Subsystem Support Libraries for Monitoring and Management

This project is about creating wrapper libraries to support monitoring and management applications to avoid direct use of the FreeBSD kernel memory and sysctl(8) interface. This approach would allow the kernel implementation to change and monitoring applications to be extended without breaking applications and requiring them to be recompiled. For this project, we propose to provide such a library for the network statistics functions (i.e. libnetstat) as a proof of concept, together with methods for building similar libraries for other subsystems.

Description

The goal of this project is to help creation of wrapper libraries to support monitoring and management applicantions to avoid direct use of the kvm(3) device and the sysctl(8) variables in the FreeBSD kernel. This would allow the kernel implementation to change and monitoring to be extended without breaking applications and requiring them to be recompiled.

The initial idea is based on Robert Watson's libmemstat(3) library, where he created an abstract interface for collecting and providing information on memory allocation statistics. Its design and development was inspired by the following needs:

For this project, we propose to provide a library for the network statistics functions (i.e. libnetstat). Hopefully, it is just a start, lessons learned during the design of this implementation could be used for creating similar libraries for other subsystems as time goes on.

The reason why libnetstat have been chosen, is that the network-related abstractions (e.g. "sockets", "socket buffers") are frequently monitored abstractions, with lot of FreeBSD and third-party tools wanting to show information about them.

Components

There are three parts to be implemented:

For the implementation, we will need to find the abstractions most suitable for the selected applications. For example, the current libmemstat(3) API presents a set for memory types, and allows programs to query various statistics and properties on each type. In our opinion, the same could be implemented for the network statistics.

Abstractions provided for the following functions:

Future Plans

Code

The current version of the implementation can be found in the project's Perforce depot.

PGJSoC2009 (last edited 2009-10-05T00:42:42+0000 by PáliGáborJános)