Intro(3mas)


Intro -- introduction to Metric Access Support (MAS)

Synopsis

   cc [options] file -lmas
   

#include <mas.h>

Description

The Metric Access Support (MAS) functions allow applications to advertise and gather performance metrics. MAS removes machine dependencies from user level raw metric gathering by providing a common programming interface for metric information from both the system and user applications.

Overview

Metric data are supplied by a provider, which can be either an application or the operating system, and are collected by a consumer application. Metric identification is primarily based on ID numbers. Providers are responsible for registering the ID numbers and other pertinent information about metrics into MAS. Consumers then access a metric registration file with the MAS library functions and can access the registered information and metrics. Raw metric data is file based. Access to metrics is provided by either a read/write interface or through memory mapping.

Function overview

The MAS functions are broken into several categories:

Data overview

In order to allow data structures to be extensible in future releases, the metric registration information is separated into several areas:

Provider functions

There are only four provider functions. One to initialize, one to register an instance of metric data, one to make everything available after some registration has taken place, and one to write the metrics if memory mapping is not being used. These functions are:

Consumer functions

The consumer functions fall into several categories. The MAS management functions are used for accessing a registration file and capturing the metrics. The MAS get metric functions are used to access the metric registration data and to determine the addresses at which the metrics resides. The MAS get MAS header and get metric registration table (mrt) header functions return information about the configuration of MAS on the system that performed the metric registration.

There are three ``MAS management'' functions:

The ``MAS get metric'' functions return information about individual metrics. A few of the more important functions are:

Type-Specific interface functions

The MAS type-specific functions are used to manipulate metadata objects. These are needed because metadata objects may change size between various systems and platforms, or in future releases. These functions fall into several categories. There are comparative functions, copy functions, name size functions, and sanity checks. For more information about the type-specific functions, see mas_type(3mas).

Error functions

The MAS error functions report error codes and error strings. For more information about the MAS error functions, see mas_error(3mas).

References

mas_close(3mas), mas_error(3mas), mas_get_header(3mas), mas_get_met(3mas), mas_get_metadata(3mas), mas_get_met_id(3mas), mas_init(3mas), mas_open(3mas), mas_put(3mas), mas_register_met(3mas), mas_snap(3mas), mas_type(3mas), metreg(4).

Standards compliance

The mas library is not part of any currently supported standard.

It was developed by UNIX System Laboratories, Inc. and is used by permission.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004