renice 0509-040 error on AIX

Hi,

I am attempting to renice a process and am receiving the following error:

renice: 0509-040 1429722: getpriority: The process does not exist.

I have verified that the process is valid. I have also tried to renice other valid processes and still receive same error.

The command I am running is:
renice -n -20 -p 1429722
ap123456Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Hi,
how did you verify that the process is valid? The PID you'll have to use for the renice command is contained in the second column of the output of .e.g "ps -eaf".
Please remember that processes are often transient in nature.
A frequent mistake when using ps with "| grep pid" is confusing the PID of "grep" with the PID you're actually searching for.
The reason why I ask the above questions is that there is technically no other explanation than what the message itself says - "The process does not exist".
You could also post the output of your "ps" command here, indicating the id of the process you're trying to renice, so we could have a look.
wmp
ap123456Author Commented:
Command output:
# renice -n -20 -p 1290366
renice: 0509-040 1290366: getpriority: The process does not exist.

# ps -eaf | grep 1290366
oraprodr 1290366       1   8 13:36:34      - 29:26 ora_lms7_{dbname}

This does not seem to be limited to one system. I did some testing with other systems (same OS level)and processes and received varying results.  Was able to renice some processes, and with others,  I received the same error message. Cannot find common denominator. Not sure if I have a usage problem or if I have uncovered some type of bug.
woolmilkporcCommented:
Did you test renice with some non-Oracle process, such as the snmpd or another "harmless" thing?
The process you posted above looks quite like an Oracle RAC parallel execution process (whose number is governed by PARALLEL_MAX_SERVERS and PARALLEL_MIN_SERVERS). These processes are started and terminated by Oracle as demand increases or decreases, and can thus be short-lived.
Did you double-check the PID 1290366 from above after the renice command failed? Did it still exist?
wmp
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

ap123456Author Commented:
The oracle process still existed after the renice command failed.
I did some additional research and found that renice doesn't work on processes running at a fixed priority. I believe this to be the case as this exact command works on some processes and some it does not.
Do you know of a way to determine this setting?
ap123456Author Commented:
I found the command:
ps -lp {pid}. Fixed priority processes have - -  in the NI column:

 ps -lp 1290366
       F        S  UID     PID              PPID       C PRI NI ADDR    SZ    WCHAN    TTY  TIME CMD
  240103 A    6401 1290366       1           6  39 -- 862087590 108104               - 31:50 oracle


Thanks for your help!

woolmilkporcCommented:
Yes.
Processes running at fixed priority are indicated by a value of "--" in the NICE field, as shown e.g.in the 8th column of  "ps -efl" under the "NI" heading.
Although it is not possible to renice theses processes, issuing the "renice" command against one of them doesn't lead to your error message, but is silently ignored, at least up to AIX 5.3. What is your AIX version?
wmp
 
ap123456Author Commented:
5.3 ML10
woolmilkporcCommented:
I had to experiment a bit - I found some strange behaviour of "renice"
AIX 5.3 and 6.1 - the "old" format of renice (just "renice -20 ..." without "-n") behaves as I described - it sets priorities of non-fixed processes as desired, and does nothing on fixed-priority processes, not even show an error.
The "new" and official format of renice  ("-n 20 ...") does actually show your error message when issued aganst a fixed-priority process.
But ... with AIX 5.2 and earlier even the old format of renice gives the "... not exist" error!
Since I always use the old format (don't ask me why!) I actually wasn't aware of this up to now.
But concluding ... you're right, the error message you posted does actually result from issuing the renice command (as you posted it) against a fixed-priority process.
wmp
 
 

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ap123456Author Commented:
Thanks for your help in researching this !!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.