Linux Seventh Lesson
& Start a process in the background
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8D/E4/wKiom1iuP9-jjHiQAAAuimaSQLM021.jpg-wh_500x0-wm_ 3-wmp_4-s_843901417.jpg "title=" 20.jpg "alt=" Wkiom1iup9-jjhiqaaauimasqlm021.jpg-wh_50 "/>
Jobs view the background process in the current console, running is in the running state stopped the pending process is in the stopped state
The PRI represents the priority of the process, which is calculated dynamically by the operating system and is the priority of the actual process;
NI represents the request process execution priority, which can be set by the process owner or the superuser, affecting the actual process priority.
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8D/E1/wKioL1iuQ0HBHdVwAABI-X2834k329.jpg-wh_500x0-wm_ 3-wmp_4-s_3250809170.jpg "title=" 22.jpg "alt=" Wkiol1iuq0hbhdvwaabi-x2834k329.jpg-wh_50 "/>
nice-16./a.sh change the priority of the a.sh is the range of NI values from 20 to 19,-20 representing the highest NI priority, and 19 for the lowest NI priority. The default Auto setting NI value is 10.
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8D/E4/wKiom1iuRy2R2782AABN_twzqug336.jpg-wh_500x0-wm_ 3-wmp_4-s_198103941.jpg "title=" 23.jpg "alt=" Wkiom1iury2r2782aabn_twzqug336.jpg-wh_50 "/>
The renice-9 p 10727 process executes when it changes its NI value, PID, or process owner name to specify the process.
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8D/E4/wKiom1iuSAbQJ_xuAACToFMoTMY500.jpg-wh_500x0-wm_ 3-wmp_4-s_375918059.jpg "title=" 24.jpg "alt=" Wkiom1iusabqj_xuaactofmotmy500.jpg-wh_50 "/>
A process is temporarily suspended using CTRL + Z, and the suspended process is put into the background and paused. The FG command is returned to the foreground by the suspended process, and the BG command resumes the suspended process and causes it to run in the background.
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/8D/E4/wKiom1iuSsXj5kr8AAApHLQPjfw670.jpg-wh_500x0-wm_ 3-wmp_4-s_4014629574.jpg "title=" 25.jpg "alt=" Wkiom1iussxj5kr8aaaphlqpjfw670.jpg-wh_50 "/>
CTRL + C kill PID killall PID termination process
kill-9 PID killall-9 pid forced termination process
Top-c
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8D/E5/wKiom1iuUNuT9qy3AAFpl3VXNWA944.jpg-wh_500x0-wm_ 3-wmp_4-s_1845461988.jpg "title=" 27.jpg "alt=" Wkiom1iuunut9qy3aafpl3vxnwa944.jpg-wh_50 "/>
PID Process PID Number
User Process Owner
PR Process Priority
NI Process Priority Value
VIRT process uses virtual memory size
The size of the RES process resident memory
The size of the SHR process using shared memory
s process state, S sleep d non-interruptible sleep state R run Z Zombie T stop eye or track
Top press U to monitor specific users press "M" to sort in memory by "C" Sort by CPU by "T" in chronological order
PS-EF View all process details e show all processes F full format
Ps-aux A shows all processes on the terminal, including the process of all currently logged-in users, and U shows the owner of the process and other details
X shows no control of the terminal process
Ps-r R shows the running process
The value of TTY is "?" Indicates that the process does not occupy the terminal
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8D/E5/wKiom1iuVj2RdrbsAAI6ZQhNLoA580.jpg-wh_500x0-wm_ 3-wmp_4-s_257741814.jpg "title=" 28.jpg "alt=" Wkiom1iuvj2rdrbsaai6zqhnloa580.jpg-wh_50 "/>
At: Scheduled execution of one-time scheduled tasks
Crontab: Daily scheduled Task schedule execution
Usage examples:
1. One day after the 5 o'clock in the afternoon execution/opt/a.sh
#:at 5pm+1 Days
at>/opt/a.sh
At> Press Ctrl+d
2. Tomorrow 17 o'clock, output time to the specified file
#:at 17:00 tomorrow
At>date >/tmp/2016.log
At> Press Ctrl+d
3. Use ATQ to view work tasks that the system does not perform
#:atq
Linux Command Detail Chenghou (at)
4. Delete a task that has already been set
#:atq
#atrm Task number
#atq
5. Display the content of the task that has been set
#:at-c Task number
ATD Set Boot up:
#:chkconfig ATD on #当前用户
#chkconfig--level 2345 ATD on #修改服务器的默认启动等级
/etc/at.allow and/etc/at.deny
To limit the use of at, which works as follows:
Find/etc/at.allow First, the user who writes this file can use, not in this file is not used (even if not written in/etc/at.deny)
If no/etc/at.allow is present, look for the/etc/at.deny file, the user written in this file cannot be used, but not the user in this file, you can use
If two files do not exist, then only root can use the AT command.
In general the case. Allow is more tightly managed, and deny is loosely
Generally, after the completion of the chapter, the system usually retains an empty/etc/at/deny file, which is allowed to be used by everyone, and if you do not want someone to use it, simply jump the user's account into the/etc/at.deny. Note: one account line
This article is from the "2722951" blog, please be sure to keep this source http://2732951.blog.51cto.com/2722951/1900502
Linux Seventh Lesson