HP-UX Reference (11i v1 05/09) - 2 System Calls (vol 5)
c
crashconf(2) crashconf(2)
includeClasses is a bitmask of classes that must be dumped. If it is set to
DT_ALL, all dumps will be full
dumps. Other allowed values are described under Classes, below.
excludeClasses is a bitmask of classes that may not be dumped unless a full dump is required (due to the
cause of the dump, or by explicit operator request). If it is set to
DT_ALL, dumps will be disabled. Other
allowed values are described under Classes, below.
devices is an array of deviceCount pathnames of block device files for crash dump devices. To be valid, a
device must be accessible and must not contain a file system. Where LVM partitions are in use, the device
number must be for a partition, not the physical disk that contains it, and must represent a partition that
is strictly contiguous on the physical disk. (LVM bad-block reallocation, and striping features may not be in
use on the partition.) Depending on the disk type, the dump space may be restricted to the first 2GB or
4GB of the physical disk.
deviceReturn is an array of deviceCount integers for returning the results of attempting to configure the
corresponding device from the devices array. Upon return, each element is set to a numeric value indicat-
ing the result of configuring the corresponding device as follows:
0 Successfully configured the corresponding device as a dump device.
<0 Failed to configure the corresponding device as a dump device. The absolute value of the
returned number can be used as an index into an array of error messages. The error message
strings are defined in
CCERR_STRINGS
(see below).
>0 Warning, The corresponding device has been configured but there is one or more notes or
warnings associated with the device. The returned value is a bitmap of warnings. the warn-
ing message strings are defined in CCWARN_STRINGS
(see below).
Any parameters which are not used for the given operation should be set to zero. Note that both devices
and deviceReturn must be specified if
DC_DEVICES is specified.
Classes
The following system memory classes have been defined as of this writing. Refer to the output of
crashconf(1M) or to /usr/include/sys/crashconf.h
for definitions of any classes added since
publication. The memory page size is 4Kb.
DT_UNUSED Unused physical memory pages
DT_KCODE Kernel code pages
DT_BCACHE Buffer cache data pages
DT_KSDATA Kernel static data pages
DT_KDDATA Kernel dynamic data pages
DT_FSDATA File system metadata pages
DT_USTACK User process stack pages
DT_UAREA U-Area pages
DT_USERPG User process pages
EXAMPLES
The following examples demonstrate the usage of crashconf() .
Example 1: Adding a Crash Dump Device
char *device_to_add[1];
int device_return[1];
...
crashconf(DC_DEVICES, 0, 0, 1, device_to_add, device_return);
Example 2: Force Dumping of Buffer Cache
crashconf(DC_INCLUDE, DT_BCACHE, 0, 0, NULL, NULL);
Example 3: Disable Dumps
crashconf(DC_EXCLUDE | DC_REPLACE, 0, DT_ALL, 0, NULL, NULL);
Example 4: Using CCERR_STRINGS and CCWARN_STRINGS
Assume only one device, devices[0], is being added to the dump configuration. The following code will check
the device_return[0] value and print corresponding error or warning messages.
HP-UX 11i Version 1: September 2005 − 2 − Hewlett-Packard Company Section 2−−45