Unix Programming - getpriority and renice command

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > August 2007 > getpriority and renice command





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author getpriority and renice command
Neo

2007-08-31, 1:19 pm

Hi friends,
I want to show process priority of my own process. My program runs on
Solaris and Linux platforms. This program can run with any user
credentials.
Now for getting priority of my process I have used getpriority() API.

I have used code-->
long priority = getpriority(PRIO_PROCESS,0);

Now when I try to test this feature on Solaris I used renice tool
like
renice 15 pid

I can see the changed the priority shown by my program on console.

But when I try same command on RHEL4, I do not see any priority
change. I order to see it I need to use command like
renice 15 pid -u username

Why it is so?
I am confused about who and which parameters. Please guide me.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com