[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    kstat_open(3K) manual page Table of Contents

Name

kstat_open, kstat_close - initialize kernel statistics facility

Synopsis

cc [ flag... ] file... -lkstat [ library... ]

#include <kstat.h>

kstat_ctl_t *kstat_open(void);

int kstat_close(kstat_ctl_t *kc);

Description

kstat_open() initializes a kstat control structure, which provides access to the kernel statistics library. It returns a pointer to this structure, which must be supplied as the kc argument in subsequent libkstat function calls.

kstat_close() frees all resources that were associated with kc. This is done automatically on exit(2) and execve() (see exec(2) ).

Return Values

kstat_open() returns a pointer to a kstat control structure. On failure, it returns NULL and no resources are allocated.

kstat_close() returns 0 on success, -1 on failure.

Files

/dev/kstat
kernel statistics driver

See Also

kstat(3K) , kstat_chain_update(3K) , kstat_data_lookup(3K) , kstat_lookup(3K) , kstat_read(3K) , kstat_write(3K)


Table of Contents