{"id":668,"date":"2026-08-11T08:22:45","date_gmt":"2026-08-10T23:22:45","guid":{"rendered":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/668"},"modified":"2026-08-11T08:22:45","modified_gmt":"2026-08-10T23:22:45","slug":"journalctl%e3%81%a8%e3%81%af%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/668","title":{"rendered":"journalctl\u3068\u306f\uff1f"},"content":{"rendered":"<h2>journalctl\u3068\u306f\u4f55\u304b<\/h2>\n<p><strong>journalctl<\/strong>\u306f\u3001Linux \u306e\u30b7\u30b9\u30c6\u30e0\u30ed\u30b0\u3092\u95b2\u89a7\u30fb\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3067\u3059\u3002systemd \u304c\u63d0\u4f9b\u3059\u308b <code>systemd-journald<\/code> \u30c7\u30fc\u30e2\u30f3\u304c\u84c4\u7a4d\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u3001\u7d71\u4e00\u3055\u308c\u305f\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u4e3b\u306a\u7279\u5fb4<\/h2>\n<ul>\n<li>\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3084\u30d7\u30ed\u30bb\u30b9 ID\u3001\u30b5\u30fc\u30d3\u30b9\u540d\u306a\u3069\u3001\u8c4a\u5bcc\u306a\u30e1\u30bf\u30c7\u30fc\u30bf\u3068\u5171\u306b\u30ed\u30b0\u3092\u8868\u793a<\/li>\n<li>\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u6a5f\u80fd\u304c\u5145\u5b9f\u3057\u3066\u304a\u308a\u3001\u65e5\u6642\u30fb\u30e6\u30cb\u30c3\u30c8\u30fb\u512a\u5148\u5ea6\u306a\u3069\u3067\u7d5e\u308a\u8fbc\u307f\u304c\u53ef\u80fd<\/li>\n<li>\u30d0\u30a4\u30ca\u30ea\u5f62\u5f0f\u306e\u30b8\u30e3\u30fc\u30ca\u30eb\u3092\u9ad8\u901f\u306b\u691c\u7d22\u30fb\u8868\u793a\u3067\u304d\u308b<\/li>\n<li>\u6c38\u7d9a\u5316\u8a2d\u5b9a\u306b\u3088\u308a\u3001\u518d\u8d77\u52d5\u5f8c\u3082\u904e\u53bb\u306e\u30ed\u30b0\u3092\u4fdd\u6301\u3067\u304d\u308b<\/li>\n<\/ul>\n<h2>\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n<p>\u4ee5\u4e0b\u306b\u4ee3\u8868\u7684\u306a\u30b3\u30de\u30f3\u30c9\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre><code># \u6700\u65b0\u306e\u30ed\u30b0\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u8868\u793a\njournalctl -f\n\n# \u6307\u5b9a\u3057\u305f\u30b5\u30fc\u30d3\u30b9\uff08\u4f8b: nginx\uff09\u306e\u30ed\u30b0\u3060\u3051\u8868\u793a\njournalctl -u nginx.service\n\n# \u7279\u5b9a\u306e\u65e5\u6642\u4ee5\u964d\u306e\u30ed\u30b0\u3092\u53d6\u5f97\njournalctl --since \"2024-08-01 00:00:00\"\n\n# \u30a8\u30e9\u30fc\u30ec\u30d9\u30eb\u4ee5\u4e0a\uff08priority >= 3\uff09\u306e\u30ed\u30b0\u3060\u3051\u8868\u793a\njournalctl -p err..alert\n<\/code><\/pre>\n<h3>\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30dd\u30a4\u30f3\u30c8<\/h3>\n<ul>\n<li><strong>-f<\/strong> : <code>tail -f<\/code> \u3068\u540c\u69d8\u306b\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u8ffd\u8de1<\/li>\n<li><strong>-u<\/strong> : systemd \u30e6\u30cb\u30c3\u30c8\u540d\u3067\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0<\/li>\n<li><strong>&#8211;since \/ &#8211;until<\/strong> : \u6642\u9593\u7bc4\u56f2\u3067\u7d5e\u308a\u8fbc\u307f<\/li>\n<li><strong>-p<\/strong> : \u30ed\u30b0\u306e\u91cd\u8981\u5ea6\uff08priority\uff09\u3092\u6307\u5b9a<\/li>\n<\/ul>\n<h2>\u6c38\u7d9a\u5316\u3068\u30ed\u30b0\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3<\/h2>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f <code>\/run\/log\/journal<\/code> \u306b\u4e00\u6642\u7684\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u304c\u3001<code>\/etc\/systemd\/journald.conf<\/code> \u306e <code>Storage=persistent<\/code> \u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3059\u308b\u3068 <code>\/var\/log\/journal<\/code> \u306b\u6c38\u7d9a\u5316\u3055\u308c\u3001\u518d\u8d77\u52d5\u5f8c\u3082\u30ed\u30b0\u304c\u5931\u308f\u308c\u307e\u305b\u3093\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>journalctl \u306f systemd \u74b0\u5883\u3067\u306e\u6a19\u6e96\u7684\u306a\u30ed\u30b0\u95b2\u89a7\u30c4\u30fc\u30eb\u3068\u3057\u3066\u3001\u8c4a\u5bcc\u306a\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3068\u9ad8\u901f\u691c\u7d22\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u30b7\u30b9\u30c6\u30e0\u30c8\u30e9\u30d6\u30eb\u306e\u539f\u56e0\u7a76\u660e\u3084\u904b\u7528\u76e3\u67fb\u306b\u6b20\u304b\u305b\u306a\u3044\u30b3\u30de\u30f3\u30c9\u3067\u3059\u306e\u3067\u3001\u57fa\u672c\u7684\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u305c\u3072\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>journalctl\u3068\u306f\u4f55\u304b journalctl\u306f\u3001Linux \u306e\u30b7\u30b9\u30c6\u30e0\u30ed\u30b0\u3092\u95b2\u89a7\u30fb\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3067\u3059\u3002systemd \u304c\u63d0\u4f9b\u3059\u308b systemd-journald \u30c7\u30fc\u30e2\u30f3\u304c\u84c4\u7a4d\u3057\u305f\u30ed\u30b0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-668","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/comments?post=668"}],"version-history":[{"count":0,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/668\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/media?parent=668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/categories?post=668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/tags?post=668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}