Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
LIBGEOM(3)		 BSD Library Functions Manual		    LIBGEOM(3)

NAME
     geom_stats_open, geom_stats_close,	geom_stats_resync,
     geom_stats_snapshot_get, geom_stats_snapshot_free,
     geom_stats_snapshot_timestamp, geom_stats_snapshot_reset,
     geom_stats_snapshot_next -- userland API library for kernel GEOM subsys-
     tem

LIBRARY
     Userland API Library for kernel GEOM subsystem (libgeom, -lgeom)

SYNOPSIS
     #include <libgeom.h>

   Statistics Functions
     void
     geom_stats_close(void);

     int
     geom_stats_open(void);

     void
     geom_stats_resync(void);

     void *
     geom_stats_snapshot_get(void);

     void
     geom_stats_snapshot_free(void *arg);

     void
     geom_stats_snapshot_timestamp(void	*arg, struct timespec *tp);

     void
     geom_stats_snapshot_reset(void *arg);

     struct g_stat *
     geom_stats_snapshot_next(void *arg);

DESCRIPTION
     The geom library contains the official and	publicized API for interacting
     with the GEOM subsystem in	the kernel.

   Statistics Functions
     GEOM collects statistics data for all consumers and providers, but	does
     not perform any normalization or presentation on the raw data, this is
     left as an	excercize for user-land	presentation utilities.

     The geom_stats_open() and geom_stats_close() functions open and close the
     necessary pathways	to access the raw statistics information in the	ker-
     nel.  These functions are likely to open one or more files	and cache the
     file descriptors locally.	The geom_stats_open() function returns zero on
     success, and sets errno if	not.

     The geom_stats_resync() function will check if more statistics collection
     points have been added in the kernel since	geom_stats_open() or the pre-
     vious call	to geom_stats_resync().

     The geom_stats_snapshot_get() function will acquire a snapshot of the raw
     data from the kernel, and while a reasonable effort is made to make this
     snapshot as atomic	and consistent as possible, no guarantee is given that
     it	will actually be so.  The snapshot must	be freed again using the
     geom_stats_snapshot_free()	function.  The geom_stats_snapshot_get() func-
     tion returns NULL on failure.

     The geom_stats_snapshot_timestamp() function provides access to the time-
     stamp acquired in the snapshot.

     The geom_stats_snapshot_reset() and geom_stats_snapshot_next() functions
     provide an	iterator over the statistics slots in the snapshot.  The
     geom_stats_snapshot_reset() function forces the internal pointer in the
     snapshot back to before the first item.  The geom_stats_snapshot_next()
     function returns the next item, and NULL if there are no more items in
     the snapshot.

AUTHORS
     Poul-Henning Kamp <phk@FreeBSD.org>

HISTORY
     The geom library appeared in FreeBSD 5.1.

BSD			       February	8, 2003				   BSD

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | AUTHORS | HISTORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=geom_stats_open&sektion=3&manpath=FreeBSD+5.2-RELEASE+and+Ports>

home | help