Data Structures for Drivers kstatio(9S)
NAME
kstatio - structure for I/O kstats
SYNOPSIS
#include
#include
#include
#include
INTERFACE LEVEL
Solaris DI specific (Solaris DI)
DESCRIPTION
I/O kstat statistics are kept in a kstatio structure. When
kstatcreate(9F) creates an I/O kstat, the ksdata field is
a pointer to one of these structures. The macro
KSTATIOPTR() is provided to retrieve this field. It looks
like this:
#define KSTATIOPTR(kptr) ((kstatiot *)(kptr)->ksdata)
STRUCTURE MEMBERS
ulonglongt nread; /* number of bytes read */
ulonglongt nwritten; /* number of bytes written *]/
ulongt reads; /* number of read operations */
ulongt writes; /* number of write operations */
The nread field should be updated by the driver with the
number of bytes successfully read upon completion.
The nwritten field should be updated by the driver with the
number of bytes successfully written upon completion.
The reads field should be updated by the driver after each
successful read operation.
The writes field should be updated by the driver after each
successful write operation.
Other I/O statistics are updated through the use of the
kstatqueue(9F) functions.
SEE ALSO
SunOS 5.11 Last change: 4 Apr 1994 1
Data Structures for Drivers kstatio(9S)
kstatcreate(9F), kstatnamedinit(9F), kstatqueue(9F),
kstatrunqbacktowaitq(9F), kstatrunqenter(9F),
kstatrunqexit(9F), kstatwaitqenter(9F),
kstatwaitqexit(9F), kstatwaitqtorunq(9F)
Writing Device Drivers
SunOS 5.11 Last change: 4 Apr 1994 2
|