|
The kstat_lookup() function traverses the kstat chain, kc->kc_chain, searching for a kstat with the same ks_module, ks_instance, and ks_name fields; this triplet uniquely
identifies a kstat. If ks_module is NULL, ks_instance is -1, or ks_name is NULL, then those fields will be ignored in the search. For example, kstat_lookup(kc,
NULL, -1, "foo") will simply find the first kstat with name "foo".
The kstat_data_lookup() function searches the kstat's data section for the record with the specified name. This operation is valid only for kstat types which have named data records. Currently, only the KSTAT_TYPE_NAMED and KSTAT_TYPE_TIMER kstats have named data records.
|