{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/syslog/feed/json/ -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/syslog/", "feed_url": "https://matoken.org/blog/tag/syslog/feed/json/", "language": "ja", "title": "syslog – matoken's blog", "description": "Is there no plan B?", "icon": "https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9.jpeg", "items": [ { "id": "http://matoken.org/blog/?p=3298", "url": "https://matoken.org/blog/2021/07/11/output-acpid-log-to-syslog/", "title": "Debian\u74b0\u5883\u3067acpid\u306e\u30ed\u30b0\u3092syslog\u306b\u51fa\u529b\u3059\u308b", "content_html": "
ThinkPad\u306e\u96fb\u6e90\u30d7\u30e9\u30b0\u306eOn/Off\u3067\u4ee5\u524d\u306f\u30a4\u30d9\u30f3\u30c8\u304clog\u306b\u6b8b\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\uff0c\u96fb\u6e90\u7ba1\u7406\u30c7\u30fc\u30e2\u30f3\u304c\u52d5\u3044\u3066\u3044\u3066\u96fb\u6e90\u306e\u72b6\u614b\u304c\u53d6\u5f97\u3067\u304d\u308b\u72b6\u614b\u3067\u3082\u3044\u3064\u306e\u9803\u304b\u3089\u304b\u8a18\u9332\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\uff0e\u505c\u96fb\u3057\u305f\u6642\u9593\u304c\u308f\u304b\u3063\u3066\u4fbf\u5229\u3060\u3063\u305f\u306e\u3067\u30ed\u30b0\u671f\u8a18\u9332\u3067\u304d\u306a\u3044\u304b\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u305f\uff0e
\n\n
acpitool \u3067\u96fb\u6e90\u30a2\u30c0\u30d7\u30bf\u306e\u72b6\u614b\u3092\u53d6\u5f97$ acpitool | grep AC\n AC adapter : online\n$ acpitool | grep AC\n AC adapter : off-line\nThinkPad\u306eFAN\u3092\u5236\u5fa1\u3059\u308b\u65b9\u6cd5\u3092\u8abf\u3079\u3066\u601d\u3044\u51fa\u3057\u305f\u306e\u3067acpid\u306eman\u3084\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b\u3068\uff0c -l, --logevents \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u3046\u3068\u3059\u3079\u3066\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u30ed\u30b0\u306b\u51fa\u529b\u3057\u3066\u304f\u308c\u308b\u3088\u3046\u3067\u3059\uff0e
$ /sbin/acpid -h 2>&1 | grep '\\-l,'\n -l, --logevents Log all event activity.\n$ man acpid | grep -i logevents -A1\n -l, --logevents\n This option tells acpid to log information about all events and actions.\n/etc/default/acpid \u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\uff0cacpid \u306e\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3\u306b -l \u3092\u8ffd\u52a0\u3057\u307e\u3059\uff0e
diff --git a/default/acpid b/default/acpid\nindex c651a78..a6a7add 100644\n--- a/default/acpid\n+++ b/default/acpid\n@@ -1,7 +1,7 @@\n # Options to pass to acpid\n #\n # OPTIONS are appended to the acpid command-line\n-#OPTIONS=\"\"\n+OPTIONS=\"-l\"\n\n # Linux kernel modules to load before starting acpid\n #\nacpid \u3092\u518d\u8d77\u52d5\u3057\u3066\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3064\u3044\u3066\u3044\u308b\u306e\u3092\u78ba\u8a8d\u3057\u307e\u3059\uff0e
\n$ sudo service acpid restart\n$ sudo service acpid status\n\u25cf acpid.service - ACPI event daemon\n Loaded: loaded (/lib/systemd/system/acpid.service; disabled; vendor preset: enabled)\n Active: active (running) since Sun 2021-07-11 05:57:54 JST; 44s ago\nTriggeredBy: \u25cf acpid.socket\n \u25cf acpid.path\n Docs: man:acpid(8)\n Main PID: 2830732 (acpid)\n Tasks: 1 (limit: 9336)\n Memory: 288.0K\n CPU: 6ms\n CGroup: /system.slice/acpid.service\n \u2514\u25002830732 /usr/sbin/acpid -l\n\nJul 11 05:57:54 yoga-260 systemd[1]: Started ACPI event daemon.\nJul 11 05:57:54 yoga-260 acpid[2830732]: starting up with netlink and the input layer\nJul 11 05:57:54 yoga-260 acpid[2830732]: 1 rule loaded\nJul 11 05:57:54 yoga-260 acpid[2830732]: waiting for events: event logging is on\n$ ps aux | grep [/]sbin/acpid\nroot 2830732 0.0 0.0 2352 684 ? Ss 05:57 0:00 /usr/sbin/acpid -l\nacpid \u306b -l \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u3064\u3044\u3066\u3044\u308b\u72b6\u614b\u3067syslog\u3092tail\u3057\u306a\u304c\u3089\u96fb\u6e90\u3092\u629c\u304d\u5dee\u3057\u3057\u3066\u307f\u308b\u3068\u5c11\u3057\u53ef\u8aad\u6027\u304c\u60aa\u3044\u3067\u3059\u304c\u30ed\u30b0\u304c\u51fa\u529b\u3055\u308c\u308b\u306e\u304c\u308f\u304b\u308a\u307e\u3057\u305f\uff0e
$ sudo tail -f /var/log/syslog | grep acpid:\nJul 11 05:59:22 yoga-260 acpid: received netlink event \"battery PNP0C0A:00 00000080 00000001\"\nJul 11 05:59:22 yoga-260 acpid: 0 total rules matched\nJul 11 05:59:22 yoga-260 acpid: completed netlink event \"battery PNP0C0A:00 00000080 00000001\"\nJul 11 05:59:23 yoga-260 acpid: received netlink event \"ac_adapter ACPI0003:00 00000080 00000000\"\nJul 11 05:59:23 yoga-260 acpid: 0 total rules matched\nJul 11 05:59:23 yoga-260 acpid: completed netlink event \"ac_adapter ACPI0003:00 00000080 00000000\"\nJul 11 05:59:23 yoga-260 acpid: received netlink event \"ibm/hotkey LEN0068:00 00000080 00006030\"\nJul 11 05:59:23 yoga-260 acpid: 0 total rules matched\nJul 11 05:59:23 yoga-260 acpid: completed netlink event \"ibm/hotkey LEN0068:00 00000080 00006030\"\nJul 11 05:59:23 yoga-260 acpid: received netlink event \"thermal_zone LNXTHERM:00 00000081 00000000\"\nJul 11 05:59:23 yoga-260 acpid: 0 total rules matched\nJul 11 05:59:23 yoga-260 acpid: completed netlink event \"thermal_zone LNXTHERM:00 00000081 00000000\"\nJul 11 05:59:26 yoga-260 acpid: received netlink event \"battery PNP0C0A:00 00000080 00000001\"\nJul 11 05:59:26 yoga-260 acpid: 0 total rules matched\nJul 11 05:59:26 yoga-260 acpid: completed netlink event \"battery PNP0C0A:00 00000080 00000001\"\nJul 11 05:59:26 yoga-260 acpid: received netlink event \"ac_adapter ACPI0003:00 00000080 00000001\"\nJul 11 05:59:26 yoga-260 acpid: 0 total rules matched\nJul 11 05:59:26 yoga-260 acpid: completed netlink event \"ac_adapter ACPI0003:00 00000080 00000001\"\nJul 11 05:59:26 yoga-260 acpid: received netlink event \"ibm/hotkey LEN0068:00 00000080 00006030\"\nJul 11 05:59:26 yoga-260 acpid: 0 total rules matched\nJul 11 05:59:26 yoga-260 acpid: completed netlink event \"ibm/hotkey LEN0068:00 00000080 00006030\"\nJul 11 05:59:26 yoga-260 acpid: received netlink event \"thermal_zone LNXTHERM:00 00000081 00000000\"\nJul 11 05:59:26 yoga-260 acpid: 0 total rules matched\nJul 11 05:59:26 yoga-260 acpid: completed netlink event \"thermal_zone LNXTHERM:00 00000081 00000000\"\n\u3059\u3079\u3066\u306e\u30a4\u30d9\u30f3\u30c8\u304c\u51fa\u529b\u3055\u308c\u308b\u306e\u3067\uff0c\u30dc\u30ea\u30e5\u30fc\u30e0\u3084\uff0c\u8f1d\u5ea6\u306e\u8abf\u6574\u3067\u3082\u3053\u306e\u3088\u3046\u306b\u66f8\u304d\u51fa\u3055\u308c\u307e\u3059\uff0e
\nJul 11 06:01:12 t430s acpid: received input layer event \"button/volumeup VOLUP 00000080 00000000 K\"\nJul 11 06:01:12 t430s acpid: rule from 1840013[0:0] matched\nJul 11 06:01:12 t430s acpid: notifying client 1840013[0:0]\nJul 11 06:01:12 t430s acpid: 1 total rule matched\nJul 11 06:01:12 t430s acpid: completed input layer event \"button/volumeup VOLUP 00000080 00000000 K\"\nJul 11 06:01:13 t430s acpid: received input layer event \"button/volumedown VOLDN 00000080 00000000 K\"\nJul 11 06:01:13 t430s acpid: rule from 1840013[0:0] matched\nJul 11 06:01:13 t430s acpid: notifying client 1840013[0:0]\nJul 11 06:01:13 t430s acpid: 1 total rule matched\nJul 11 06:01:13 t430s acpid: completed input layer event \"button/volumedown VOLDN 00000080 00000000 K\"\nJul 11 06:01:16 t430s acpid: received input layer event \"video/brightnessdown BRTDN 00000087 00000000 K\"\nJul 11 06:01:16 t430s acpid: rule from 1840013[0:0] matched\nJul 11 06:01:16 t430s acpid: notifying client 1840013[0:0]\nJul 11 06:01:16 t430s acpid: 1 total rule matched\nJul 11 06:01:16 t430s acpid: completed input layer event \"video/brightnessdown BRTDN 00000087 00000000 K\"\nJul 11 06:01:16 t430s acpid: received input layer event \"video/brightnessup BRTUP 00000086 00000000 K\"\nJul 11 06:01:16 t430s acpid: rule from 1840013[0:0] matched\nJul 11 06:01:16 t430s acpid: notifying client 1840013[0:0]\nJul 11 06:01:16 t430s acpid: 1 total rule matched\nJul 11 06:01:16 t430s acpid: completed input layer event \"video/brightnessup BRTUP 00000086 00000000 K\"\n\u4ee5\u524d\u3088\u308a\u30ed\u30b0\u304c\u5197\u9577\u3067\u53ef\u8aad\u6027\u304c\u60aa\u3044\u3067\u3059\u304c\u3068\u308a\u3042\u3048\u305a\u52d5\u4f5c\u3057\u307e\u3057\u305f\uff0e\u3053\u308c\u3067\u505c\u96fb\u304c\u767a\u751f\u3057\u305f\u3068\u304d\u306b\u505c\u96fb\u767a\u751f\u6642\u9593\u3084\uff0c\u77ed\u3044\u505c\u96fb\u3067\u3042\u308c\u3070\u505c\u96fb\u9593\u9694\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e
\n$ dpkg-query -W acpid rsyslog systemd\nacpid 1:2.0.32-1\nrsyslog 8.2102.0-2\nsystemd 247.3-5\n$ lsb_release -dr\nDescription: Debian GNU/Linux 11 (bullseye)\nRelease: 11\n$ arch\nx86_64\n$ sudo lshw | grep -E '^\\ \\ \\ \\ product:|^\\ \\ \\ \\ version:'\n product: 23533KJ (LENOVO_MT_2353)\n version: ThinkPad T430s\n$ dpkg-query -W acpid rsyslog systemd\nacpid 1:2.0.32-1\nrsyslog 8.2102.0-2\nsystemd 247.3-5\n$ lsb_release -dr\nDescription: Debian GNU/Linux 11 (bullseye)\nRelease: 11\n$ arch\nx86_64\n$ sudo lshw | grep -E '^\\ \\ \\ \\ product:|^\\ \\ \\ \\ version:'\n product: 20FEA02WJP (LENOVO_MT_20FE_BU_Think_FM_ThinkPad Yoga 260)\n version: ThinkPad Yoga 260\n