History log of /freebsd-current/lib/libmemstat/libmemstat.3
Revision Date Author Comments
# fa9896e0 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line nroff pattern

Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/


# 2b7af31c 23-Jun-2014 Baptiste Daroussin <bapt@FreeBSD.org>

use .Mt to mark up email addresses consistently (part3)

PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>


# 345e3f4d 10-Feb-2014 Gleb Smirnoff <glebius@FreeBSD.org>

Expose real size of UMA allocations via libmemstat(3).

Sponsored by: Nginx, Inc.


# 3102cfe2 25-Feb-2012 Glen Barber <gjb@FreeBSD.org>

Fix various typos in manual pages.

Submitted by: amdmi3
PR: 165431
MFC after: 1 week


# 1882360b 01-Aug-2011 Sergey Kandaurov <pluknet@FreeBSD.org>

Get rid of MAXCPU knowledge used for internal needs only. Switch to
dynamic memory allocation to hold per-CPU memory types data (sized to
mp_maxid for UMA, and to mp_maxcpus for malloc to match the kernel).

That fixes libmemstat with arbitrary large MAXCPU values and therefore
eliminates MEMSTAT_ERROR_TOOMANYCPUS error type.

Reviewed by: jhb
Approved by: re (kib)


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 799162a6 03-Aug-2010 Joel Dahl <joel@FreeBSD.org>

Spelling fixes.


# aa12cea2 14-Apr-2010 Ulrich Spörlein <uqs@FreeBSD.org>

mdoc: order prologue macros consistently by Dd/Dt/Os

Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by: ru
Approved by: philip, ed (mentors)


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 33d6b9fb 21-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Tidy up markup and fix two bugs.


# 33f23dc2 15-Aug-2005 Robert Watson <rwatson@FreeBSD.org>

The "Mbuf" zone was renamed "mbuf" to improve consistency, but the code
example in libmemstat.3 was not updated to take this rename into account.
Update the example.

PR: 84946
Submitted by: Wojciech A. Koszek <dunstan at freebsd dot czest dot pl>
MFC after: 1 day


# 513c89ce 09-Aug-2005 Robert Watson <rwatson@FreeBSD.org>

Document kvm(3)-related error constants, and correct minor formatting
nits.


# ba23fa9b 06-Aug-2005 Robert Watson <rwatson@FreeBSD.org>

Teach libmemstat(3) how to extract malloc(9) statistics using kvm(3),
so that libmemstat can be used to view full memory statistics from
kernel core dumps and /dev/mem. This is provided via a new query
function, memstat_kvm_malloc(), which is also automatically invoked
by memstat_kvm_all(). A kvm handle must be passed in.

This will allow malloc(9)-specific code to be removed from vmstat(8).


# 33c20d18 01-Aug-2005 Robert Watson <rwatson@FreeBSD.org>

Add memstat_kvm_uma(), an implementation of a libmemstat(3) query routine
that knows how to extract UMA(9) allocator statistics from a core dump or
live memory image using kvm(3). The caller is expected to provide the
necessary kvm_t handle, which is then used by libmemstat(3).

With these changes, it is trivially straight forward to re-introduce
vmstat -z support on core dumps, which was lost when UMA was introduced.

In the short term, this requires including vm/ include files that are not
intended for extra-kernel use, requiring in turn some ugliness.


# e754c6bb 23-Jul-2005 Robert Watson <rwatson@FreeBSD.org>

Having decided not to provide a libmemstat(3) error number to text
conversion routine, now change my mind and add one, memstat_strerror(3),
which returns a const char * pointer to a string describing the error,
to be used on the results of memstat_mtl_geterror().

While here, also correct a minor typo in the HISTORY man page.

Pointers on improving ease of internationalization would be
appreciated.

MFC after: 1 day


# 70ee997e 23-Jul-2005 Robert Watson <rwatson@FreeBSD.org>

Document additional aspects of libmemstat(3):

- Short description of each memory type access method.

- Descriptions of libmemstat(3) errors and memstat_mtl_geterror(3).

MFC after: 1 day


# ca108fe2 20-Jul-2005 Robert Watson <rwatson@FreeBSD.org>

UMA supports "secondary" zones, in which a second zone can be layered
on top of a primary zone, sharing the same allocation "keg". When
reporting statistics for zones, do not report the free items in the
keg as part of the free items in the zone, or those free items will
be reported more than once: for the primary zone, and then any
secondary zones off the primary zone. Separately record and maintain
a kegfree statistic, and export via memstat_get_kegfree(), which is
available for use if needed. Since items free'd back to the keg are
not fully initialized, and hence may not actually be available (since
secondary zone ctor-time initialization can fail), this makes some
amount of sense.

This change corrects a bug made visible in the libmemstat(3)
modifications to netstat: mbufs freed back to the keg from the
packet zone would be counted twice, resulting in negative values
being printed in the mbuf free count.

Some further refinement of reporting relating to secondary zones may
still be required.

Reported by: ssouhlal
MFC after: 3 days


# e86bb57b 15-Jul-2005 Robert Watson <rwatson@FreeBSD.org>

Provide more documentation on caller-owned storage in struct memory_type,
as well as documenting MEMSTAT_MAXCALLER.

MFC after: 1 week


# 09df0a9a 15-Jul-2005 Robert Watson <rwatson@FreeBSD.org>

Add a section on the allocator name space and its interactions with
memstat_mtl_find().

MFC after: 10 days


# 0cddce49 14-Jul-2005 Robert Watson <rwatson@FreeBSD.org>

Add libmemstat(3), a library for use by debugging and monitoring
applications in tracking kernel memory statistics. It provides an
abstracted interface to uma(9) and malloc(9) statistics, wrapped
around the recently added binary stream sysctls for the allocators.

Using this interface, it is easy to build monitoring tools, query
specific memory types for usage information, etc. Facilities are
provided for binding caller-provided data to memory types,
incremental updates of memory types, and queries that span multiple
allocators.

Support for additional allocators is (relatively) easy to add.

The API for libmemstat(3) will probably change some over time as
consumers are written, and requirements evolve. It is written to
avoid encoding ABIs for data structure layout into consuming
applications for this reason.

MFC after: 1 week