Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3kstat/kstat_lookup.3kstat
Real path: /usr/share/man/man3kstat/kstat_lookup.3kstat
Zurück
'\" te .\" Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. .TH kstat_lookup 3KSTAT "19 Aug 2016" "Oracle Solaris 11.4" "Kernel Statistics Library Functions" .SH NAME kstat_lookup, kstat_data_lookup \- find a kstat by name .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lkstat\fR [ \fIlibrary\fR...] #include <kstat.h> \fBkstat_t *\fR\fBkstat_lookup\fR(\fBkstat_ctl_t *\fR\fIkc\fR, \fBchar *\fR\fIks_module\fR, \fBint\fR \fIks_instance\fR, \fBchar *\fR\fIks_name\fR); .fi .LP .nf \fBvoid *\fR\fBkstat_data_lookup\fR(\fBkstat_t *\fR\fIksp\fR, \fBchar *\fR\fIname\fR); .fi .SH DESCRIPTION .sp .LP The \fBkstat_lookup()\fR function traverses the kstat chain, \fIkc\fR->\fBkc_chain\fR, searching for a kstat with the same \fIks_module\fR, \fIks_instance\fR, and \fIks_name\fR fields; this triplet uniquely identifies a kstat. If \fIks_module\fR is \fINULL\fR, \fIks_instance\fR is -1, or \fIks_name\fR is \fINULL\fR, those fields will be ignored in the search. For example, \fBkstat_lookup(kc, NULL, -1, "foo")\fR will find the first kstat with name "foo". .sp .LP The \fBkstat_data_lookup()\fR function searches the kstat's data section for the record with the specified \fIname\fR. This operation is valid only for those kstat types that have named data records: \fBKSTAT_TYPE_NAMED\fR and \fBKSTAT_TYPE_TIMER\fR. .SH RETURN VALUES .sp .LP The \fBkstat_lookup()\fR function returns a pointer to the requested kstat if it is found. Otherwise it returns \fINULL\fR and sets \fBerrno\fR to indicate the error. .sp .LP The \fBkstat_data_lookup()\fR function returns a pointer to the requested data record if it is found. Otherwise it returns \fINULL\fR and sets \fBerrno\fR to indicate the error . .SH ERRORS .sp .LP The \fBkstat_lookup()\fR and \fBkstat_data_lookup()\fR functions will fail if: .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt An attempt was made to look up data for a kstat that was not of type \fBKSTAT_TYPE_NAMED\fR or \fBKSTAT_TYPE_TIMER\fR. .RE .sp .ne 2 .mk .na \fB\fBENOENT\fR\fR .ad .RS 10n .rt The requested kstat could not be found. .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/dev/kstat\fR\fR .ad .RS 14n .rt kernel statistics driver .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Obsolete _ MT-Level MT-Safe with exceptions .TE .sp .sp .LP The \fBkstat_lookup()\fR function is MT-Safe with the exception that only one thread may actively use a \fBkstat_ctl_t *\fR value at any time. Synchronization is left to the application. .SH SEE ALSO .sp .LP \fBkstat_chain_update\fR(3KSTAT), \fBkstat\fR(3KSTAT), \fBkstat_open\fR(3KSTAT), \fBkstat_read\fR(3KSTAT), \fBattributes\fR(7), \fBkstat2\fR(3KSTAT2), \fBkstat2_open\fR(3KSTAT2), \fBkstat2_lookup_map\fR(3KSTAT2), \fBkstat2_map_get\fR(3KSTAT2) .SH NOTES .sp .LP The \fBkstat_lookup()\fR and \fBkstat_data_lookup()\fR functions are deprecated. They may be removed in a future release of Oracle Solaris. For details of the new API, see the \fBkstat2\fR(3KSTAT2) man page.