Linux signal: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Add categories: Linux, Reference)
(Fix: remove --- horizontal lines (7 removed))
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Linux signal and number ==
{{Status
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}
 
{{TOC}}
 
== Overview ==
 
Linux signal에 대한 기술 문서입니다.
 
=== Summary ===
 
* 무엇인가? - Linux signal
* 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
* 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
 
 
== Purpose ==
 
이 문서가 존재하는 이유
 
* Goal: Linux signal에 대한 기술 정보 제공
* Scope: Linux signal의 개념, 사용법, 설정
* Non-goals: 다른 주제로의 확장
 
 
== Key Concepts ==
 
{| class="wikitable"
! Concept
! Description
! Related
|-
| Linux signal
| HPC/서버 환경에서 중요한 기술 개념
| [[Linux]], [[Server]]
|}
 
 
== Detailed Explanation ==
 
* [[Linux]]
all have names starting with SIG.  Some are  from POSIX. The number of possible signals is limited. The first 31 signals are  standardized in [[Linux|LINUX]]<ref>https://faculty.cs.niu.edu/~hutchins/csci480/signals.htm</ref>
all have names starting with SIG.  Some are  from POSIX. The number of possible signals is limited. The first 31 signals are  standardized in [[Linux|LINUX]]<ref>https://faculty.cs.niu.edu/~hutchins/csci480/signals.htm</ref>
  # Signal      Default    Comment                              POSIX
  # Signal      Default    Comment                              POSIX
   Name        Action
   Name        Action
   1 SIGHUP    Terminate  Hang up controlling terminal or      Yes
   1 SIGHUP    Terminate  Hang up controlling terminal or      Yes
                           process  
                           process  
Line 20: Line 63:
  13 SIGPIPE    Terminate  Write to pipe with no readers        Yes
  13 SIGPIPE    Terminate  Write to pipe with no readers        Yes
  14 SIGALRM    Terminate  Real-timer clock                    Yes
  14 SIGALRM    Terminate  Real-timer clock                    Yes
15 SIGTERM    Terminate  Process termination                  Yes
16 SIGSTKFLT  Terminate  Coprocessor stack error              No
17 SIGCHLD    Ignore      Child process stopped or terminated  Yes
                          or got a signal if traced
18 SIGCONT    Continue    Resume execution, if stopped        Yes
19 SIGSTOP    Stop        Stop process execution, Ctrl-Z      Yes
20 SIGTSTP    Stop        Stop process issued from tty        Yes
21 SIGTTIN    Stop        Background process requires input    Yes
22 SIGTTOU    Stop        Background process requires output  Yes
23 SIGURG    Ignore      Urgent condition on socket          No
24 SIGXCPU    Dump        CPU time limit exceeded              No
25 SIGXFSZ    Dump        File size limit exceeded            No
26 SIGVTALRM  Terminate  Virtual timer clock                  No
27 SIGPROF    Terminate  Profile timer clock                  No
28 SIGWINCH  Ignore      Window resizing                      No
29 SIGIO      Terminate  I/O now possible                    No
29 SIGPOLL    Terminate  Equivalent to SIGIO                  No
30 SIGPWR    Terminate  Power supply failure                No
31 SIGSYS    Dump        Bad system call                      No
31 SIGUNUSED  Dump        Equivalent to SIGSYS                No
Notice SIGUSR1 and SIGUSR2.  These are available for customized use. For each the default action is Terminate, but the programmer can change that.  A programmer can use these to provide an absolutely minimal amount of communication, i.e., "something happened", between processes.  


== SIGSTOP or SIGTSTP signals ==
'''From a running or runnable state, we could put a process into the stopped state (T) using the ''SIGSTOP'' or ''SIGTSTP'' signals.''' The difference between both signals is that we send the ''SIGSTOP'' is programmatic, such as running ''kill -STOP {pid}''. Additionally, <u>the process cannot ignore this signal</u> and should go into the stopped state.


On the other hand, we send the ''SIGTSTP'' signal using the keyboard ''CTRL + Z''. '''Unlike ''SIGSTOP'', <u>the process can optionally ignore this signal and continue to execute upon receiving ''SIGTSTP''</u>.''' While in this state, we could bring back the process into a running or runnable state by sending the ''SIGCONT'' signal.<ref>https://www.baeldung.com/linux/process-states</ref>
== Best Practices ==
 
* 최신 버전 사용 권장
* 공식 문서 참고
* 테스트 환경에서 먼저 검증


In short, SIGSTOP tells a process to “hold on” and SIGCONT tells a process to “pick up where you left off”. This can work really well for rsync jobs since you can pause the job, clear up some space on the destination device, and then resume the job.<ref>https://major.io/p/two-great-signals-sigstop-and-sigcont/</ref>


== References ==
== References ==
<references />
 
* [https://wiki.hpcmate.com Linux signal]
 
 
== Related Pages ==
 
* [[Linux]]
* [[Server]]
* [[Hardware]]
* [[Network]]
 
 
[[Category:Linux]]
[[Category:Linux]]
== Knowledge Graph ==
Related
→ [[Linux Kernel Tuning]]
→ [[systemd]]
→ [[LVM]]
→ [[iptables]]
→ [[Ubuntu]]
→ [[fstab]]
→ [[Linux Kernel]]


[[Category:Reference]]
[[Category:Configuration]]

Latest revision as of 11:29, 17 July 2026

Template:Status

Template:TOC

Overview

Linux signal에 대한 기술 문서입니다.

Summary

  • 무엇인가? - Linux signal
  • 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
  • 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시


Purpose

이 문서가 존재하는 이유

  • Goal: Linux signal에 대한 기술 정보 제공
  • Scope: Linux signal의 개념, 사용법, 설정
  • Non-goals: 다른 주제로의 확장


Key Concepts

Concept Description Related
Linux signal HPC/서버 환경에서 중요한 기술 개념 Linux, Server


Detailed Explanation

all have names starting with SIG. Some are from POSIX. The number of possible signals is limited. The first 31 signals are standardized in LINUX[1]

# Signal      Default     Comment                              POSIX
  Name        Action
 1 SIGHUP     Terminate   Hang up controlling terminal or      Yes
                          process 
 2 SIGINT     Terminate   Interrupt from keyboard, Control-C   Yes
 3 SIGQUIT    Dump        Quit from keyboard, Control-\        Yes
 4 SIGILL     Dump        Illegal instruction                  Yes
 5 SIGTRAP    Dump        Breakpoint for debugging             No
 6 SIGABRT    Dump        Abnormal termination                 Yes
 6 SIGIOT     Dump        Equivalent to SIGABRT                No
 7 SIGBUS     Dump        Bus error                            No
 8 SIGFPE     Dump        Floating-point exception             Yes
 9 SIGKILL    Terminate   Forced-process termination           Yes
10 SIGUSR1    Terminate   Available to processes               Yes
11 SIGSEGV    Dump        Invalid memory reference             Yes
12 SIGUSR2    Terminate   Available to processes               Yes
13 SIGPIPE    Terminate   Write to pipe with no readers        Yes
14 SIGALRM    Terminate   Real-timer clock                     Yes


Best Practices

  • 최신 버전 사용 권장
  • 공식 문서 참고
  • 테스트 환경에서 먼저 검증


References


Related Pages

Knowledge Graph

Related

Linux Kernel TuningsystemdLVMiptablesUbuntufstabLinux Kernel