문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
linux:systemd [2021/12/14 15:31] kwon37xi |
linux:systemd [2025/01/17 14:01] (현재) kwon37xi [일괄로 종료 Timeout 지정] |
||
---|---|---|---|
줄 6: | 줄 6: | ||
* [[linux: | * [[linux: | ||
+ | ===== unit 모음 디렉토리 ===== | ||
+ | * ''/ | ||
+ | * ''/ | ||
+ | * ''/ | ||
+ | * ''/ | ||
===== 사용법 ===== | ===== 사용법 ===== | ||
<code sh> | <code sh> | ||
줄 22: | 줄 27: | ||
# booting 시 시작하게 하면서, 지금 당장도 실행하게 | # booting 시 시작하게 하면서, 지금 당장도 실행하게 | ||
systemctl enable --now unit | systemctl enable --now unit | ||
+ | </ | ||
+ | |||
+ | ===== environment.d ===== | ||
+ | * 세션 시작시 환경 변수를 설정하기 | ||
+ | * script 는 안되고, '' | ||
+ | * [[https:// | ||
+ | * ''/ | ||
+ | * 스크립트를 넣을 수는 없다. | ||
+ | |||
+ | < | ||
+ | # 예시 / | ||
+ | |||
+ | FOO_DEBUG=force-software-gl, | ||
+ | PATH=/ | ||
+ | LD_LIBRARY_PATH=/ | ||
+ | XDG_DATA_DIRS=/ | ||
</ | </ | ||
줄 27: | 줄 48: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
===== systemd bootchart ===== | ===== systemd bootchart ===== | ||
* [[http:// | * [[http:// | ||
줄 38: | 줄 61: | ||
* [[linux: | * [[linux: | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | ===== Shutdown 이 너무 느릴 때 ===== | ||
+ | * '' | ||
+ | ==== 분석 ==== | ||
+ | * '' | ||
+ | |||
+ | <code sh> | ||
+ | sudo journalctl -b -1 > log | ||
+ | </ | ||
+ | * 위 '' | ||
+ | |||
+ | ==== 일괄로 종료 Timeout 지정 ==== | ||
+ | * 분석이 힘들거나 할 경우 다음과 같이 일괄 타임아웃을 지정할 수도 있다. | ||
+ | * ''/ | ||
+ | DefaultTimeoutStopSec=10s # 원래 90s 임. | ||
+ | </ | ||
+ | * 재시작 <code sh> | ||
+ | sudo systemctl daemon-reexec | ||
+ | |||
+ | </ | ||
===== systemd 는 어떻게 기존 SysVInit 의 / | ===== systemd 는 어떻게 기존 SysVInit 의 / | ||
줄 43: | 줄 86: | ||
* [[https:// | * [[https:// | ||
* 이는 [[https:// | * 이는 [[https:// | ||
+ | * systemd unit 은 ''/ | ||
* systemd 는 '' | * systemd 는 '' | ||
- | * '' | + | * '' |
===== 참조 ===== | ===== 참조 ===== | ||
줄 50: | 줄 94: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// |