Linux process priority

Source: Internet
Author: User
Linux process priority 1. how to query the PID and PRI value of the crond program [root @ localhost ~] # Ps-lfCcrondFSUIDPIDPPIDCPRINIADDRSZWCHANSTIMETTYTIMECMD1Sroot384710780...
Linux process priority 1. how to query the PID and PRI value of the crond program [root @ localhost ~] # Ps-lfC crondF s uid pid ppid c pri ni addr sz wchan stime tty time CMD1 S root 3847 1 0 78 0-1621? 00:00:00 crond [root @ localhost ~] # Run www.2cto.com to check that the crond PID is 3847 and the PRI value is 78. 2. how to modify the priority of the crond PID for a process: PRI (NEW) = PRI (OLD) + NICE for the priority of the started process can be modified using the renice command: [root @ localhost ~] # Ps-lfC crondF s uid pid ppid c pri ni addr sz wchan stime tty time CMD1 S root 3847 1 0 78 0-1621? 00:00:00 crond [root @ localhost ~] # Renice 5 38473847: old priority 0, new priority 5 [root @ localhost ~] # Ps-lfC crondF s uid pid ppid c pri ni addr sz wchan stime tty time CMD1 S root 3847 1 0 83 5-1621? 00:00:00 crond [root @ localhost ~] # Www.2cto.com 3. how do I know if my nic is identified during startup? Dmesg | grep 'eth '. the dmesg command displays the boot hardware and then captures the eth keyword. you can see eth0: regist as pci is similar. 4. Can a general user adjust the nice value of a program that does not belong to me? If a common user adjusts his or her priority to 10, can he or she adjust his or her priority to 5? The renice command allows you to modify the priority of a running process. The renice command can be used to adjust its priority when executing the command. The format is as follows: $ renice-number PID. the parameter number has the same meaning as the number of the nice command. Note: (1) you can only use the renice command for all your processes. (2) the root user can use the renice command on any process. (3) only the root user can improve the priority of the process. Therefore, you cannot adjust the nice value of your program. If a common user adjusts his or her priority to 10, the user cannot call him or her back to 5, because only the root user can improve the priority of the process.
 

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.