Monitor processes using ps

Keyboard Shortcuts

Linux systems can have hundreds of processes. You can view these with the ps command. The ps command has a ton of options but for this video we focus on Unix and GNU options. These options will allow you to get a lot of information about our system processes.

- [Instructor] A Linux system may have hundreds of processes…running at any time.…The first tool we'll look at to monitor processes…is the ps command.…In a terminal, type in ps and hit Enter.…By default, ps only shows the processes…run by the user executing it.…It shows the process ID,…the terminal that was run on,…the aggregated execution time,…and the command that was run.…Oddly, the ps command has three different types…of syntax options: Unix, BSD, and GNU.…

The Unix options looks as you'd expect…with a dash before a single letter.…The GNU options are words with two dashes…just like other commands.…The odd ones are the BSD options…which don't have any dashes at all.…For this course,…we'll focus on the Unix and GNU options.…To get ps to display every process,…we'll want to use the -e option.…Type in "ps -e" and hit Enter.…This still shows the same columns as ps with no options,…but shows every process.…

To give us an idea of…which processes start at other processes,…we can pass the Hierarchy option, or -H.…Type in "ps -eH".…

Resume Transcript Auto-Scroll

Author

Released

5/1/2017

In this course, gain a more thorough understanding of the shell and system processes to help you work faster and more efficiently in Linux. Follow computer science instructor and Linux enthusiast Grant McWilliams as he dives into Linux shells and their environments, and explains how to customize your shell. He discusses using the Bash shell, and covers topics like command and variable substitution. Grant also explains how to stack simpler commands together using named and unnamed pipes and redirects; discusses how to start, pause, and end processes; shows how to schedule one-time jobs and recurring jobs; and covers complex system services.