AIX信息中心KDB的配置,If you are using the Hardware Management Console, KDB kernel debugger can be accessed using a virtual terminal. For more information, see the Hardware Management Console Installation and Operations Guide (SA38 - 0590).的意思是不是必须要有HMC?
KDB kernel debugger and kdb command Invoking the KDB kernel debugger This topic describes how to load and start the KDB kernel debugger, and what you need to know about terminal use. For information on how to invoke the kdb command, see Invoking the kdb command. Loading and starting the KDB kernel debugger in AIX 5.1 and subsequent releases For AIX 5.1 and subsequent releases, the KDB kernel debugger is the standard kernel debugger and is included in the unix_up and unix_mp kernels, which are in the /usr/lib/boot file. The KDB kernel debugger must be loaded at boot time. This requires that a boot image be created with the debugger enabled. To enable the KDB kernel debugger, use either the -I or -D options of the bosboot command. Examples of bosboot commands are as follows: ·
To disable the KDB kernel debugger, use the following command: bosboot -a -d /dev/ipldevice ·
To enable the KDB kernel debugger, but not invoke it during system initialization, use the following command: bosboot -a -d /dev/ipldevice -D ·
To enable the KDB kernel debugger, and invoke it during system initialization, use the following command: bosboot -a -d /dev/ipldevice -I 1.
bosboot commands build boot images using the KDB kernel debugger. The boot image is not used until the machine is restarted. 2.
External interrupts are disabled while the KDB kernel debugger is active. 3.
If invoked during system initialization, the g subcommand must be issued to continue the initialization process. Loading and starting the KDB kernel debugger in AIX 4.3.3 The KDB kernel debugger must be loaded at boot time. This requires that a boot image be created with the debugger enabled. To enable the KDB kernel debugger, the bosboot command must be invoked with a KDB kernel specified and options set to enable the KDB kernel debugger. KDB kernels are shipped as /usr/lib/boot/unix_kdb for uni-processor (UP) systems and /usr/lib/boot/unix_mp_kdb for Multi-processor (MP) systems. The specific kernel used to create the boot image can be specified using the -k option of the bosboot command. The KDB kernel debugger must also be enabled using either the -I or -D options of the bosboot command. Examples of bosboot commands for a UP system are as follows: ·
To disable the KDB kernel debugger, use the following command: bosboot -a -d /dev/ipldevice -k /usr/lib/boot/unix_kdb ·
To enable the KDB kernel debugger, but not invoke it during system initialization, use the following command: bosboot -a -d /dev/ipldevice -D -k /usr/lib/boot/unix_kdb ·
To enable the KDB kernel debugger, and invoke it during system initialization, use the following command: bosboot -a -d /dev/ipldevice -I -k /usr/lib/boot/unix_kdb 1.
For an MP system, the /usr/lib/boot/unix_mp_kdb file is used instead of the /usr/lib/boot/unix_kdb file. 2.
The bosboot commands build boot images using the KDB kernel debugger. The boot image is not used until the machine is restarted. 3.
External interrupts are disabled while the KDB kernel debugger is active. 4.
If invoked during system initialization, the g subcommand must be issued to continue the initialization process. The /usr/lib/boot/unix and /unix links are not changed by the bosboot command. However, these links are used by user commands such as sar and others to read symbol information for the kernel. If these commands are to be used with a KDB boot image /unix and /usr/lib/boot/unix must point to the kernel specified for the bosboot command. This can be done by removing and recreating the links. This must be done as the root user. For the previous bosboot command examples, typing the following would set up the links correctly: ln -s /usr/lib/boot/unix_kdb /unix ln -s /usr/lib/boot/unix_kdb /usr/lib/boot/unix Similarly, if you chose to stop using a KDB Kernel, the links for /unix and /usr/lib/boot/unix should be modified to point to the kernel specified to the bosboot command. /unix is the default kernel used by the bosboot command. If this link is changed to point to a KDB kernel, after bosboot commands that do not have a kernel specified are run, the commands use the KDB kernel. Entering the KDB kernel debugger Enter the KDB kernel debugger using one of the following procedures: ·
On a tty keyboard, press the Ctrl+4 key sequence for IBM(R) 3151 terminals or the Ctrl+\ key sequence for BQ 303, BQ 310C, and WYSE 50 terminals. ·
On other keyboards, press the Ctrl+Alt+Numpad4 key sequence. ·
Call the brkpoint subroutine from the C code. The syntax for calling this subroutine is the following: The system enters the debugger if a system halt is caused by a fatal system error. In such a case, the system creates a log entry in the system log and if the KDB kernel debugger is available, it is called. A system dump might be generated when you exit from the debugger. If the kernel debug program is not available when you type in a key sequence, you must load the kernel debug program. You can use the kdb command with the dw subcommand to determine whether the KDB kernel debugger is available by typing the following: If either of the previous dw subcommands returns a 0, the KDB kernel debugger is not available. After the KDB kernel debugger is invoked, the subcommands detailed in Subcommand lists are available. Using a terminal with the KDB kernel debugger If you are using the Hardware Management Console, KDB kernel debugger can be accessed using a virtual terminal. For more information, see the Hardware Management Console Installation and Operations Guide (SA38 - 0590). The KDB kernel debugger opens an asynchronous ASCII terminal when it is first started, and subsequently upon being started due to a system halt. Native serial ports are checked sequentially, starting with port 0 (zero). Each port is configured at 9600 bps, 8 bits, and no parity. If carrier detect is asserted within 1/10 of a second, the port is used. Otherwise, the next available native port is checked. This process continues until a port is opened or until every native port available on the machine is checked. If no native serial port is opened successfully, the result is unpredictable. The KDB kernel debugger only supports display to an ASCII terminal connected to a native serial port. Displays connected to graphics adapters are not supported. The KDB kernel debugger uses its own device driver for handling the display terminal. It is possible to connect a serial line between two machines and define the serial line port as the port for the console. In that case, the cu command can be used to connect to the target machine and run the KDB kernel debugger. If a serial device, other than a terminal connected to a native serial port, is selected by the kernel debugger, the system might appear to hang. |