ServerDumpKernel
- Last UpdatedJul 18, 2023
- 2 minute read
Dumps Kernel data to the KERNEL.DAT file (written to the Logs folder) either on a local server or on a remote server. The server is specified with the server and cluster parameters. Instead of creating a new file subsequent calls to this function will append Kernel data to the KERNEL.DAT file. This is a blocking function.
Syntax
ServerDumpKernel(iMode, sName, sServer [, sCluster])
iMode:
The Kernel data to dump:
0x0001 - Dump general statistics.
0x0002 - Dump the task.
0x0004 - Dump the I/O device.
0x0008 - Dump the driver.
0x0010 - Dump netstat. (This mode is deprecated and no longer active in version 7.10 or later.)
0x0020 - Dump the table.
0x0040 - Dump the queue.
0x0100 - Dump list of current SCADA parameter settings
0x4000 - Dump in verbose mode.
0x8000 - Dump kernel data in non-verbose mode. To dump data in verbose mode, set iMode to 0xc000 (0x8000 + 0x4000).
You can select any one of the above modes or may add them together to get more than one type of information. For example, to dump netstat and I/O device data in verbose mode, set iMode to 0x4014 (0x0004 + 0x0010 + 0x4000). Using 0x4000 on its own will dump no data, it needs to be combined with another mode.
sName:
The queue or table name (empty for all queues or tables). Only valid if iMode is 0x0020 and 0x0040.
sServer:
Specifies the name of the server, as defined in the project, on which kernel data will be dumped.
sCluster:
Specifies the cluster of the server on which kernel data will be dumped. This parameter is optional in a single cluster environment.
Return Value
0 (zero) if successful, otherwise an error code is returned.
Related Functions
DumpKernel, DspKernel, KerCmd, TraceMsg
Example
ServerDumpKernel(0x8000, "");
!Dump the Kernel data