{"id":207,"date":"2018-10-27T18:00:35","date_gmt":"2018-10-27T18:00:35","guid":{"rendered":"https:\/\/datablog.roman-halliday.com\/?p=207"},"modified":"2018-09-01T17:30:41","modified_gmt":"2018-09-01T17:30:41","slug":"view-running-processes-and-their-children","status":"publish","type":"post","link":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/","title":{"rendered":"View running processes and their children"},"content":{"rendered":"<p>When using bash, ps is a very powerful tool for viewing running processes. I have built a script\/library for manipulating its output to create trees for either running shell scripts, or user sessions. This allows me to see who is doing\/executing what on a linux host at a point in time.<\/p>\n<p>Continuing with some of my bash notes, I was reminded of this recently during a discussion about identifying process ids. I created this when I wanted to know one of two things:<\/p>\n<ul>\n<li>What scripts were running at that point in time, and which command(s) they were currently executing (to get an idea of progress).<\/li>\n<li>Who was running what processes\/scripts on the server.<\/li>\n<\/ul>\n<p>I was quickly able to view all running processes with ps, but getting the output I desired became more difficult. In the end I created functions for manipulating lists of IDs and iterating over them to get all the process ids which sat beneath each one.<\/p>\n<h1>Getting the Library<\/h1>\n<p>This script (and others to come) is hosted using github. If you&#8217;d like to pull a copy of the bash library from git (feel free). Install git, and then check out the whole library:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># I prefer to have this in the base of my home\r\ncd ~\/\r\n\r\n# Clone the repository (pulling everything down)\r\ngit clone https:\/\/github.com\/d-roman-halliday\/bash_library.git\r\n\r\n# Getting updates (when I add new stuff to it)\r\ncd ~\/bash_library\r\ngit pull<\/pre>\n<p>Or, if you just want the one script, copy it from github. Or see below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\"># Pull raw text using wget\r\nwget https:\/\/raw.githubusercontent.com\/d-roman-halliday\/bash_library\/master\/process_tree.bash<\/pre>\n<p>View the script on github:\u00a0<a href=\"https:\/\/github.com\/d-roman-halliday\/bash_library\/blob\/master\/process_tree.bash\" target=\"_blank\" rel=\"noopener\">process_tree.bash<\/a><\/p>\n<h1>Including the Library<\/h1>\n<p>To load a library into a session (so its functions can be called like applications) precede the library script reference with a dot:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">. ~\/bash_library\/process_tree.bash<\/pre>\n<p>Without doing this, the below examples won&#8217;t work. Note that a library can be included in another bash script, or for all sessions by adding it to the <code>bashrc<\/code> file.<\/p>\n<p>Note: I&#8217;ve prepended the functions in my library:<\/p>\n<ul>\n<li><code>bf<\/code> &#8211; Bash Function: A user facing bash function, prepended for clarity when using tab completion.<\/li>\n<li><code>hbf<\/code> &#8211; Helper Bash Function: Bash functions called by the user facing functions, with a different start to limit options for tab completion.<\/li>\n<\/ul>\n<h1>Script View<\/h1>\n<p>This shows all the running shell scripts and any processes beneath them.<\/p>\n<h2>Test scripts<\/h2>\n<p>The first script waits for 10 minutes. The second script calls the first multiple times in parallel (creating a collection of subtasks). The third calls the second multiple times (creating a lot of nesting).<\/p>\n<h3>test1.sh<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">#!\/bin\/bash\r\necho \" pid: $$\"\r\necho \"bpid: $BASHPID\"\r\n\r\nsleep 10m\r\n\r\necho \"done\"\r\nexit 0\r\n<\/pre>\n<h3>test2.sh<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">#!\/bin\/bash\r\n~\/test1.sh &amp;\r\n~\/test1.sh &amp;\r\n~\/test1.sh &amp;\r\n~\/test1.sh &amp;\r\n~\/test1.sh &amp;\r\n~\/test1.sh &amp;\r\nwait\r\nexit 0\r\n<\/pre>\n<h3>test3.sh<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">#!\/bin\/bash\r\n~\/test2.sh &amp;\r\n~\/test2.sh &amp;\r\n~\/test2.sh &amp;\r\nwait\r\nexit 0\r\n<\/pre>\n<h2>Sample Output<\/h2>\n<p>The command is on the first line, everything else is the output of the script. Showing (in this instance) one copy of test2.sh running (with 6 copies of script1.sh beneath it). And one instance of test3.sh running (with the respective script2.sh and script1.sh beneath that).<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-highlight=\"1\">david@roman-halliday:~$ bf_script_view\r\nUID        PID  PPID  C STIME TTY      STAT   TIME CMD\r\ndavid     8557 26864  0 16:38 pts\/2    S+     0:00 \/bin\/bash .\/test2.sh\r\ndavid     8558  8557  0 16:38 pts\/2    S+     0:00  \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8569  8558  0 16:38 pts\/2    S+     0:00  |   \\_ sleep 10m\r\ndavid     8559  8557  0 16:38 pts\/2    S+     0:00  \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8568  8559  0 16:38 pts\/2    S+     0:00  |   \\_ sleep 10m\r\ndavid     8560  8557  0 16:38 pts\/2    S+     0:00  \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8567  8560  0 16:38 pts\/2    S+     0:00  |   \\_ sleep 10m\r\ndavid     8561  8557  0 16:38 pts\/2    S+     0:00  \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8566  8561  0 16:38 pts\/2    S+     0:00  |   \\_ sleep 10m\r\ndavid     8562  8557  0 16:38 pts\/2    S+     0:00  \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8565  8562  0 16:38 pts\/2    S+     0:00  |   \\_ sleep 10m\r\ndavid     8563  8557  0 16:38 pts\/2    S+     0:00  \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8564  8563  0 16:38 pts\/2    S+     0:00      \\_ sleep 10m\r\nUID        PID  PPID  C STIME TTY      STAT   TIME CMD\r\ndavid     8570 26908  0 16:38 pts\/3    S+     0:00 \/bin\/bash .\/test3.sh\r\ndavid     8571  8570  0 16:38 pts\/3    S+     0:00  \\_ \/bin\/bash \/home\/david\/test2.sh\r\ndavid     8581  8571  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8601  8581  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8582  8571  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8596  8582  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8583  8571  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8598  8583  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8584  8571  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8608  8584  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8585  8571  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8599  8585  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8586  8571  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8604  8586  0 16:38 pts\/3    S+     0:00  |       \\_ sleep 10m\r\ndavid     8572  8570  0 16:38 pts\/3    S+     0:00  \\_ \/bin\/bash \/home\/david\/test2.sh\r\ndavid     8575  8572  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8609  8575  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8576  8572  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8595  8576  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8577  8572  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8593  8577  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8578  8572  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8594  8578  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8579  8572  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8597  8579  0 16:38 pts\/3    S+     0:00  |   |   \\_ sleep 10m\r\ndavid     8580  8572  0 16:38 pts\/3    S+     0:00  |   \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8603  8580  0 16:38 pts\/3    S+     0:00  |       \\_ sleep 10m\r\ndavid     8573  8570  0 16:38 pts\/3    S+     0:00  \\_ \/bin\/bash \/home\/david\/test2.sh\r\ndavid     8574  8573  0 16:38 pts\/3    S+     0:00      \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8592  8574  0 16:38 pts\/3    S+     0:00      |   \\_ sleep 10m\r\ndavid     8587  8573  0 16:38 pts\/3    S+     0:00      \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8607  8587  0 16:38 pts\/3    S+     0:00      |   \\_ sleep 10m\r\ndavid     8588  8573  0 16:38 pts\/3    S+     0:00      \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8600  8588  0 16:38 pts\/3    S+     0:00      |   \\_ sleep 10m\r\ndavid     8589  8573  0 16:38 pts\/3    S+     0:00      \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8606  8589  0 16:38 pts\/3    S+     0:00      |   \\_ sleep 10m\r\ndavid     8590  8573  0 16:38 pts\/3    S+     0:00      \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8605  8590  0 16:38 pts\/3    S+     0:00      |   \\_ sleep 10m\r\ndavid     8591  8573  0 16:38 pts\/3    S+     0:00      \\_ \/bin\/bash \/home\/david\/test1.sh\r\ndavid     8602  8591  0 16:38 pts\/3    S+     0:00          \\_ sleep 10m\r\n<\/pre>\n<h1>Session View<\/h1>\n<p>This shows all sessions (active or disconnected) on the server, and like with the shell scripts above it creates a tree of all the processes that each session is running.<\/p>\n<p>In the below example, we can see that:<\/p>\n<ol>\n<li>I have a physical (local) connection to the host, where I&#8217;m using mutt to look at emails.<\/li>\n<li>I have an idle ssh connection.<\/li>\n<li>I have two screen sessions (both idle), the second with two tabs running.<\/li>\n<\/ol>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-highlight=\"1\">david@roman-halliday:~$ bf_session_view\r\nUID        PID  PPID  C STIME TTY      STAT   TIME CMD\r\nroot      1671     1  0 Mar20 tty1     Ss     0:00 \/bin\/login --\r\ndavid    23310  1671  0 Apr10 tty1     S      0:00  \\_ -bash\r\ndavid    23342 23310  0 Apr10 tty1     S+     0:04      \\_ mutt\r\nUID        PID  PPID  C STIME TTY      STAT   TIME CMD\r\ndavid     4470  4399  0 12:35 ?        S      0:01 sshd: david@pts\/0\r\ndavid     4471  4470  0 12:35 pts\/0    Ss     0:01  \\_ -bash\r\nUID        PID  PPID  C STIME TTY      STAT   TIME CMD\r\ndavid     5959     1  0 15:48 ?        Ss     0:00 SCREEN\r\ndavid     5960  5959  0 15:48 pts\/5    Ss+    0:00  \\_ \/bin\/bash\r\nUID        PID  PPID  C STIME TTY      STAT   TIME CMD\r\ndavid    26780     1  0 Aug10 ?        Ss     0:00 SCREEN\r\ndavid    26864 26780  0 Aug10 pts\/2    Ss+    0:00  \\_ \/bin\/bash\r\ndavid    26908 26780  0 Aug10 pts\/3    Ss+    0:00  \\_ \/bin\/bash\r\n<\/pre>\n<p>Looking at those old screen sessions reminds me of the xkcd comic\u00a0<a href=\"https:\/\/xkcd.com\/686\/\">Admin Mourning<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When using bash, ps is a very powerful tool for viewing running processes. I have built a script\/library for manipulating its output to create trees for either running shell scripts, or user sessions. This allows me to see who is doing\/executing what on a linux host at a point in time. Continuing with some of&hellip;<\/p>\n<p class=\"read-more\"><a class=\"readmore-btn\" href=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/\">Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,21],"tags":[23],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-bash","category-linux","tag-bash-library"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>View running processes and their children - Rows Across The Lake<\/title>\n<meta name=\"description\" content=\"I have built a script\/library for manipulating its output to create trees for either running shell scripts, or user sessions. This allows me to see who is doing\/executing what on a linux host at a point in time.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"View running processes and their children - Rows Across The Lake\" \/>\n<meta property=\"og:description\" content=\"I have built a script\/library for manipulating its output to create trees for either running shell scripts, or user sessions. This allows me to see who is doing\/executing what on a linux host at a point in time.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/\" \/>\n<meta property=\"og:site_name\" content=\"Rows Across The Lake\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-27T18:00:35+00:00\" \/>\n<meta name=\"author\" content=\"david\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@d_roman_h\" \/>\n<meta name=\"twitter:site\" content=\"@d_roman_h\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"david\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/10\\\/27\\\/view-running-processes-and-their-children\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/10\\\/27\\\/view-running-processes-and-their-children\\\/\"},\"author\":{\"name\":\"david\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#\\\/schema\\\/person\\\/575f96d2590c3085923ff9e1b565748b\"},\"headline\":\"View running processes and their children\",\"datePublished\":\"2018-10-27T18:00:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/10\\\/27\\\/view-running-processes-and-their-children\\\/\"},\"wordCount\":530,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#\\\/schema\\\/person\\\/575f96d2590c3085923ff9e1b565748b\"},\"keywords\":[\"bash library\"],\"articleSection\":[\"bash\",\"Linux\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/10\\\/27\\\/view-running-processes-and-their-children\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/10\\\/27\\\/view-running-processes-and-their-children\\\/\",\"url\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/10\\\/27\\\/view-running-processes-and-their-children\\\/\",\"name\":\"View running processes and their children - Rows Across The Lake\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#website\"},\"datePublished\":\"2018-10-27T18:00:35+00:00\",\"description\":\"I have built a script\\\/library for manipulating its output to create trees for either running shell scripts, or user sessions. This allows me to see who is doing\\\/executing what on a linux host at a point in time.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/10\\\/27\\\/view-running-processes-and-their-children\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/10\\\/27\\\/view-running-processes-and-their-children\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/index.php\\\/2018\\\/10\\\/27\\\/view-running-processes-and-their-children\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"View running processes and their children\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#website\",\"url\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/\",\"name\":\"Rows Across The Lake\",\"description\":\"Data &amp; Databases\",\"publisher\":{\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#\\\/schema\\\/person\\\/575f96d2590c3085923ff9e1b565748b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/datablog.roman-halliday.com\\\/#\\\/schema\\\/person\\\/575f96d2590c3085923ff9e1b565748b\",\"name\":\"david\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g\",\"caption\":\"david\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"View running processes and their children - Rows Across The Lake","description":"I have built a script\/library for manipulating its output to create trees for either running shell scripts, or user sessions. This allows me to see who is doing\/executing what on a linux host at a point in time.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/","og_locale":"en_GB","og_type":"article","og_title":"View running processes and their children - Rows Across The Lake","og_description":"I have built a script\/library for manipulating its output to create trees for either running shell scripts, or user sessions. This allows me to see who is doing\/executing what on a linux host at a point in time.","og_url":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/","og_site_name":"Rows Across The Lake","article_published_time":"2018-10-27T18:00:35+00:00","author":"david","twitter_card":"summary_large_image","twitter_creator":"@d_roman_h","twitter_site":"@d_roman_h","twitter_misc":{"Written by":"david","Estimated reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/#article","isPartOf":{"@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/"},"author":{"name":"david","@id":"https:\/\/datablog.roman-halliday.com\/#\/schema\/person\/575f96d2590c3085923ff9e1b565748b"},"headline":"View running processes and their children","datePublished":"2018-10-27T18:00:35+00:00","mainEntityOfPage":{"@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/"},"wordCount":530,"commentCount":1,"publisher":{"@id":"https:\/\/datablog.roman-halliday.com\/#\/schema\/person\/575f96d2590c3085923ff9e1b565748b"},"keywords":["bash library"],"articleSection":["bash","Linux"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/","url":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/","name":"View running processes and their children - Rows Across The Lake","isPartOf":{"@id":"https:\/\/datablog.roman-halliday.com\/#website"},"datePublished":"2018-10-27T18:00:35+00:00","description":"I have built a script\/library for manipulating its output to create trees for either running shell scripts, or user sessions. This allows me to see who is doing\/executing what on a linux host at a point in time.","breadcrumb":{"@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/datablog.roman-halliday.com\/index.php\/2018\/10\/27\/view-running-processes-and-their-children\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/datablog.roman-halliday.com\/"},{"@type":"ListItem","position":2,"name":"View running processes and their children"}]},{"@type":"WebSite","@id":"https:\/\/datablog.roman-halliday.com\/#website","url":"https:\/\/datablog.roman-halliday.com\/","name":"Rows Across The Lake","description":"Data &amp; Databases","publisher":{"@id":"https:\/\/datablog.roman-halliday.com\/#\/schema\/person\/575f96d2590c3085923ff9e1b565748b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/datablog.roman-halliday.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/datablog.roman-halliday.com\/#\/schema\/person\/575f96d2590c3085923ff9e1b565748b","name":"david","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g","caption":"david"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/acddbc676a1d5c73795edcf0627ee39e5aa947da9033b58373e03d93122cb3b7?s=96&d=mm&r=g"}}]}},"_links":{"self":[{"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":4,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"predecessor-version":[{"id":235,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/posts\/207\/revisions\/235"}],"wp:attachment":[{"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/datablog.roman-halliday.com\/index.php\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}