12.2, Linux Job management, adjustment process priority

Source: Internet
Author: User
Tags traceroute command

1. Linux Job classification:

Front-end job: foreground, start with terminal, and always occupy terminal after startup

Background jobs: Background, can be launched through the terminal, but after the boot will be transferred to the background, release the terminal occupied

A job may contain multiple programs, or it can contain only one program.


2, the operation is transferred to the backstage method:

Jobs in operation: Ctrl + Z

Note: In the background, the job will be switched to a stop state

Jobs not yet running: Command &/Commands followed by a &, indicating that jobs are sent backstage

Note: Although this type of job is sent backstage, but he is still related to the terminal, if you want to send back to the background of the job to split the relationship with the terminal, the operation is as follows: #nohup Command &


3. View all jobs:

Jobs


4. Common commands for implementing job control:

#fg//Transfer the job from the background to the foreground

Usage: FG [[%]job_num]//job_num is job number,% can be omitted


#bg//Let the background stop job keep running

Usage: BG [[[%]job_num]//job_num is job number,% can be omitted


#kill//Terminate the specified job

Usage: BG%job_num//job_num is the job number,% can not be omitted, because kill's% removed means that the corresponding process is killed, not the job.



5, adjust the process priority: by adjusting the nice value, can only adjust the user's running process priority, user priority range: 100-139, the corresponding nice value is: -20,19; When the process starts, its nice value defaults to "0" and its priority is 120.


6. Nice command: Start and run the process with the specified nice value

Usage: nice [OPTION] [COMMAND [ARG] ...]

Such as:

#ps Axo Pid,comm,ni//Custom display content

#nice-N-5 htop//-n: Indicates its nice value

Note: Only the administrator can adjust the nice value down.



7. Renice Command: Manage the running process

Usage: Renice [-n] Priority [-GPU] identifier ...

such as: #renice-N-3 Htop


8. View nice values and priorities:

#ps Axo Pid,nice,priority,comm


9. Other commands:

SAR, Tsar, Iostat, Iftop, Nethog




10. Common network Client Tools: Ping, Lftp, FTP, Lftpget, wget,

ping command:

ping [-aabbddfhlnoqrruvv46] [-C Count] [-f Flowlabel] [-I interval] [-I interface] [-l preload] [-m mark] [-M Pmtudisc _option] [-nnodeinfo_option] [-W deadline] [-w timeout] [-p pattern] [-Q TOS] [-S packetsize] [-S sndbuf] [-t TTL] [-t timestamp option] [Hop ...] destination


Hping: Available during stress testing.


Traceroute command: Tracks the gateway that passes from the source host to the target host.


FTP command: FTP service command-line client tool


LFTP command: Used to replace the earlier FTP command

LFTP [-d] [-e cmd] [-P port] [-u User[,pass]] [site]

Lftp-f Script_file

Lftp-c commands

Lftp--version

Lftp--help


Lftpget command: Do not login FTP server, automatically go to download, followed by URL

Lftpget [-c] [-d] [-v] url [url ...]

-C: Breakpoint continued to pass

Example: Lftpget https://192.168.1.1/ks.cfg


wget command: Download tool, non-interactive

wget [option] ... [URL] ...

Option

-B: Perform the download operation in the background, using the generic in the script

-Q: Silent download

-o file: Where to save the download file

-C: Breakpoint continued to pass

--limit-rate=amount: Transferring files in the specified speed record

12.2, Linux Job management, adjustment process priority

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.