Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Kernel Statistics Library Functionskstat_open(3KSTAT)


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

 

The kstat_open() function 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.

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

RETURN VALUES

 

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

The kstat_close() function returns 0 on success and -1 on failure.

FILES

 
/dev/kstat
kernel statistics driver

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelUnsafe

SEE ALSO

 

kstat(3KSTAT), kstat_chain_update(3KSTAT), kstat_data_lookup(3KSTAT), kstat_lookup(3KSTAT), kstat_read(3KSTAT), kstat_write(3KSTAT), attributes(5)


SunOS 5.9Go To TopLast Changed 27 Jun 2000

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.