lab4 Process
  • Introduction
  • Knowing about process
    • Checking System Process
    • Process Identification
  • Let's Fork! Process Creation
    • Background of Process Creation
    • fork system call
    • Distinguish Parent and Child Process
    • Exercises
  • Process Execution
    • First exec example
    • Environment Variables
    • exec Family
    • exec Family: execlp
    • exec Family: execle
    • exec Family: execv
    • exec Family: execvp
    • exec Family: execve
    • exec error handling
  • Wait!
    • Problem 1: Without Wait?
    • Sleep
    • Problem 2: Zombies!
    • Wait System Call
    • waitpid
Powered by GitBook
On this page
  • top
  • ps

Was this helpful?

  1. Knowing about process

Checking System Process

PreviousKnowing about processNextProcess Identification

Last updated 5 years ago

Was this helpful?

To view a list of process in the system, we can use a handy command top or ps

For Details, please refer to Lab 2.

top

In the terminal, type

$ top

Thetop program will show the current processes live, just like the Windows task manager :0).

Consult man page for more options.

ps

Another handy tool for checking the processes. In the terminal, we use

$ ps

This will show the current processes created by the user in this terminal. Of course, this is not quite useful. We can view all the processes in the system by:

$ ps aux

The command is followed by an argument, aux

Argument

Description

a

Shows processes from all users

u

Displays the owner of the process

x

Also shows the processes other than the terminal

For more information, you are welcome to look at the man page.