RHCE-certified RHEL6 process management, Cron Task Plan, and startup troubleshooting

Source: Internet
Author: User
1. Process Management 1. ps view process commands (generally use the following two combined options) ps-aux: displays all process information in the system ps-elf: all process details in the system will be displayed in long format: USER: the name of the USER account that starts the process PID: Process number, which is unique in the current system TTY: which terminal is the process running ,? Unknown or no terminal is required. STAT: the current state of the process, for example, S (sleep), R (run), and Z (dead ).

I. Process Management

1. Run the ps command to view the process (the following two options are generally used)

Ps-aux: displays all process information in the system.

Ps-elf: displays all process details in long format

 

USER: name of the USER account that starts the process

PID: process ID, which is unique in the current system

TTY: indicates the terminal on which the process runs ,? Unknown or no terminal is required.

STAT: the current state of the process, such as S (sleep), R (run), Z (dead), <(high priority), N (low priority), s (parent process), + (foreground process), should be manually terminated for zombie Process

START: the time when the process was started.

TIME: cpu time occupied by the Process

COMMAND: name of the COMMAND to start the process

% CPU: CPU usage percentage

% MEM: memory usage percentage

VSZ: the size of the virtual memory (swap) occupied

 

RSS: physical memory usage

2. qgrep queries the process by program name

Qgrep-l httpd

-L: list the program name and process ID-o: ID of the START process

-N: ID of the process to terminate

3. top View process resource usage

The top page displays the status information of the process in the form of Dynamic Refresh. By default, the process is refreshed once every 3 seconds. The shortcut keys on the page are as follows:

H: get help

P: sort the process list based on CPU usage

M: sort by memory usage

N: sort by startup time

K: Press k and enter the process number to kill a process.

Q: Exit

4. Other analysis commands

Df-h: Command to view disk space usage;

Iostat: view disk I/O usage;

Vmstat: View switch usage;

5. Different startup methods of processes

Foreground startup: the user enters the command and runs the program directly.

Start in the background: add the "&" symbol at the end of the command line

Bg: activates a suspended process in the background.

Jobs: view the task list in the background

Fg: restores the background process to the foreground. You must specify the task sequence number.

Ctrl + Z combination key: suspends the current process, that is, it is transferred to the background and stops execution

Terminate a process

Ctrl + C: interrupt the command being executed

Kill: Used to terminate the process with the specified PID.

Killall: Used to terminate all processes with the specified name. The-9 option is used to force terminate.

Pkill command: Terminate the corresponding process according to specific conditions

Common options:

-U: Terminate the process based on the user name of the process;

-T: Terminate the process based on the terminal where the process is located;

For more details, please continue reading the next page highlights: http://www.linuxidc.com/Linux/2013-10/91771p2.htm

Related reading:

Use crontab in Linux to create a scheduled task http://www.linuxidc.com//Linux/2013-06/86401.htm

Crontab routine work http://www.linuxidc.com//Linux/2013-06/85441.htm in Linux

Linux crontab does not execute troubleshooting http://www.linuxidc.com//Linux/2013-06/85432.htm

Ubuntu timing task http://www.linuxidc.com//Linux/2013-05/84770.htm with crontab

At batch crontab anacron http://www.linuxidc.com//Linux/2013-03/81584.htm

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.