PSTAT Interfaces
28
6. Appendix
pst_crashdev
This structure describes a crash dump device. It is only available as 64-bit data. Header file:
<sys/pstat/crash_pstat_body.h>
int64_t psc_idx; /* Index of this device. */
struct __psdev psc_device; /* Device number of physical device */
int64_t psc_offset; /* Offset (kB) of area on physical device */
int64_t psc_size; /* Size (kB) of dump area */
struct psdev psc_lv; /* Logical volume dev number, if any */
int64_t psc_source; /* How'd this device get configured? */
The psc_idx member+1 is used as offset for further pstat_getcrashdev() calls. Flag values
for psc_source are:
PS_BOOTTIME à Device configured at boot.
PS_RUNTIME à Device configured by crashconf(2).
pst_crashinfo
This structure describes the system crash dump configuration. It is only available as 64-bit data.
It contains the following members. Header file: <sys/pstat/crash_pstat_body.h>
int64_t psc_flags; /* Dump configuration flags */
struct __psdev psc_headerdev; /* Device containing dump header */
int64_t psc_headeroffset; /* Byte Offset of dump header on device */
int64_t psc_ncrashdevs; /* Number of dump devices */
int64_t psc_totalsize; /* Total amount of dump space (kB) */
int64_t psc_included; /* Page classes to be included */
int64_t psc_excluded; /* Page classes to be excluded */
int64_t psc_default; /* Defaults for unspecified classes */
int64_t psc_nclasses; /* Number of classes */
int64_t psc_pgcount[PST_MAXCLASSES];
/* Number of pages in each class */
The psc_flags member can take the following values:
PS_EARLY_DUMP à An early dump was taken
PS_CONF_CHANGED à Configuration changed since boot
PS_HEADER_VALID à headerdev and headeroffset are valid
pst_diskinfo
Header file: <sys/pstat/disk_pstat_body.h>
_T_LONG_T psd_idx; /* Index for further pstat() requests */
struct __psdev psd_dev; /* Device specification for the disk. Describes
* the block dev. Refer pstat_body.h header. */
_T_LONG_T psd_dktime; /* cumulative ticks on the disk */
_T_LONG_T psd_dkseek; /* cumulative number of seeks done */
_T_LONG_T psd_dkxfer; /* cumulative number of transfers; includes
* requests with high (read/write) and low
* (ioctl) priorities */
_T_LONG_T psd_dkwds; /* cumulative number of 64-byte transfers */
float psd_dkmspw; /* OBSOLETE: do not use */
struct __psdev psd_cdev; /* device specification for the raw disk */