- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Changing the priority of process with nice
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2008 08:11 AM
06-20-2008 08:11 AM
Currently my process is running with PID 27556. I want this process to run at highest priority.
How can I change the priority of this process to run at highest priority.
Also, how can I check the existing priority of the process.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2008 08:24 AM
06-20-2008 08:24 AM
Re: Changing the priority of process with nice
A negative value requires superuser privileges, and assigns a lower system nice value (higher priority) to command.
To see existing priority, run "ps -l"
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2008 08:24 AM
06-20-2008 08:24 AM
Solutionps -el | grep 27556
You must be root to set the nice value less than what it's currently running at. See the renice man page. Nice value can range from 0 to 39 so, assuming you're root and the process is running with nice value of 20 (the default), the following would change it to the highest priority (lowest nice value):
renice -n -20 27556
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2008 08:41 AM
06-20-2008 08:41 AM
Re: Changing the priority of process with nice
Also, priority affects CPU usage and will virtually no effect if your program is accessing the disk a lot. The only way to improve a program that needs a lot of disk I/O is to add a new disk onto another I/O card and move all the data to the new disk.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2008 09:52 AM
06-20-2008 09:52 AM
Re: Changing the priority of process with nice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2008 10:06 AM
06-20-2008 10:06 AM
Re: Changing the priority of process with nice
(users can only lower their priority).
The priority is controlled by the system and depends on the nice value, duration, cpu usage, .... You can only influence this by reniceing the process or with rtprio.
first check with ps commands to determine the nice numbers under NI column
#ps -efl|cut -c 1-37,101-150
then ise renice value for the running processes
#renice -n