Operating System - HP-UX
1833726 Members
2573 Online
110063 Solutions
New Discussion

nice and user state in top

 
Camel_1
Valued Contributor

nice and user state in top

Hi there,

I have a Oracle export script, I found that if I run the script in shell prompt, the process will run in "USER" stat (shown from top command). However if I run it by cron schedule, it will run in "NICE" state and it takes more time to finish compare running in shell prompt. Any idea what is the different?

Thanks,

Simon
2 REPLIES 2
Peter Godron
Honored Contributor

Re: nice and user state in top

Simon,
I believe the nice state may be down to the cron daemon. What value is cron running at,
as
"Normally, all processes inherit the system nice value of their parent process when they are spawned." see "man nice"

However if something is run in background mode the nice value changes.
Camel_1
Valued Contributor

Re: nice and user state in top

Peter, here is the ps output of the cron daemon.

1 S root 2759 1 0 154 20 5336d2c0 27 502c346e Sep 10 ? 0:04 /usr/sbin/cron