Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-10-2003, 01:03 PM   #1
Registered: Nov 2002
Distribution: RH
Posts: 141

Rep: Reputation: 15

What command could I use to see the niceness of a command I ran, besides just using top. Here is what I am looking for...

I want a command that I can type command PID and it will show the niceness of the command. Is there such a thing? I know, top works fine, but I was just wondering if there was a command that does this. Or what file(s) does top get its info from?
Old 03-10-2003, 05:07 PM   #2
Senior Member
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
You can change the columns in ps with the -o option.

If you just want it for one command, you could use something like...

ps -o nice --no-headers -C commandname


ps -o nice --no-headers PID

You could even set-up an alias to create your own command that would do it for you...

alias cn='ps -o nice --no-headers'

Then, all you have to do is type in...

cn -C commandname


cn PID

Put your alias command in your .bash_profile, and it will be run and set the alias every time you login.


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:05 AM.

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