journalctl
No journal files were found
방금 클라우드 Ubuntu 서버를 생성하고 웹 기반 콘솔을 통해 액세스한 후 응답은 다음과 같습니다.
아래에 콘솔 출력을 붙여넣었습니다.
2023-06-18T03:56:23-root@ubuntu:~# journalctl -n 10
No journal files were found.
-- No entries --
2023-06-18T03:56:50-root@ubuntu:~# journalctl -k
No journal files were found.
-- No entries --
2023-06-18T03:56:56-root@ubuntu:~# journalctl -b
No journal files were found.
-- No entries --
그래서 서비스 상태를 확인합니다.
2023-06-18T03:56:59-root@ubuntu:~# systemctl status journalctl
Unit journalctl.service could not be found.
2023-06-18T03:57:13-root@ubuntu:~# systemctl status systemd-journald.service
● systemd-journald.service - Journal Service
Loaded: loaded (/lib/systemd/system/systemd-journald.service; static)
Active: active (running) since Sun 2023-06-18 03:55:13 UTC; 2min 11s ago
TriggeredBy: ● systemd-journald.socket
● systemd-journald-audit.socket
● systemd-journald-dev-log.socket
Docs: man:systemd-journald.service(8)
man:journald.conf(5)
Main PID: 374 (systemd-journal)
Status: "Processing requests..."
Tasks: 1 (limit: 9492)
Memory: 3.9M
CPU: 182ms
CGroup: /system.slice/systemd-journald.service
└─374 /lib/systemd/systemd-journald
서비스를 다시 시작합니다.
2023-06-18T03:57:47-root@ubuntu:~# systemctl restart systemd-journald.service
2023-06-18T03:58:12-root@ubuntu:~# systemctl status systemd-journald.service
● systemd-journald.service - Journal Service
Loaded: loaded (/lib/systemd/system/systemd-journald.service; static)
Active: active (running) since Sun 2023-06-18 03:58:02 UTC; 21s ago
TriggeredBy: ● systemd-journald.socket
● systemd-journald-audit.socket
● systemd-journald-dev-log.socket
Docs: man:systemd-journald.service(8)
man:journald.conf(5)
Main PID: 7967 (systemd-journal)
Status: "Processing requests..."
Tasks: 1 (limit: 9492)
Memory: 4.9M
CPU: 16ms
CGroup: /system.slice/systemd-journald.service
└─7967 /lib/systemd/systemd-journald
Jun 18 03:58:02 ubuntu systemd-journald[7967]: Journal started
Jun 18 03:58:02 ubuntu systemd-journald[7967]: System Journal (/var/log/journal/09dac98d7851cdf1a9dadf62648e805e) is 8.0M, max 4.0G, 3.9G free.
Notice: journal has been rotated since unit was started, output may be incomplete.
2023-06-18T03:58:23-root@ubuntu:~# systemctl status journalctl
Unit journalctl.service could not be found.
다시 Journalctl을 호출했는데 이번에는 예상대로 작동했습니다.
2023-06-18T03:58:47-root@ubuntu:~# journalctl -n 10
Jun 18 03:58:02 ubuntu systemd[1]: Stopping Journal Service...
Jun 18 03:58:02 ubuntu systemd-journald[374]: Received SIGTERM from PID 1 (systemd).
Jun 18 03:58:02 ubuntu systemd[1]: systemd-journald.service: Deactivated successfully.
Jun 18 03:58:02 ubuntu systemd[1]: Stopped Journal Service.
Jun 18 03:58:02 ubuntu systemd[1]: Starting Journal Service...
Jun 18 03:58:02 ubuntu systemd-journald[7967]: Journal started
Jun 18 03:58:02 ubuntu systemd-journald[7967]: System Journal (/var/log/journal/09dac98d7851cdf1a9dadf62648e805e) is 8.0M, max 4.0G, 3.9G free.
Jun 18 03:58:02 ubuntu systemd[1]: Started Journal Service.
왜 이런 일이 발생합니까?