{"id":129085,"date":"2025-05-22T11:32:30","date_gmt":"2025-05-22T02:32:30","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=129085"},"modified":"2025-05-22T11:32:30","modified_gmt":"2025-05-22T02:32:30","slug":"sleepwatcher-sleeptime-recording","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/sleepwatcher-sleeptime-recording\/","title":{"rendered":"SleepWatcher\u3092\u4f7f\u3063\u3066Mac\u306e\u30b9\u30ea\u30fc\u30d7\u6642\u9593\u3092\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2025\/05\/pexels-photo-2569997.jpg\" alt=\"\" width=\"1125\" height=\"750\" class=\"aligncenter size-full wp-image-129086\" \/><\/p>\n<p>\u6700\u8fd1\u306eMac\u306fSSD\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u63a1\u7528\u3084\u3001\u30d5\u30a1\u30f3\u30ec\u30b9\u8a2d\u8a08\u3001LED\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u306e\u5ec3\u6b62\u306a\u3069\u306b\u3088\u308a\u3001\u30b9\u30ea\u30fc\u30d7\u306e\u72b6\u614b\u304c\u533a\u5225\u3057\u3065\u3089\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Apple\u306f\u300c\u30b7\u30fc\u30e0\u30ec\u30b9\u306a\u4f53\u9a13\u300d\u3068\u3057\u3066\u3001\u3053\u308c\u3067\u3082\u554f\u984c\u306a\u3044\u3068\u8003\u3048\u3066\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u3059\u308b\u3068\u5b9f\u969b\u306b\u30b9\u30ea\u30fc\u30d7\u3057\u3066\u3044\u308b\u306e\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3057\u305f\u3044\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u672c\u65e5\u306f\u30b9\u30ea\u30fc\u30d7\u3068\u5fa9\u5e30\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3067\u304d\u308bMac\u7528\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u300c<a href=\"https:\/\/www.bernhard-baehr.de\/\">SleepWatcher<\/a>\u300d\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>SleepWatcher\u306f\u3001Mac OS X 10.5\u4ee5\u4e0a\u3067\u52d5\u4f5c\u3057\u3001Mac\u306e\u30b9\u30ea\u30fc\u30d7\u3001\u30a6\u30a7\u30a4\u30af\u30a2\u30c3\u30d7\u3001\u30a2\u30a4\u30c9\u30eb\u72b6\u614b\u3092\u76e3\u8996\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002Mac\u3084Mac\u306e\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u304c\u30b9\u30ea\u30fc\u30d7\u30e2\u30fc\u30c9\u306b\u5165\u3063\u305f\u308a\u30b9\u30ea\u30fc\u30d7\u89e3\u9664\u3055\u308c\u305f\u308a\u3057\u305f\u3068\u304d\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u64cd\u4f5c\u305b\u305a\u306b\u4e00\u5b9a\u6642\u9593\u7d4c\u904e\u3057\u305f\u3068\u304d\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u4f11\u61a9\u5f8c\u306b\u6d3b\u52d5\u3092\u518d\u958b\u3057\u305f\u3068\u304d\u3001Mac\u30ce\u30fc\u30c8\u30d6\u30c3\u30af\u306e\u96fb\u6e90\u304c\u7740\u8131\u3055\u308c\u305f\u3068\u304d\u306b\u3001Unix\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fSleepWatcher\u3092\u4f7f\u3044\u3001\u30b9\u30ea\u30fc\u30d7\u306b\u5165\u3063\u305f\u3068\u304d\u3068\u5fa9\u5e30\u3057\u305f\u3068\u304d\u306e\u6642\u523b\u3092\u8a18\u9332\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>SleepWatcher\u3067\u30b9\u30ea\u30fc\u30d7\u6642\u9593\u3092\u8a18\u9332<\/h2>\n<p>SleepWatcher\u306fHomebrew\u3084MacPorts\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Homebrew\u306e\u5834\u5408:<\/p>\n<pre>\r\n# \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\nbrew install sleepwatcher\r\n# \u5e38\u99d0\u3055\u305b\u308b\u5834\u5408\r\n$ brew services start sleepwatcher\r\n<\/pre>\n<p>MacPorts\u306e\u5834\u5408:<\/p>\n<pre>\r\n# \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\r\nsudo port install sleepwatcher\r\n# \u5e38\u99d0\u3055\u305b\u308b\u5834\u5408\r\n$ sudo port load sleepwatcher\r\n<\/pre>\n<p>\u30b9\u30ea\u30fc\u30d7\u6642\u306b\u5b9f\u884c\u3055\u308c\u308b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8<code>~\/.sleep<\/code>\u3068\u5fa9\u5e30\u6642\u306b\u5b9f\u884c\u3055\u308c\u308b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8<code>~\/.wakeup<\/code>\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><code>~\/.sleep<\/code>: <\/p>\n<pre>\r\n#!\/bin\/bash\r\necho \"Sleep at $(date '+%Y-%m-%d %H:%M')\" >> ~\/.sleepwatcher.log\r\n<\/pre>\n<p><code>~\/.wakeup<\/code>:<\/p>\n<pre>\r\n#!\/bin\/bash\r\necho \"Wakeup at $(date '+%Y-%m-%d %H:%M')\" >> ~\/.sleepwatcher.log\r\n<\/pre>\n<p>\u305d\u308c\u305e\u308c\u300cchmod + x\u300d\u3067\u5b9f\u884c\u6a29\u9650\u3082\u4ed8\u3051\u3066\u304a\u304d\u307e\u3059\u3002\u3069\u3061\u3089\u3082date\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u6642\u523b\u3092<code>~\/.sleepwatcher.log<\/code>\u306b\u8a18\u9332\u3057\u3066\u3044\u304f\u30b7\u30f3\u30d7\u30eb\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002<\/p>\n<p>\u6e96\u5099\u304c\u3067\u304d\u305f\u3089Apple\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c\u30b9\u30ea\u30fc\u30d7\u300d\u3092\u9078\u3073\u30b9\u30ea\u30fc\u30d7\u3055\u305b\u3001\u3057\u3070\u3089\u304f\u305f\u3063\u305f\u3042\u3068\u306b\u5fa9\u5e30\u3055\u305b\u307e\u3059\u3002<code>~\/.sleepwatcher.log<\/code>\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u308c\u3070\u6210\u529f\u3067\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b1\u65e5\u3064\u304b\u3063\u3066\u307f\u305f\u3068\u3053\u308d\u6b21\u306e\u3088\u3046\u306a\u8a18\u9332\u304c\u3068\u308c\u307e\u3057\u305f\u3002<\/p>\n<pre>\r\n$ more ~\/.sleepwatcher.log\r\nSleep at 2025-05-22 00:14\r\nWakeup at 2025-05-22 00:15\r\nSleep at 2025-05-22 00:32\r\nWakeup at 2025-05-22 08:01\r\nSleep at 2025-05-22 08:37\r\nWakeup at 2025-05-22 08:40\r\n<\/pre>\n<p>\u624b\u52d5\u3067\u30b9\u30ea\u30fc\u30d7\u3055\u305b\u305f\u6642\u4ee5\u5916\u306b\u3082\u304d\u3061\u3093\u3068\u30b9\u30ea\u30fc\u30d7\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>SleepWatcher\u3092\u4f7f\u3063\u3066Mac\u306e\u30b9\u30ea\u30fc\u30d7\u6642\u9593\u3092\u8a18\u9332\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002\u81ea\u5206\u306eMac\u304c\u672c\u5f53\u306b\u30b9\u30ea\u30fc\u30d7\u3057\u3066\u3044\u308b\u306e\u304b\u77e5\u308a\u305f\u3044\u3068\u304d\u306b\u4f7f\u3046\u3068\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>\u53c2\u8003\u60c5\u5831:<\/p>\n<ul>\n<li><a href=\"https:\/\/zenn.dev\/c6tower\/articles\/5fcb5299f410d4\">sleepwatcher\u3092\u7528\u3044\u3066macOS\u306e\u30b9\u30ea\u30fc\u30d7\uff0f\u5fa9\u5e30\u6642\u306b\u4efb\u610f\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li>\n<li><a href=\"https:\/\/www.kodiakskorner.com\/log\/258\">Mac OS X: Automating Tasks on Sleep \u00bb Kodiak&apos;s Korner - My Little Corner of the Net<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u306eMac\u306fSSD\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u63a1\u7528\u3084\u3001\u30d5\u30a1\u30f3\u30ec\u30b9\u8a2d\u8a08\u3001LED\u30a4\u30f3\u30b8\u30b1\u30fc\u30bf\u30fc\u306e\u5ec3\u6b62\u306a\u3069\u306b\u3088\u308a\u3001\u30b9\u30ea\u30fc\u30d7\u306e\u72b6\u614b\u304c\u533a\u5225\u3057\u3065\u3089\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002 Apple\u306f\u300c\u30b7\u30fc\u30e0\u30ec\u30b9\u306a\u4f53\u9a13\u300d\u3068\u3057\u3066\u3001\u3053\u308c\u3067\u3082\u554f\u984c\u306a\u3044\u3068\u8003\u3048\u3066\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":129086,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[2047],"tags":[3299,2892],"class_list":["post-129085","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips","tag-mac","tag-sleep"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/129085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=129085"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/129085\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/129086"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=129085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=129085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=129085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}