Process management of Linux data consolidation

Source: Internet
Author: User
Tags set time

Blog:http://lijinhuan.blog.51cto.com/

Weibo:http://weibo.com/lijinhuanexperience

: Xiaoleetongxue


First, the system operating level

1. runlevel display operation level

[Email protected]:~$ runlevel

N 2

2, Change the system operating level through the init command, such as init 0 means shutdown,init 6 means reboot. The digital 0-6 means the following:

(1) 0 , stop

(2)1 , Single-user mode for root- to-system maintenance

(3)2 , Multi-user mode, NFS not available in this mode

(4)3 , full multi-user mode, when the host is used as a server, run the mode more ,

(5)4 , not assigned use

(6)5 , Multi-user mode for graphical login

(7)6 , restart

3. View the startup status of the service

Chkconfig–list

Second, the system script

1, rc.sysinit

Bash scripts that are saved in the/ETC/RC.D directory are called at system startup to complete the initialization work

2, after the system starts and initializes the script will execute a /ect/rc.local script, we can write the system needs to customize the execution of the script inside

III. Procedures and processes

1, The program is a static save code

2, The process is the code in the processor run, is a dynamic concept

3 . View the process commands

(1)PS command to display information about the status of a system process at a certain point

such as:ps–ef ;PS aux

Details:http://blog.csdn.net/ghosc/article/details/7008861

(2)top command to view dynamic changes in the process

Detailed Description:http://www.cnblogs.com/sbaicl/articles/2752068.html

(3)Pstree toshow the parent-child relationship between the system processes in the form of a tree

4. How to start the process

(1) direct execution by user input command

(2) add & sign to background execution after command

(3) use at set time, single execution

(4) using timed tasks crontab timed execution

5. Change the way the process runs

(1) use Ctrl + Z to transfer the current terminal execution program into the background

(2)jobs command to view all the programs executed in the background in the current terminal

(3)FG will be transferred backstage to the foreground terminal to execute

6. Terminate Process Operation

(1)Ctrl + C Force terminate the command executed by the current terminal

(2)kill command kills, such as kill-9 2501

Details:http://linux.chinaunix.net/techdoc/system/2007/08/05/964569.shtml

Four, timed task cron Service

1. start and stop

(1) Query service status

[Email protected]:~ $service cron Status

Cron Start/running,process 1131

(2) stop cron service

[Email protected]:~$ sudo service cron stop

[sudo] password for a386396:

Cron stop/waiting

(3) start sudo service cron start

(4) restart sudo service cron restart

(5) view cron service boot status chkconfig–list crond

2. Format Description

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/52/65/wKiom1RkWd3BJntQAAIuqc-7uC8291.jpg "title=" Qq20141113145700.png "alt=" Wkiom1rkwd3bjntqaaiuqc-7uc8291.jpg "/>

3. use crontab to set up

(1) View the user's cron task corntab–l

(2) Edit user cron task corntab or crontab–e

(3) Delete user's existing cron,crontab–r

4. all crontab created tasks are saved in the/var/spool/cron file

5. cron configuration files and directories

(1)the tasks required for Linux system maintenance are set up in the/etc/crontab file , and generally do not need to be modified

(2) in the/etc Directory is cron.hourly and other directories are required to execute the script in a timed


Process management of Linux data consolidation

Related Article

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.