{"id":1737,"date":"2023-03-28T12:39:14","date_gmt":"2023-03-28T03:39:14","guid":{"rendered":"https:\/\/mifmif.mydns.jp\/masterkudo\/?p=1737"},"modified":"2023-03-28T12:39:14","modified_gmt":"2023-03-28T03:39:14","slug":"post-1737","status":"publish","type":"post","link":"https:\/\/mifmif.mydns.jp\/masterkudo\/?p=1737","title":{"rendered":"Fileserver\u3067\u306e\u5bb9\u91cf\u78ba\u8a8d\u306econky\uff08lua\uff09\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3000conky (lua) script for checking capacity on Fileserver"},"content":{"rendered":"<p>\u3000Fileserver\u3092\u4f5c\u3063\u305f\u3068\u304d\u306a\u3069\u306b\u3001\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u306b\u30de\u30a6\u30f3\u30c8\u3057\u305fHDD\u306e\u5bb9\u91cf\u3092\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u3067\u5e38\u6642\u76e3\u8996\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002\u305d\u308c\u3092\u884c\u3046\u305f\u3081\u306e\u3001conky(lua)\u7528\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u4ee5\u4e0b\u306ezip\u30d5\u30a1\u30a4\u30eb\u306b\u5165\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\nIt is convenient to constantly monitor the capacity of the HDDs mounted in a certain folder on the desktop when creating a Fileserver. This is a configuration file for conky(lua) to do that. It&#8217;s in the zip file below.<br \/>\n<a href=\"https:\/\/mifmif.mydns.jp\/pcpc\/public\/masterkudo\/diskspace-conky.zip\">diskspace-conky.zip<\/a> <br \/>\n\u3000\u81ea\u5206\u306e\u30db\u30fc\u30e0\u30d5\u30a9\u30eb\u30c0\u306b\u5c55\u958b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300c.conkyrc\u300d\u30d5\u30a1\u30a4\u30eb\u3068\u300c.lua\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u304c\u3067\u304d\u307e\u3059\u3002\u300cconky-all\u300d\u3092apt\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u624b\u52d5\u3067\u8d77\u52d5\u3059\u308b\u5834\u5408\u306f\u3001\u300cconky\u300d\u3068\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3066\u3070\u8d77\u52d5\u3057\u307e\u3059\u3002\u81ea\u52d5\u8d77\u52d5\u3057\u305f\u3044\u5834\u5408\u306f\u3001\uff12\uff10\u79d2\u307b\u3069\u30b9\u30ea\u30fc\u30d7\u3057\u305f\u65b9\u304c\u3088\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\uff08\u30b5\u30fc\u30d0\u306eHDD\u306e\u8d77\u52d5\u5177\u5408\u306b\u3088\u308b\u306e\u3067\u8abf\u6574\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff09\u3053\u306e\u5834\u5408\u3001\u300c\u81ea\u52d5\u8d77\u52d5\u3059\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u300d\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nExtract it to your home folder. A &#8220;.conkyrc&#8221; file and a &#8220;.lua&#8221; directory are created. Install &#8220;conky-all&#8221; with apt. If you want to start it manually, you can start it by typing the command &#8220;conky&#8221;. If you want to start automatically, it may be better to sleep for about 20 seconds. (Adjust it because it depends on how the server&#8217;s HDD starts.) In this case, enter the following command in &#8220;Applications that start automatically&#8221;.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>bash -c 'sleep 20;conky'<\/code><\/pre>\n<\/div>\n<p>\u3000\u3042\u306a\u305f\u304c\u5909\u66f4\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u7b87\u6240\u306f\u3001\u300c.conkyrc\u300d\u30d5\u30a1\u30a4\u30eb\u3068\u300c.lua\/scripts\/clock_rings.lua\u300d\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u76f4\u63a5\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u3044\u308bHDD\u540d\u3092\u3001\u300chddname-1,hddname-2,hddname-3\u300d\u3068\u3057\u3066\u3044\u308b\u307b\u304b\u3001\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u3082\u300c\/fileserver\/hddname-1,\/fileserver\/hddname-2,\/fileserver\/hddname-3\u300d\u3068\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u3053\u308c\u3089\u306e\u540d\u524d\u3068\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u3092\u81ea\u5206\u306e\u30d5\u30a1\u30a4\u30eb\u30b5\u30fc\u30d0\u306b\u5408\u308f\u305b\u3066\u66f8\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nThe places you have to change are the &#8220;.conkyrc&#8221; file and &#8220;.lua\/scripts\/clock_rings.lua&#8221;. By default, the directly mounted HDD names are &#8220;hddname-1,hddname-2,hddname-3&#8221;, and the mount points are also &#8220;\/fileserver\/hddname-1,\/fileserver\/hddname-2,\/fileserver\/hddname -3&#8221; is written. So change these names and mount points to match your file server.<br \/>\n\u3000\u305d\u308c\u305e\u308c\u306e\u4f4d\u7f6e\u3082\u3001\u300cgoto,voffset\u300d\u3084\u3001\u300cx=,y=\u300d\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u30d5\u30a9\u30f3\u30c8\u304c\u9055\u3046\u5834\u5408\u306a\u3069\u306b\u305d\u308c\u3089\u306e\u4f4d\u7f6e\u304c\u305a\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001\u3042\u306a\u305f\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u518d\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nEach position is also set with &#8220;goto, voffset&#8221; and &#8220;x=, y=&#8221;. If the font is different, their positions may shift, so please set them again according to your environment.<br \/>\n\u53f3\u4e0a\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5f62\u3067\u51fa\u307e\u3059\u3002\uff08\u5fdc\u7528\u4f8b\uff09<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mifmif.mydns.jp\/masterkudo\/wp-content\/uploads\/2023\/03\/20c3bab836ed836b10692a3e496e117d.png\" alt=\"\" class=\"size-full wp-image-1738 aligncenter\" width=\"263\" height=\"502\" srcset=\"https:\/\/mifmif.mydns.jp\/masterkudo\/wp-content\/uploads\/2023\/03\/20c3bab836ed836b10692a3e496e117d.png 263w, https:\/\/mifmif.mydns.jp\/masterkudo\/wp-content\/uploads\/2023\/03\/20c3bab836ed836b10692a3e496e117d-157x300.png 157w\" sizes=\"auto, (max-width: 263px) 100vw, 263px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000Fileserver\u3092\u4f5c\u3063\u305f\u3068\u304d\u306a\u3069\u306b\u3001\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u306b\u30de\u30a6\u30f3\u30c8\u3057\u305fHDD\u306e\u5bb9\u91cf\u3092\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u3067\u5e38\u6642\u76e3\u8996\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002\u305d\u308c\u3092\u884c\u3046\u305f\u3081\u306e\u3001conky(lua)\u7528\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u4ee5\u4e0b\u306ezip\u30d5\u30a1\u30a4\u30eb\u306b\u5165\u3063\u3066\u3044\u307e\u3059\u3002 I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1738,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=\/wp\/v2\/posts\/1737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1737"}],"version-history":[{"count":1,"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=\/wp\/v2\/posts\/1737\/revisions"}],"predecessor-version":[{"id":1739,"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=\/wp\/v2\/posts\/1737\/revisions\/1739"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=\/wp\/v2\/media\/1738"}],"wp:attachment":[{"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mifmif.mydns.jp\/masterkudo\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}