O'Reilly logo

Linux Shell Scripting Cookbook by Sarath Lakshman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Gathering information about processes

Processes are the running instance of a program. Several processes run on a computer and each process is assigned a unique identification number called a process ID. It is an integer. Multiple instances of the same program with the same name can be executed at a time. But they all will have different process IDs. A process consists of several attributes, such as which user owns the process, the amount of memory used by the program, the amount of CPU used by the program, and so on. This recipe will go through how to gather information about processes.

Getting ready

Important commands related to process management are top, ps, and pgrep . Let's see how we can gather information about processes.

How to do it... ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required