Control over process and system services (chapter seven or eight), this chapter does not specify the top command

Source: Internet
Author: User



Unit seventh-about the process

1. Process definition

Process is the work that the CPU does not complete

2. Status of the process

Run (running) hibernate (sleeping) Stop (stopped) to continue to end the zombie process (zombie)

3. How to view processes in a drawing

Gnome-system-monitor

4. How to view processes with commands

PS A/* All processes about the current environment

X/* All processes unrelated to the current environment

F/* Show process dependencies

E/* Displays all processes in the current user environment

L/* Long list shows details of the process

U/* Displays user information for the process

PS aux |grep process keyword

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/88/AD/wKiom1f_Ft-zinWwAAJL4JJJR44024.png "title=" 10.13.2.PNG "Width=" height= "139" border= "0" hspace= "0" vspace= "0" style= "WIDTH:500PX;HEIGHT:139PX;" alt= "wkiom1f _ft-zinwwaajl4jjjr44024.png "/>

PS Ax-o%cpu,%mem,user,group,comm,nice/* Specify some information to display the process

%cpu / * show process CPU load

%mem /* Show process memory load

User/* Process users

Group/* Process Group

Comm /* Process name

Nice /* Process priority

PS Ax-o%cpu,comm--sort< +|-%cpu><+|%mem>/* by Process information order

+/* Positive order

-/* Reverse

%CPU/*CPU Load Sequencing

%MEM/* Memory load

5. Process priority

1) Priority level

-20~19

2) Priority view

PS Ax-o Pid,nice,comm

3. Specify a priority to open the process

Nice-n Priority number Process name

Nice-n-5 Vim &/* Turn on VIM and assign program priority to -5*/

4) Change Process priority

Renice-n Priority Digital Process PID

Renice-n-5 1806/* Change 1806 process priority to -5*/

PS A-o Pid,nice,comm

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/88/AA/wKiom1f-5EOh00v9AACc_fIBizk706.png "title=" 10.13.1.PNG "width=" height= "214" border= "0" hspace= "0" vspace= "0" style= "width:500px;height:214px;" alt= " Wkiom1f-5eoh00v9aacc_fibizk706.png "/>

6. Front and back calls to processes in the environment

Jobs/* View the process of being driven back into the environment

CTRL +/* Take the process of taking the terminal into the background

FG/* Back the background process to the foreground ( no object, + as the top priority,-secondary priority, empty for processing)

BG/* Run the background paused process

Comm &/* Run the command directly in the background

7. Signal of the process

1) commonly used signal class

1/* Process reload configuration (reload) (Shell cannot reload configuration)

2/* Delete process in-memory data =ctrl+c

3/* Remove data from mouse in memory

9/* Forcibly ending a single process

15/* Normal shutdown process

18/* Run a paused process

19/* Pause a process

20/* Push the process into the background =ctrl+z

Man 7 signal/* View signal details

2) Signal Initiation

Kill-Signal Process PID

Killall-Signal Process name

Pkill-u Student-Signal/* Close a user-owned process

For the Sigkill signal, the process cannot be ignored, which is a "I don't care what you do, stop immediately" signal. If you send a sigkill signal to the process, Linux will stop the process where

8. User Monitoring System

w/* View users currently using the system

W-F/* View current users of the system and show where they are used

Last/* View users who have logged on to the system

LASTB/* View attempt to log in when no successful user

9.top Command/* Monitor system Load tool ( The top command will be described in detail after the virtual machine is detailed )

u specifies that the user process is displayed

K-Process

H help command

s set Refresh time interval

M Show or hide memory status information

C Show full command

.............

Unit eighth-Control of system services


1. What is a service?

Service

Service is the software running in the system, this software is mainly to provide a function, then we call this kind of software service

1) systemd

System initialization program, the first process that the system starts, the PID is 1

2) SYSTEMCTL command (service management)

Systemctl list-unite/* Lists the service status of the current system

Systemctl list-unit-files/* Lists the service boot status

SYSTEMCTL Status sshd/* View the state of the specified service

Systemctl Stop sshd/* To turn off the status of the specified service

Systemctl Start sshd/* Turn on the status of the specified service

Systemctl Enable SSHD/* Set the specified service to start

Systemctl Disable SSHD/* Set specified service power off

Systemctl Reload sshd/* Causes the specified service to reload the configuration

Systemctl List-dependencice sshd/* View the dependencies for the specified service

Systemctl Mask sshd/* Freezes the specified service

Systemctl unmask sshd/* Enable service

Systemctl Restart sshd/* Restart Service

Set-default mutui-user.target/* Boot not boot graphics

Set-default graphical.target/* Boot up graphics

3) Service Status

Systemctl Status Service Name

There are several states:

Loaded/* System service has been initialized to complete, plus configuration

Active (running)/* service is being exploited by the system

The active (exited)/* Service has been loaded and waiting to be exploited by the system

Active (Waiting)/* Service waits to be processed by the system

Inactive/* Service off

Enabled/* Services boot up

Disabled/* Service does not boot from startup

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/88/AE/wKiom1f_I5vA1Nr6AAU-Q0UH3ZA005.png "title=" 10.13.4.PNG "width=" height= "208" border= "0" hspace= "0" vspace= "0" style= "width:300px;height:208px;" alt= "wkiom1f _i5va1nr6aau-q0uh3za005.png "/>

Control over process and system services (chapter seven or eight), this chapter does not specify the top command

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.