Monitoring and managing Linux Processes

Source: Internet
Author: User

Overview
Goal To evaluate and control processes running on a LUnix system
Objectives
  • List and interpret basic information about processes running on the system
  • Control processes in the shell? Session using Bash Job control
  • Terminate and control porcesses using Singnals
  • Moniror Resource usage and system load due to process activity
Sections
  • Processes
  • Controlling Jobs
  • Killing Processes
  • Monitoring Process Activity
Lab Monitoring and managing Linux Process

Section 1:process

What is process?

A process is a running instance of a launched, executable program. A process consists of:

    • An address space of allocated memory,
    • Secuirty properties including ownership credentials and privileges
    • One or more execution threads of program code, and
    • The process state.

An existing (Parent) process duplicates it own address space (fork) to the Create a new (child) process structure. Every new process is assigned a unique process ID (PID) for tracking and security. The PID and the parents? Process ID (PPID) is elements of the new process enviroment. All processes is descendants of the first system process, systemd.

Linux Process states
Name Flag kernel-defined State Name and description
Running R Task_running:the process is either executing on a CPU or waiting to run. Process can be executing user routines or kernel routines (system calls), or is queued and ready while in the Running (or Run nable) state.
Sleeping S Task_interruptible:
D Task_uninterruptible
K Task_killable
Stopped T task_stopped
T Task_tracked
Zombie Z Exit_zombie
X Exit_dead

Listing processes

The PS command is used to listing current processes. The command can provide detailed process infomation, include:

    • The UID which determines process privileges
    • Pid
    • The CPU and real time already expended
    • How much memory the process have allocated in various locations
    • The location of process STDOUT, known as the controlling terminal, and
    • The current process state

Note:the Linux version of PS supports three option formats, including:

    • UNIX (POSIX) options
    • BSD Options
    • GNU Long Options

For example, Ps-aux not the same as PS aux

Monitoring and managing Linux Processes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.