TcpDump can completely intercept the "Header" of the packets transmitted in the network for analysis. It supports the output results of network... 3. tcpdump. Next we will introduce the configuration and debugging of Linux mysql dump.
1. Linux mysql dump configuration and debugging core file generation switch and size limit
1) Use the ulimit-c command to view the core file generation switch. If the result is 0, this function is disabled and core files are not generated.
2) use the ulimit-cfilesize command to limit the size of the core file to kbyte ). If ulimit-cunlimited is used, the size of the core file is not limited. If the generated information exceeds this size, it will be cropped to generate an incomplete core file. When debugging this core file, gdb will prompt an error.
2. Linux mysql dump configuration and debugging core File Name and generation path
If the core file generated by the system does not contain any other extension names, it is all named core. The new core file will overwrite the original core file.
1)/proc/sys/kernel/core_uses_pid can control whether pid is added to the file name of the core file as an extension. If the file content is 1, the pid is added as the extension, and the generated core file format is core. xxxx. If it is 0, the generated core file is named core.
Run the following command to modify the file:
Echo "1">/proc/sys/kernel/core_uses_pid
2) proc/sys/kernel/core_pattern can control the core file storage location and file name format.
Run the following command to modify the file:
Echo "/corefile/core-% e-% p-% t"> core_pattern, which can generate core files in the/corefile directory, the generated file name is core-command name-pid-timestamp.
The following is a list of parameters:
% P-insert pid into filename add pid
% U-insert current uid into filename add current uid
% G-insert current gid into filename add current gid
% S-insert signal that caused the coredump into the filename added to generate core signal
% T-insert UNIX time that the coredump occurred into filename unix time when the core file is generated
% H-insert hostname where the coredump happened into filename Add the Host Name
% E-insert coredumping executable name into filename add command name
3. Use gdb to view the core file for Linux mysql dump configuration and debugging:
Here we can dump the core when an error occurs due to the message number.
After a core dump occurs, use gdb to view the content of the core file to locate the line that causes the core dump in the file.
Gdb [exec file] [core file]
For example:
Gdb./test. core
After entering gdb, run the bt command to check where the program is running and locate the core dump file-> line.
4. Use core File debugging on the Linux mysql dump configuration and debugging Development Board
If the operating system of the Development Board is also linux, the core debugging method is still applicable. If the development board does not support gdb, you can copy the environment header file, library), executable file, and core file of the Development Board to linux on the PC and run the relevant commands.
Note: The executable file to be debugged must be added to-g during compilation so that the core file can display error information normally!
Edit recommendations]