{"id":838,"date":"2014-02-14T14:30:58","date_gmt":"2014-02-14T22:30:58","guid":{"rendered":"http:\/\/h2plus.biz\/hiromitsu\/?p=838"},"modified":"2014-02-14T14:32:35","modified_gmt":"2014-02-14T22:32:35","slug":"%e3%83%97%e3%83%ad%e3%82%bb%e3%82%b9%e3%81%ae%e3%82%b3%e3%83%bc%e3%83%ab%e3%82%b9%e3%82%bf%e3%83%83%e3%82%af%e3%82%92%e8%aa%bf%e3%81%b9%e3%82%8b%e3%82%b7%e3%82%a7%e3%83%ab%e3%82%b9%e3%82%af%e3%83%aa","status":"publish","type":"post","link":"https:\/\/h2plus.biz\/hiromitsu\/entry\/838","title":{"rendered":"\u30d7\u30ed\u30bb\u30b9\u306e\u30b3\u30fc\u30eb\u30b9\u30bf\u30c3\u30af\u3092\u8abf\u3079\u308b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"<p>\u81ea\u5206\u306e\u77e5\u3089\u306a\u3044\u3068\u3053\u308d\u3067\u3001\u3042\u308b\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u306fLinux\u3067\u306f\u73cd\u3057\u3044\u3053\u3068\u3067\u306f\u306a\u3044\u3002\u4ee3\u8868\u7684\u306a\u306e\u306f<code>cron<\/code>\u3060\u3002\u305f\u3060\u3001<code>cron<\/code>\u306a\u3089<code>crontab -l<\/code>\u3092\u3057\u305f\u308a\u3001\u76f4\u63a5<code>\/var\/spool\/cron\/crontabs\/*<\/code>\u3092\u8abf\u3079\u308c\u3070\u3001\u3069\u3093\u306a\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u308b\u304b\u3059\u3050\u306b\u8abf\u3079\u304c\u3064\u304f\u3002\u3057\u304b\u3057\u3001\u3042\u308b\u30a4\u30d9\u30f3\u30c8\u304c\u767a\u751f\u3057\u305f\u3053\u3068\u3092\u30c8\u30ea\u30ac\u30fc\u306b\u3057\u3066\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u305f\u5834\u5408\u3001\u306a\u305c\u305d\u306e\u30b3\u30de\u30f3\u30c9\u304c\u7a81\u7136\u547c\u3070\u308c\u305f\u306e\u304b\u3068\u3044\u3046\u3053\u3068\u306b\u56f0\u60d1\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001<code>ifup<\/code>\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u305f\u5834\u5408\u3001<code>\/etc\/network\/if-pre-up.d<\/code>\u3068<code>\/etc\/network\/if-up.d<\/code>\u914d\u4e0b\u306b\u3042\u308b\u30b3\u30de\u30f3\u30c9\u304c\u3001<code>ifup<\/code>\u306e\u5b9f\u884c\u4e2d\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002\u3042\u308b\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306f\u30ed\u30b0\u306a\u3069\u304b\u3089\u308f\u304b\u3063\u3066\u3044\u308b\u304c\u3001\u3069\u306e\u3088\u3046\u306a\u7d4c\u7def\u3067\u5b9f\u884c\u3055\u308c\u308b\u306b\u81f3\u3063\u305f\u304b\u304c\u308f\u304b\u3089\u306a\u3044\u3001\u3068\u3044\u3046\u5834\u5408\u306b\u306f\u3001\u305d\u306e\u30b3\u30de\u30f3\u30c9\u306e\u89aa\u30d7\u30ed\u30bb\u30b9\u3092\u8fbf\u3063\u3066\u3044\u3051\u3070\u8abf\u3079\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p><!--more--><br \/>\n\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u304c\u30d0\u30a4\u30ca\u30ea\u3060\u3068\u624b\u3082\u8db3\u3082\u51fa\u306a\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u304c\u3001\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3042\u308c\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u3063\u3066\u547c\u3073\u51fa\u3057\u5143\u306e\u89aa\u30d7\u30ed\u30bb\u30b9\u305f\u3061\u3092\u8fbf\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ntrace_parents()\r\n{\r\n    local pid=$$ cmd\r\n    while true; do\r\n        cmd=&quot;$(cat \/proc\/$pid\/cmdline | tr '&#92;&#48;' ' ')&quot;\r\n        echo -e &quot;pid=$pid, cmd=$cmd&quot;\r\n        [ $pid -eq 1 ] &amp;&amp; break\r\n        pid=$(awk '\/^PPid:\/{print $2}' \/proc\/$pid\/status)\r\n    done\r\n}\r\n\r\ntrace_parents &gt; \/tmp\/parents.$(basename $0).log\r\n<\/pre>\n<p>PID\u304c1\u3001\u3059\u306a\u308f\u3061<code>init<\/code>\u306b\u306a\u308b\u307e\u3067<code>\/proc\/<em>pid<\/em>\/status<\/code>\u306e\u4e2d\u304b\u3089\u89aa\u30d7\u30ed\u30bb\u30b9\u306ePID\u3092\u8fbf\u3063\u3066\u3044\u304f\u3068\u3044\u3046\u3082\u306e\u3060\u3002<code>\/proc\/<em>pid<\/em>\/cmdline<\/code>\u3092<code>cat<\/code>\u3067\u30c0\u30f3\u30d7\u3055\u305b\u308b\u3068\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u5f15\u6570\u306e\u9593\u306b\u30b9\u30da\u30fc\u30b9\u304c\u306a\u3044\u3088\u3046\u306b\u898b\u3048\u308b\u304c\u3001\u533a\u5207\u308a\u6587\u5b57\u306fnull\u6587\u5b57\uff08<code>\\0<\/code>\uff09\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001<code>tr<\/code>\u3067\u30b9\u30da\u30fc\u30b9\u306b\u7f6e\u63db\u3059\u308c\u3070\u898b\u3084\u3059\u304f\u306a\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u5206\u306e\u77e5\u3089\u306a\u3044\u3068\u3053\u308d\u3067\u3001\u3042\u308b\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u306fLinux\u3067\u306f\u73cd\u3057\u3044\u3053\u3068\u3067\u306f\u306a\u3044\u3002\u4ee3\u8868\u7684\u306a\u306e\u306fcron\u3060\u3002\u305f\u3060\u3001cron\u306a\u3089crontab -l\u3092\u3057\u305f\u308a\u3001\u76f4\u63a5\/var\/spool\/cron\/crontab <a href='https:\/\/h2plus.biz\/hiromitsu\/entry\/838' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[84,26],"tags":[261,259,260,257,258],"_links":{"self":[{"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/posts\/838"}],"collection":[{"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/comments?post=838"}],"version-history":[{"count":0,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/posts\/838\/revisions"}],"wp:attachment":[{"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/media?parent=838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/categories?post=838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h2plus.biz\/hiromitsu\/wp-json\/wp\/v2\/tags?post=838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}