{"id":12823,"date":"2010-07-27T12:30:19","date_gmt":"2010-07-27T10:30:19","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=12823"},"modified":"2010-07-27T12:30:19","modified_gmt":"2010-07-27T10:30:19","slug":"monitoring-tree-of-linux-processes","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2010\/07\/27\/monitoring-tree-of-linux-processes\/","title":{"rendered":"Monitoring tree of Linux processes"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>Once in a while there is a need to see the tree of processes on a Linux system. \u00a0When such a need arises, I usually run &#8220;<em>ps auxw &#8211;forest<\/em>&#8220;, which results in something like this (partial output, top only):<\/p>\n<figure id=\"attachment_12824\" aria-describedby=\"caption-attachment-12824\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/ps_auxw_forest.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"12824\" data-permalink=\"https:\/\/mamchenkov.net\/wordpress\/2010\/07\/27\/monitoring-tree-of-linux-processes\/ps_auxw_forest\/\" data-orig-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/ps_auxw_forest.png?fit=746%2C378&amp;ssl=1\" data-orig-size=\"746,378\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"ps auxw &amp;#8211;forest\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;ps auxw &amp;#8211;forest&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/ps_auxw_forest.png?fit=660%2C334&amp;ssl=1\" class=\"size-medium wp-image-12824 \" title=\"\/bin\/ps auxw --forest\" src=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/ps_auxw_forest-500x253.png?resize=500%2C253&#038;ssl=1\" alt=\"\" width=\"500\" height=\"253\" srcset=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/ps_auxw_forest.png?resize=500%2C253&amp;ssl=1 500w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/ps_auxw_forest.png?resize=160%2C81&amp;ssl=1 160w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/ps_auxw_forest.png?resize=75%2C38&amp;ssl=1 75w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/ps_auxw_forest.png?w=746&amp;ssl=1 746w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-12824\" class=\"wp-caption-text\">\/bin\/ps auxw --forest<\/figcaption><\/figure>\n<p>Today, via <a href=\"http:\/\/iarlyy.wordpress.com\/2010\/07\/23\/tools-for-performance-monitoring-on-linux\/\">this blog post<\/a>, I&#8217;ve learned that there is another way &#8211; &#8220;<em>pstree<\/em>&#8220;. \u00a0This command accepts a number of parameters, but in its simplest form, results in something like this (partial output, top only):<\/p>\n<figure id=\"attachment_12825\" aria-describedby=\"caption-attachment-12825\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/pstree.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"12825\" data-permalink=\"https:\/\/mamchenkov.net\/wordpress\/2010\/07\/27\/monitoring-tree-of-linux-processes\/pstree\/\" data-orig-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/pstree.png?fit=746%2C378&amp;ssl=1\" data-orig-size=\"746,378\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"pstree\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;pstree&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/pstree.png?fit=660%2C334&amp;ssl=1\" class=\"size-medium wp-image-12825 \" title=\"\/usr\/bin\/pstree\" src=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/pstree-500x253.png?resize=500%2C253&#038;ssl=1\" alt=\"\" width=\"500\" height=\"253\" srcset=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/pstree.png?resize=500%2C253&amp;ssl=1 500w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/pstree.png?resize=160%2C81&amp;ssl=1 160w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/pstree.png?resize=75%2C38&amp;ssl=1 75w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/07\/pstree.png?w=746&amp;ssl=1 746w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-12825\" class=\"wp-caption-text\">\/usr\/bin\/pstree<\/figcaption><\/figure>\n<p>On my Fedora box, <em>\/usr\/bin\/pstree<\/em> is a part of the psmisc RPM, which is the one that brings <em>\/usr\/bin\/killall<\/em> to the system.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Once in a while there is a need to see the tree of processes on a Linux system. \u00a0When such a need arises, I usually run &#8220;ps auxw &#8211;forest&#8220;, which results in something like this (partial output, top only): Today, via this blog post, I&#8217;ve learned that there is another way &#8211; &#8220;pstree&#8220;. \u00a0This command &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2010\/07\/27\/monitoring-tree-of-linux-processes\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Monitoring tree of Linux processes<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,133,62],"tags":[1960,74,19],"keyring_services":[],"class_list":["post-12823","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-sysadmin","category-technology","tag-command-line","tag-tips","tag-tools"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":7467,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/04\/26\/mrtg\/","url_meta":{"origin":12823,"position":0},"title":"MRTG","author":"Leonid Mamchenkov","date":"April 26, 2004","format":false,"excerpt":"MRTG (Multi Router Traffic Grapher) is monitoring utility, which runs on many platforms and is capable of collecting and graphing statistical information such as network traffic, CPU\/Memory\/Disk space usage, etc. MRTG can gather information using both SNMP protocol and external scripts. Below are few pieces of my MRTG config file\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27447,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/03\/22\/bulletproof-bash-stop-script-on-error\/","url_meta":{"origin":12823,"position":1},"title":"Bulletproof Bash : Stop script on error","author":"Leonid Mamchenkov","date":"March 22, 2017","format":false,"excerpt":"The other day I've been puzzled by the results of a cron job script. \u00a0The bash script in question was written in a hurry a while back, and I was under the assumption that if any of its steps fail, the whole script will fail. \u00a0I was wrong. \u00a0Some commands\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28969,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/11\/12\/using-aws-cli-query-option-to-simplify-output\/","url_meta":{"origin":12823,"position":2},"title":"Using aws-cli &#8211;query Option To Simplify Output","author":"Leonid Mamchenkov","date":"November 12, 2018","format":false,"excerpt":"Eric Hammond shares a super-handy tip for those of us who work with Amazon AWS via the command line: I just learned about a recent addition to aws-cli: The\u00a0--query\u00a0option lets you specify what parts of the response data structure you want output. Instead of wading through pages of JSON output,\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27421,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/03\/17\/cakephp-3-remove-shell-welcome-header\/","url_meta":{"origin":12823,"position":3},"title":"CakePHP 3 : Remove Shell Welcome Header","author":"Leonid Mamchenkov","date":"March 17, 2017","format":false,"excerpt":"CakePHP 3\u00a0has an excellent support for command line Shells, Tasks, and Console Tools. \u00a0There are a few that are bundled with the framework itself, and that come from a variety of plugins. \u00a0And, of course, you can have your own commands, specific to your application. There is one tiny little\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":22001,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/06\/17\/httpie-command-line-http-client-a-user-friendly-curl-replacement\/","url_meta":{"origin":12823,"position":4},"title":"HTTPie &#8211; command line HTTP client, a user-friendly cURL replacement","author":"Leonid Mamchenkov","date":"June 17, 2014","format":"link","excerpt":"HTTPie - command line HTTP client, a user-friendly cURL replacement. Main features: Expressive and intuitive syntax Formatted and colorized terminal output Built-in JSON support Forms and file uploads HTTPS, proxies, and authentication Arbitrary request data Custom headers Persistent sessions Wget-like downloads Python 2.6, 2.7 and 3.x support Linux, Mac OS\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"httpie","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2014\/06\/httpie-500x500.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":26813,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/10\/31\/easier-aws-cli-with-docker\/","url_meta":{"origin":12823,"position":5},"title":"Easier AWS CLI with Docker","author":"Leonid Mamchenkov","date":"October 31, 2016","format":false,"excerpt":"Here is a handy blog post that shows how to simplify the installation and running of the Amazon AWS command line commands, using Docker. \u00a0With the Dockerfile like this: One can build the image and run the container as follows: Obviously, DO NOT hardcode your Amazon AWS credentials into an\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/12823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=12823"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/12823\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=12823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=12823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=12823"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=12823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}