Linux-Operating system signals

Source: Internet
Author: User

Signals provided by the Linux operating system

Kill-l # View the signals provided by Linux

  

" Echo AAA " 2 3  the  1(passive) The kernel detects a system event. For example, a child process exit sends a SIGCHLD signal like a parent process.Keyboard Press control+2(Active) Send signal to specified process by system call Kill # Process End signal difference between SIGTERM and SIGKILL: SIGTERM is friendly, the process captures the signal and shuts down the program according to your needs. Before you close the program, you can end the open record file and complete the task you are doing. In some cases, if the process is working and cannot be interrupted, the process can ignore the sigterm signal. # If a process receives a SIGUSR1 signal and then executes the signal binding function, the second SIGUSR2 signal comes again and the first signal is not processed, the second signal is discarded. 
SIGHUP1A # Terminal hangs or the control process terminates SIGINT2A # Keyboard terminal process (e.g. control+c) Sigquit3C # Keyboard exit key is pressed Sigill4C # illegal directive SIGABRT6C # by Abort (3) Exit instructions issued by SIGFPE8C # Floating-point exception Sigkill9AEF # Kill signal stops immediately SIGSEGV OneC # Invalid memory reference Sigpipe -A # Pipeline rupture: Write a pipe without a read port Sigalrm -A # Alarm signal by alarm (2) signals emitted by SIGTERM theA # Stop signal allows the program to safely exit Kill- theSIGUSR1 -,Ten, -A # User-defined signal 1SIGUSR2 to, A, -A # User-defined signal 2SIGCHLD -, -, -B # Child process end automatically sends SIGCHLD signal to parent process Sigcont +, -, -# Process continues (a process that has been stopped) SIGSTOP -, +, atDEF # terminating process SIGTSTP -, -, -D # Control Terminal (TTY) press the STOP key Sigttin +, +, -D # Background process attempts to read Sigttou from the control terminal A, A, -D # Background process attempts to write the default processing action from the control terminal the letter meaning is as follows: A default action is to terminate the process B default action is to ignore this signal, the signal is discarded, do not handle the C default action is to terminate the process and kernel image dump (dump core), Kernel image dump refers to the process data in the memory of the image and part of the process in the kernel structure to dump into the file system, and the process exits execution, the benefit is to provide programmers with the convenience, so that they can get the process at the time of execution of data values, allowing them to determine the cause of the dump, And can debug their programs. D The default action is to stop the process, after entering the stop condition can be restarted, generally in the process of debugging (for example, Ptrace system call) E signal can not be captured F signal can not be ignored

System Performance Status:

Vmstat 1 9

Common parameters

R # Number of tasks waiting to be executed. When this value exceeds the number of CPU threads, a CPU bottleneck occurs. B # The number of processes waiting for IO, which represents the blocked process. SWPD # Virtual memory has been used for size, such as greater than 0, indicating that the machine is running out of physical memory, such as not program memory leaks, then the memory is upgraded. Free # The size of the idle physical memory buff # The buff size used to buffer the read and write of the block device cache # Cache is used to memorize the files we open, buffer the files, (the free physical memory is taken as a part of the file and directory cache, is to improve the performance of program execution When the program uses memory, the buffer/cached will be used very quickly. ) Inact # Inactive memory size, which is marked as recyclable memory, different from free and active-a option to show active # dynamic memory size-A option shows Si # per second the size of the virtual memory read from disk, if this value is greater than 0, indicates that the physical memory is not enough or memory leaks, to find the consuming memory process resolved. So # virtual memory is written to disk size per second, if this value is greater than 0, ibid. The number of blocks received by the BI # block device per second, where the block device refers to all the disks and other block devices on the system, the default block size is 1024bytebo # blocks the number of blocks sent per second, such as reading files, Bo will be greater than 0. Bi and Bo are generally close to 0, otherwise the IO is too frequent and needs to be adjusted. inch# Number of interrupts per second of CPU, including time interruption. In and CS, the larger the two values, you will see that the CPU consumed by the kernel time will be more CS # per second context switch, for example, we call the system function, the context switch, the thread switch, also to the process context switch, the smaller the better, too big, to consider the number of low thread or process, For example, in the Apache and Nginx Web server, we generally do performance testing in thousands of concurrent or even tens of thousands of concurrent testing, the process of selecting a Web server can be the peak of the process or the thread has been down, pressure measurement, until CS to a relatively small value, This process and the number of threads is the more appropriate value. System calls are also, each time the system function is called, our code will enter the kernel space, resulting in context switching, this is very resource-intensive, but also try to avoid frequent calls to system functions. Too many context switches means that most of your CPU is wasted in context switching, causing the CPU to do serious things less time and CPU underutilized. US # User Process execution consumes more CPU time than the value of us, which indicates that the user process consumes more CPU time, but if longer than%the use of, then we should consider the optimizer algorithm or other measures SY # System CPU time, if too high, indicating a long system call time, for example, is the IO operation frequently. ID # Idle CPU time, in general, ID+ US + sy = -, it is generally considered that the ID is idle CPU usage, US is the user CPU utilization, SY is the system CPU utilization. WT # waits for iocpu time. When WA is too high, it indicates that IO waits are more severe, possibly due to a large amount of random access to the disk, or a bottleneck in the bandwidth of the disk. If R is often greater than 4 and the ID is often less than 40, it indicates that the CPU is heavily loaded. If the Pi Po is not equal to 0 for a long time, it indicates insufficient memory. If the B queue is often greater than 3, the IO performance is poor. 

Linux-Operating system signals

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.