Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Linux mysql dump configuration and debugging commands

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you the "sample analysis of Linux mysql dump configuration and debugging commands", which is easy to understand and well-organized. I hope it can help you solve your doubts. Let the editor lead you to study and study the "sample analysis of Linux mysql dump configuration and debugging commands".

Generation switches and size limits for 1.Linux mysql dump configuration and debugging core files

1) use the ulimit-c command to view the generation switch of the core file. If the result is 0, this feature is turned off and the core file is not generated.

2) using the ulimit-cfilesize command, you can limit the size of the core file (the unit of filesize is kbyte). If ulimit-cunlimited, the size of the core file is unlimited. If the generated information exceeds this size, it will be cropped and an incomplete core file will eventually be generated. When debugging this core file, gdb prompts an error.

Name and generation path of 2.Linux mysql dump configuration and debugging core file

If the core files generated by the system do not have any other extended names, they are all named core. The new core file generation will overwrite the original core file.

1) / proc/sys/kernel/core_uses_pid can control whether pid is added as an extension to the filename of the core file. The content of the file is 1, which means that pid is added as the extension, and the generated core file format of core.xxxx; is 0, which means that the generated core file is also named core.

You can modify this file with the following command:

Echo "1" > / proc/sys/kernel/core_uses_pid

2) proc/sys/kernel/core_pattern can control where the core file is saved and the file name format.

You can modify this file with the following command:

Echo "/ corefile/core-%e-%p-%t" > core_pattern, the core file can be generated into the / corefile directory, and the resulting 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 adds the signal that causes core to be generated

% t-insert UNIX time that the coredump occurred into filename adds the unix time when the core file was generated

% h-insert hostname where the coredump happened into filename add hostname

% e-insert coredumping executable name into filename add command name

Use gdb to view the core file for 3.Linux mysql dump configuration and debugging:

Now we can occur core dump when an error caused by the runtime signal occurs.

After core dump occurs, use gdb to view the contents of the core file to locate the line in the file that raises core dump.

Gdb [exec file] [core file]

Such as:

Gdb. / test test.core

After entering the gdb, use the bt command to check the backtrace to check where the program is running, to locate the core dump file-> line.

4.Linux mysql dump configuration and debugging debugging using core files on the development board

If the operating system of the development board is also linux,core debugging method is still applicable. If gdb is not supported on the development board, copy the environment (header files, libraries), executable files and core files of the development board to the linux of PC and run the relevant commands.

Note: for the executable files to be debugged, you need to add-gmoment core file when compiling to display the error message normally!

The above is all the contents of the article "sample Analysis of Linux mysql dump configuration and debugging commands". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report