Skip to Main Content
Expert Shell Scripting
book

Expert Shell Scripting

by Ron Peters
December 2008
Intermediate to advanced content levelIntermediate to advanced
320 pages
6h 45m
English
Apress
Content preview from Expert Shell Scripting

CHAPTER 8Shell Process Tree

The process-tree script presented in this chapter does exactly what its name suggests: it prints out the names of some or all of the currently running processes that are present in the process table, displaying the parent/child relationships that exist among them in the form of a visual tree. There is an implementation of this functionality on some versions of Solaris (ptree) and on all flavors of Linux (pstree). These have proved very valuable to me for finding the root of a process group quickly, especially when that part of the process tree needs to be shut down.

There are some UNIX-based operating systems that don't have this functionality, such as HP-UX; hence the reason for this script. Along the way, this script ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Robust Shell Scripting

Robust Shell Scripting

Arnold Robbins
Hacker Techniques, Tools, and Incident Handling

Hacker Techniques, Tools, and Incident Handling

Sean-Philip Oriyano, Michael Gregg

Publisher Resources

ISBN: 9781430218418Purchase book