
{"id":17049,"date":"2018-06-04T19:43:11","date_gmt":"2018-06-04T19:43:11","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=17049"},"modified":"2018-06-04T19:43:11","modified_gmt":"2018-06-04T19:43:11","slug":"pstree-command-usage-example","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2018\/06\/04\/pstree-command-usage-example\/","title":{"rendered":"pstree command usage example with process id as first argument"},"content":{"rendered":"<p><u>ABOUT pstree<\/u><\/p>\n<pre>\npstree is a Linux command that shows the running processes as a tree. It is used as a more visual alternative to the ps command. The root of the tree is either init or the process with the given pid. It can also be installed in other Unix systems.\n<\/pre>\n<p><u>TYPICAL COMMANDLINE SESSION<\/u><br \/>\n[bash]<br \/>\n$pidof systemd<br \/>\n1461 1059<br \/>\n$pstree 1461<br \/>\nsystemd\u2500\u252c\u2500(sd-pam)<br \/>\n        \u251c\u2500at-spi-bus-laun\u2500\u252c\u2500dbus-daemon<br \/>\n        \u2502                 \u2514\u25003*[{at-spi-bus-laun}]<br \/>\n        \u251c\u2500at-spi2-registr\u2500\u2500\u25002*[{at-spi2-registr}]<br \/>\n        \u251c\u2500dbus-daemon<br \/>\n        \u251c\u2500dconf-service\u2500\u2500\u25002*[{dconf-service}]<br \/>\n        \u251c\u2500evolution-addre\u2500\u252c\u2500evolution-addre\u2500\u2500\u25005*[{evolution-addre}]<br \/>\n        \u2502                 \u2514\u25004*[{evolution-addre}]<br \/>\n        \u251c\u2500evolution-calen\u2500\u252c\u2500evolution-calen\u2500\u2500\u25009*[{evolution-calen}]<br \/>\n        \u2502                 \u2514\u25004*[{evolution-calen}]<br \/>\n        \u251c\u2500evolution-sourc\u2500\u2500\u25003*[{evolution-sourc}]<br \/>\n        \u251c\u2500gnome-shell-cal\u2500\u2500\u25005*[{gnome-shell-cal}]<br \/>\n        \u251c\u2500gnome-terminal-\u2500\u252c\u2500bash\u2500\u2500\u2500pstree<br \/>\n        \u2502                 \u2514\u25003*[{gnome-terminal-}]<br \/>\n        \u251c\u2500goa-daemon\u2500\u2500\u25004*[{goa-daemon}]<br \/>\n        \u251c\u2500goa-identity-se\u2500\u2500\u25003*[{goa-identity-se}]<br \/>\n        \u251c\u2500gvfs-afc-volume\u2500\u2500\u25003*[{gvfs-afc-volume}]<br \/>\n        \u251c\u2500gvfs-goa-volume\u2500\u2500\u25002*[{gvfs-goa-volume}]<br \/>\n        \u251c\u2500gvfs-gphoto2-vo\u2500\u2500\u25002*[{gvfs-gphoto2-vo}]<br \/>\n        \u251c\u2500gvfs-mtp-volume\u2500\u2500\u25002*[{gvfs-mtp-volume}]<br \/>\n        \u251c\u2500gvfs-udisks2-vo\u2500\u2500\u25002*[{gvfs-udisks2-vo}]<br \/>\n        \u251c\u2500gvfsd\u2500\u2500\u25002*[{gvfsd}]<br \/>\n        \u251c\u2500gvfsd-fuse\u2500\u2500\u25005*[{gvfsd-fuse}]<br \/>\n        \u251c\u2500gvfsd-metadata\u2500\u2500\u25002*[{gvfsd-metadata}]<br \/>\n        \u251c\u2500mission-control\u2500\u2500\u25003*[{mission-control}]<br \/>\n        \u251c\u2500pulseaudio\u2500\u2500\u25002*[{pulseaudio}]<br \/>\n        \u2514\u2500tracker-store\u2500\u2500\u25007*[{tracker-store}]<br \/>\n$pstree 1059<br \/>\nsystemd\u2500\u252c\u2500(sd-pam)<br \/>\n        \u251c\u2500at-spi-bus-laun\u2500\u252c\u2500dbus-daemon<br \/>\n        \u2502                 \u2514\u25003*[{at-spi-bus-laun}]<br \/>\n        \u251c\u2500at-spi2-registr\u2500\u2500\u25002*[{at-spi2-registr}]<br \/>\n        \u251c\u2500dbus-daemon<br \/>\n        \u2514\u2500pulseaudio\u2500\u2500\u25002*[{pulseaudio}]<br \/>\n$<\/p>\n<p>[\/bash]<br \/>\n[bash]<br \/>\n$pstree `pidof systemd | awk &#8216;{print $2}&#8217;`<br \/>\nsystemd\u2500\u252c\u2500(sd-pam)<br \/>\n        \u251c\u2500at-spi-bus-laun\u2500\u252c\u2500dbus-daemon<br \/>\n        \u2502                 \u2514\u25003*[{at-spi-bus-laun}]<br \/>\n        \u251c\u2500at-spi2-registr\u2500\u2500\u25002*[{at-spi2-registr}]<br \/>\n        \u251c\u2500dbus-daemon<br \/>\n        \u2514\u2500pulseaudio\u2500\u2500\u25002*[{pulseaudio}]<br \/>\n$<\/p>\n<p>[\/bash]<br \/>\nLINK<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Pstree\">https:\/\/en.wikipedia.org\/wiki\/Pstree<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ABOUT pstree pstree is a Linux command that shows the running processes as a tree. It is used as a more visual alternative to the ps command. The root of the tree is either init or the process with the given pid. It can also be installed in other Unix systems. TYPICAL COMMANDLINE SESSION [bash] &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2018\/06\/04\/pstree-command-usage-example\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;pstree command usage example with process id as first argument&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[15,83],"tags":[1323],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/17049"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=17049"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/17049\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=17049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=17049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=17049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}