{"provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdharry.hatenablog.com%2Fentry%2F20090714%2F1247583144\" title=\" ruby \u3067 pstree  - harry\u2019s memorandum\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"harry\u2019s memorandum","author_url":"https://blog.hatena.ne.jp/dharry/","blog_url":"https://dharry.hatenablog.com/","provider_url":"https://hatena.blog","url":"https://dharry.hatenablog.com/entry/20090714/1247583144","title":" ruby \u3067 pstree ","width":"100%","image_url":null,"author_name":"dharry","description":"ruby\u3067\u66f8\u304f\u7c21\u6613\u7248pstree\u306f\u3053\u3093\u306a\u611f\u3058\u304b\u306a\u3002 class PsTree def initialize @line = \"-\" @space = \" \" @table = Hash.new{|h,k| h[k] = []} proc_dat end def proc_dat Dir.glob(\"/proc/[0-9]*\") {|dir| stat = stat_open(\"#{dir}/stat\") pid = stat[0]; ppid = stat[1]; comm = stat[2] cmdline = cmdline_open(\"#{dir}/cmdline\") cmdline =\u2026","categories":["ruby"],"version":"1.0","type":"rich","published":"2009-07-14 23:52:24","height":"190"}