Take notes on Linux private food from laruence (12) -- system monitoring 2

Source: Internet
Author: User
4. Control process kill: syntax kill [-signal] PID sends a specific signal to the process. The default value is 15 (final) kill-l: list all signals that can be passed by kill 1: restart process 2: relative to ctrl & amp; 43; c

4. Process control

Kill: The syntax kill [-signal] PID sends a specific signal to the process. The default value is 15 (termination)

Kill-l: lists all signals that can be passed by kill.

1: restart the process

2: relative to ctrl + c

9: Force process termination

Killall can be followed by the process name

5. process priority

Process Priority, expressed by nice value

Nice: run the command with a different nice value

The default nice value of a process is 0. the value range is-20 ~ 19. Generally, you can only set 0 ~ 19, while the root user can range from-20 to 19, the smaller the value, the higher the priority

Nice-n num command

Renice: change the nice value of a running process.

Renice-n pid

Directly press the keyboard r in top and the following will appear. after entering the PID and press enter, the input process level can also be changed.

VI. foreground and background

By default, after a command is executed, the command excludes the shell and rejects other input. We call it a foreground process. The opposite is called a background process.

Multiple background processes are allowed for each console.

The control and scheduling of foreground and background processes are called task control.

7. drop the process into the background

Command &: directly drop a process into the background for running.

Nohup command &: drop a process directly into the background for running, and the process will not be hung up after exiting the console.

Ctrl + z: pause a running foreground process and drop it into the background.

8. work

Jobs: list the current background processes of the system.

Fg: pull the background process back to the foreground

Bg: activates a paused process in the background.

9./proc directory

The/proc directory is a virtual file system that contains information from the running core.

Users can obtain system information through files in cat/proc /.

This information includes system hardware, network settings, memory usage, and other things.

Files in the/proc/sys directory can be changed by the system administrator. these changes will directly affect the current core.

/Proc/startup information of the cmdline system

/Proc/cpuinfo cpu information

/Proc/devices system device information

/Proc/filesystem

/Proc/iterrupts

......

All processes in the system use the process PID number as the directory name in the/proc/directory.

Note: Do not read kcore files.

10. system logs

System logs record information in system operation

When a service or system fault occurs, you can query the system logs to help us diagnose the fault.

System logs can warn of security issues

System logs are generally stored in the/var/log directory.

11. common system logs

Cat/var/log/dmsg or dmsg

Core startup log

/Var/log/messages

System error log

/Var/log/maillog

Email System Log

/Var/log/xferlog

FTP service logs

/Var/log/secure

Security Information, system logon and network connection information

/Var/log/wtmp

Logon records

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.