On busy box where the "top" and "ps" command is built with basic feature it may not provide nice details of the process.
The below code can be used for getting the nice value of the a given process .
cat /proc/4013/stat | awk '{print "priority " $18 " nice " $19}'
In the above command "4013" is the process id and stat file will have various details about the process.
The details of the stat is available in "https://man7.org/linux/man-pages/man5/proc.5.html" under the section "/proc/[pid]/stat"
No comments:
Post a Comment