Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
For a single PID "3020" try '/bin/ps --no-headers -p 3020 -o pid,nice' (which is different from "-o pri,rtprio,priority") or 'procstat -t 3020'. If you `pgrep vsftpd` then you just '/bin/ps --no-headers -p $(pgrep vsftpd) -o pid,nice' or to be safe 'pgrep vsftpd|xargs -iP /bin/ps --no-headers -p 'P' -o pid,nice'...
What is the difference between nice and priority? I see (using top) that they are not the opposite of each other.
Executive overview: nice: your call, rtprio: your call, priority: can't touch this.
Slightly more verbose: in 'man 5 proc' at the /proc/[number]/stat field explanation priority is described as "The standard nice value, plus fifteen." and nice as "The nice value ranges from 19 (nicest) to -19 (not nice to others).". If you run '/bin/ps axf -eo pid,pri,nice,rtprio,comm --sort=pid' "PRI" means the kernel the "real" priority value the kernel uses to schedule process runtime (lowest value 0 means highest priority and there's 140 run queues AFAIK), NI is a modifier (setpriority()) and RTPRIO too (any SCHED_.* as in 'man chrt'). If I translate correctly (please correct me if I'm wrong) what I've read then the actual priority PRI value is a value the kernel scheduler sets (which you can't change) and RTPRIO tells it what dynamic priority adjustment it should apply and NI how quick it should adjust priority. There's a lot of man pages on the subject, also see the historical http://tldp.org/LDP/lki/lki-2.html document, Robert Love's texts, http://www.ibm.com/developerworks/li...y/l-scheduler/, the "Understanding the Linux Kernel" (e-)book, http://kerneltrap.org/node/11778 and http://kerneltrap.org/scheduler.