LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 08-13-2010, 04:20 PM   #1
jaypas
LQ Newbie
 
Registered: Jul 2010
Posts: 21

Rep: Reputation: 1
Nice Value of a Process


Hi, All,
What is the command to display the nice value of a process?
Thanks,
August
 
Old 08-13-2010, 10:09 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,349
Blog Entries: 28

Rep: Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146Reputation: 6146
ps -axl

It will be in the "NI" column.

Reference.
 
Old 08-13-2010, 10:19 PM   #3
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
Try the following command:
Code:
ps -eo pid,user,nice,command | grep <process_name>
You can also see it at 'NI' column in 'top' command.

Last edited by quanta; 08-14-2010 at 08:16 AM.
 
Old 08-14-2010, 06:14 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
The answers have been already given, but please remember that per the LQ Rules, you shouldn't post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.
 
Old 08-14-2010, 07:15 AM   #5
jaypas
LQ Newbie
 
Registered: Jul 2010
Posts: 21

Original Poster
Rep: Reputation: 1
Not Homework

Hi, Mara,
I appreciate all the help I get from Linux Questions. I assure you that these are not homework questions. I'm kind of in panic mode. I knew that I could display the nice value of a process using ps, but I just could not remember the options I needed to use. I tried googling, and sifting through the man pages, etc. But you know, sometimes when I'm in panic mode, I miss info which is right in front of me. Asking people that I work with is a total waste of time. So, again, I appreciate all the help I can get from you guys.
Thanks,
Jaypas
 
Old 05-02-2017, 03:00 AM   #6
mks89
LQ Newbie
 
Registered: May 2017
Posts: 1

Rep: Reputation: Disabled
Smile command to get priority of a process

The Linux command to get the priority of a process is ps -l
 
Old 05-02-2017, 04:15 AM   #7
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
If it is a process hitting the server, you can always use top, since top allows you to change the nice values on the fly too using "r :Renice-a-Task".
 
Old 05-02-2017, 06:45 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by mks89 View Post
The Linux command to get the priority of a process is ps -l
Hi mks89,

Just be aware of the age of a thread. Not all threads are marked closed, or solved. There are very many which are just left open. But if you notice, the last post prior to yours was in 2010. Therefore it is unlikely that this may be of any help, especially given the flow of the thread from that time frame. No big deal, but just to make you aware for when you browse through threads and consider offering help. We'd rather you do look to provide help versus not.

Best Regards.
 
Old 05-02-2017, 03:26 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,673
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
When you are consulting threads that are "this old," it is very important to realize that many "deep changes" to the Linux system have occurred since that time ... including major revisions to the Scheduler. Thus, anything "of that vintage" which you read about scheduling, "nice" values and so-forth ... or anything else ... may or may not today be [entirely ...] true.

Unfortunately, not all published documents or web-pages include a date. This can be a very serious omission.

Last edited by sundialsvcs; 05-02-2017 at 03:29 PM.
 
  


Reply



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
Calculating nice value of a process from the data in task_struct? shujaat Linux - Kernel 1 10-14-2009 09:04 AM
Nice level set but process gets wrong priority akring Linux - Kernel 3 11-03-2008 09:20 AM
Nice level set but process gets wrong priority akring Linux - General 7 10-29-2008 04:25 AM
Nice article about the Debian release process rickh Debian 0 11-23-2006 01:34 PM
process priority,nice -- small question regarding high/low priority values beeblequix Linux - Newbie 1 10-11-2006 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:59 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
Open Source Consulting | Domain Registration