In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the usage of the Linux basic command renice". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the usage of the Linux basic command renice".
Renice
The renice instruction can re-adjust the priority of the program to run, and the priority can be modified through process id, user id, and group id. Modify the level of the group to affect all process priorities of all users in the group; modify the user level to affect all process priorities of that user. Except for superusers, other users can only change the priority of the processes they have, and can only monotonously increase their "nice value" in the range of 0 to PRIO_MAX (20). This prevents it from being above administrative regulations.) The superuser can change the priority of any process and set the priority to PRIO_MIN (- 20) ~ PRIO_MAX.
The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
1. Grammar
Renice-n N-u username
Renice-n N-g gid
Renice-n N-p pid
2. List of options
Option
Description
-h |-- help
Show help documentation
-v |-- version
Show command version
-n |-- priority
Priority
-u |-- user=name
Set the priority of the specified user
-g |-- pgrp=gid
Set the priority of the group
-p |-- pid=PID
Sets the priority of the specified process
3. Examples
1) modify instruction wc priority through pid
[root@localhost ~] # ps-ao "% p%y%x%c%n" / / View process priority
PID TTY TIME COMMAND NI
8321 pts/0 00:00:00 wc 19
8451 pts/0 00:00:00 ps 0
[root@localhost ~] # renice-n 15-p 8364 / / reset the priority of the wc process to 15
8364: old priority 19, new priority 15
2) modify the priority of user root
[root@localhost ~] # renice-n 0-u root / / modify the priority of the user root is
0: old priority-11, new priority 0
[root@localhost ~] # ps-ao "% p%y%x%c%n" / / View the priority of the process. All the current processes belong to root users, and the priority is
PID TTY TIME COMMAND NI
8321 pts/0 00:00:00 wc 0
8364 pts/0 00:00:00 wc 0
8458 pts/0 00:00:00 ps 0
Thank you for your reading, the above is the content of "the usage of the Linux basic command renice". After the study of this article, I believe you have a deeper understanding of the usage of the Linux basic command renice, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.