LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-25-2005, 10:45 PM   #1
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Rep: Reputation: 30
Question Nicing an existing process?


Haven't done much with nice and I'm not sure if this can be done, if so I certainly can't seem to get the syntax right.

If I have an existing process with a PID of 3555

In top it has a priority of 25.

This is a bunzip2 command in my case on a 4 gig file so it's taking ages, and I want to speed it up.

tried things like

nice -n 13 3555
nice +13 3555

Thx
 
Old 07-25-2005, 10:51 PM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
u can look at the man page of nice to know more about nice

a proces with a nice value of 25 will execute slower then a process with a nice value of 20

so check out the man page for more
 
Old 07-25-2005, 10:57 PM   #3
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Original Poster
Rep: Reputation: 30
Yeah I read that, and also the info page, it all works fine when starting a program from scratch, but it doesn't answer whether I can nice an existing process.

Or is there maybe another way to change process priorities of an already running process?
 
Old 07-25-2005, 11:14 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
'man renice':
Code:
NAME
       renice - set nice values of running processes

SYNOPSIS
       renice -n increment [-g | -p | -u] ID ...
Though, if your system is mostly (otherwise) idle, changing priority will not gain much.
 
Old 07-25-2005, 11:26 PM   #5
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Original Poster
Rep: Reputation: 30
That did the trick, thanks for that!
 
Old 07-25-2005, 11:28 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
no problem. For future reference:
Code:
man -k nice
man -k priority
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 08:26 AM
how can i get the process id on exec a process antony_csf Linux - Software 1 06-17-2004 04:06 AM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 02:19 PM
problem with binding process and than execute another process chapa Programming 0 08-27-2003 04:47 AM
Dual boot "merge" from existing 98 & existing Linux atsmith Linux - Newbie 4 07-13-2003 04:46 PM


All times are GMT -5. The time now is 04:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration