mas_put(3mas)
mas_put --
write metrics and metric registration information for provider use
Synopsis
cc [options] file -lmas
#include <mas.h>
int mas_put(void);
Description
The function mas_put writes metric registration information to
the metric registration file(s).
The file name(s) and permissions are
those that were previously passed to mas_init during MAS
provider initialization.
The first time mas_put is called, it
creates the metric registration file(s).
On subsequent invocations
the metric registration files are rewritten with the updated
registration information.
If a provider is using an internal metric segment within the metric
registration header file, or if dynamic registration was not
requested by calling mas_init with file names for the metric
registration table, metadata, and strings table, then
mas_put should not be called more than once.
Return values
On success, mas_put returns 0.
On failure, mas_put returns -1 and sets mas_errno to identify the error.
Errors
MAS_USAGE - mas not initialized-
mas_init was not called prior to calling mas_put.
MAS_SYSERR - can't create mas file-
The open system call failed.
MAS_SYSERR - cannot malloc space for mas_buf-
The malloc library call failed.
MAS_SYSERR - write of mas header failed-
The write system call failed.
MAS_SYSERR - write of mas buf failed-
The write system call failed.
MAS_SYSERR - write of metric reg header failed-
The write system call failed.
MAS_SYSERR - can't create metric registration table file-
The open system call failed.
MAS_SYSERR - write of met reg table failed-
The write system call failed.
MAS_SYSERR - can't create strings file-
The open system call failed.
MAS_SYSERR - write of string table failed-
The write system call failed.
MAS_SYSERR - can't create metadata file-
The open system call failed.
MAS_SYSERR - write of meta data failed-
The write system call failed.
MAS_SYSERR - can't create metrics file-
The open system call failed.
MAS_SYSERR - can't seek to start of mas file-
The lseek system call failed.
MAS_SYSERR - write of mas header failed-
The write system call failed.
References
Intro(3mas)
Notices
Future directions
Currently, mas_put does not notify active consumers that a change
in registration information has occurred.
This may be supported in a future release.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004