LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-10-2003, 01:03 PM   #1
granny
Member
 
Registered: Nov 2002
Distribution: RH
Posts: 141

Rep: Reputation: 15
niceness


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
ranger_nemo
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

or...

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

or...

cn PID

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


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



All times are GMT -5. The time now is 03:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration