Re: What is the "nice" process state?

2007-11-03 Thread Daniel Ouellet

bofh wrote:

I just read man top.  So, just to confirm, for those without ability
to read the source, or understand it, the nice cpu processor state is
the percentage of time spent on niced processes.  Someone mentioned he
was not sure if it was 1-20, or includes -1 to -20.  From the way the
man page is written, it sounds as if the nice % is any nice != 0
processes.  Just curious if I read it right.


This question was asked a week ago and got answered:

http://marc.info/?l=openbsd-misc&m=119349072814956&w=2

The full treads is available as well and that's the first hit on google too:

http://www.google.com/search?hl=en&q=%22nice+process%22+%2Bopenbsd&btnG=Google+Search



Re: What is the "nice" process state?

2007-11-03 Thread bofh
On 11/3/07, Martin Schrvder <[EMAIL PROTECTED]> wrote:
> 2007/11/3, Karel Kulhavy <[EMAIL PROTECTED]>:
> > On Sat, Nov 03, 2007 at 04:21:13PM +0100, Martin Schrvder wrote:
> > > Go away, troll.
> >
> > Wrong answer. Cf. Patricia Evans - Controlling People. The
>
> Shut the Fuck up. Nobody here will miss you.

I just read man top.  So, just to confirm, for those without ability
to read the source, or understand it, the nice cpu processor state is
the percentage of time spent on niced processes.  Someone mentioned he
was not sure if it was 1-20, or includes -1 to -20.  From the way the
man page is written, it sounds as if the nice % is any nice != 0
processes.  Just curious if I read it right.


--
"This officer's men seem to follow him merely out of idle curiosity."
-- Sandhurst officer cadet evaluation.
http://www.youtube.com/watch?v=tGvHNNOLnCk



Re: What is the "nice" process state?

2007-11-03 Thread Martin Schröder
2007/11/3, Karel Kulhavy <[EMAIL PROTECTED]>:
> On Sat, Nov 03, 2007 at 04:21:13PM +0100, Martin Schrvder wrote:
> > Go away, troll.
>
> Wrong answer. Cf. Patricia Evans - Controlling People. The

Shut the Fuck up. Nobody here will miss you.



Re: What is the "nice" process state?

2007-11-03 Thread Nick Guenther
On Nov 3, 2007 12:20 PM, Karel Kulhavy <[EMAIL PROTECTED]> wrote:
>
> On Sat, Nov 03, 2007 at 04:21:13PM +0100, Martin Schrvder wrote:
> >
> > Go away, troll.
>
>
> Wrong answer. Cf. Patricia Evans - Controlling People. The definition of troll
> includes "with the intention of baiting users into an argumentative response"

Which is exactly what this paragraph does.

> which requires knowing a state of a different mind - impossible.

and this part just doesn't make sense. and the piece of it that does
make sense is wrong: people can know other people's states of mind,
it's called empathy and communication.



Re: What is the "nice" process state?

2007-11-03 Thread Jason McIntyre
On Sat, Nov 03, 2007 at 05:14:13PM +0100, Karel Kulhavy wrote:
> > 
> > "neither man top says it" - have you actually read top(1)? it does
> > document the "NICE" column. it also lists renice(8) in the SEE ALSO
> > section.
> 
> hehe yes, but I am not asking about the NICE column, but about the nice
> CPU state :)
> 

i think you're looking for nice(3) and setpriority(2).
jmc



Re: What is the "nice" process state?

2007-11-03 Thread Karel Kulhavy
On Sat, Nov 03, 2007 at 01:15:14PM +, Jason McIntyre wrote:
> On Sat, Nov 03, 2007 at 11:45:36AM +0100, Karel Kulhavy wrote:
> > > 
> > > You've been on this list and using OpenBSD for long enough that you
> > > should be trying things like "man nice", "apropos nice" and "man top"
> > 
> > man nice doesn't say what the "nice" state in the top printout is neither
> > man top says it.
> > 
> 
> why would nice(1) describe the output of top(1)?

I don't know - you should ask the one from this mailing list who suggested it
to me that I should look into man nice(1) :)

> 
> "neither man top says it" - have you actually read top(1)? it does
> document the "NICE" column. it also lists renice(8) in the SEE ALSO
> section.

hehe yes, but I am not asking about the NICE column, but about the nice
CPU state :)

CL<



Re: What is the "nice" process state?

2007-11-03 Thread Karel Kulhavy
On Sat, Nov 03, 2007 at 04:21:13PM +0100, Martin Schrvder wrote:
> 2007/11/3, Karel Kulhavy <[EMAIL PROTECTED]>:
> > It's clear to me what is the nice column. I asked for the nice state instead
> > - if you run top, you have a line "CPU state: ...0.0% nice..." - that's the
> > one I am asking about.
> 
> Go away, troll.


Wrong answer. Cf. Patricia Evans - Controlling People. The definition of troll
includes "with the intention of baiting users into an argumentative response"
which requires knowing a state of a different mind - impossible.

CL<



Re: What is the "nice" process state?

2007-11-03 Thread Martin Schröder
2007/11/3, Karel Kulhavy <[EMAIL PROTECTED]>:
> It's clear to me what is the nice column. I asked for the nice state instead
> - if you run top, you have a line "CPU state: ...0.0% nice..." - that's the
> one I am asking about.

Go away, troll.



Re: What is the "nice" process state?

2007-11-03 Thread Karel Kulhavy
On Sat, Nov 03, 2007 at 08:55:04AM -0400, Douglas A. Tutty wrote:
> On Sat, Nov 03, 2007 at 11:45:36AM +0100, Karel Kulhavy wrote:
>  
> > >From the replies I got (none of which actually answered my question) it 
> > >looks
> > like the "nice" state might be a state where the nice value != 0. Or less 
> > than
> > zero would also make sense. But it could be also that OpenBSD has the nice()
> > function like some other operating systems for giving up the scheduled time
> > back to the system and then the nice state might show amount of time
> > given up this way. So - what is the nice state printout actually?
> 
> The 'nice' column should be the nice level.  If its 0, then its not

It's clear to me what is the nice column. I asked for the nice state instead
- if you run top, you have a line "CPU state: ...0.0% nice..." - that's the
one I am asking about.

CL<
> niced either way.  If its 2 then it has a niceness of 2, if its -2 then
> its niceness is -2 which means its not nice to other processes.  Since
> the purpose of 'nice' is to adjust the scheduling priority, I don't
> think anything keeps track of the amount of time given up this way.
> 
> Keep in mind, nice is only for processor scheduling while in userland.
> It doesn't affect scheduling of system calls or io.  So a very nice
> process can still use up a lot of system resources by hogging disk or
> other I/O which itself can end up using CPU cycles.
> 
> Doug.



Re: What is the "nice" process state?

2007-11-03 Thread Woodchuck
On Sat, 3 Nov 2007, Karel Kulhavy wrote:

> > > PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
> > > 29174 clock 79   10   33M   15M run  -0:00  4.25% rt
> > > 
> > > What is the "nice" state? I know what userspace, system, interrupt handler
> > > and idle task is, but nice?
> > 

> >From the replies I got (none of which actually answered my question) it looks
> like the "nice" state might be a state where the nice value != 0. Or less than
> zero would also make sense. But it could be also that OpenBSD has the nice()
> function like some other operating systems for giving up the scheduled time
> back to the system and then the nice state might show amount of time
> given up this way. So - what is the nice state printout actually?

>From my ancient answer to you, and I quote:

"Top's  48.7% nice here is telling you that the CPU is spending 48.7%
of its time executing tasks that are "niced".  If this includes
processes with negative "nice" values, I do not know; you could
peruse the kernel source or conduct an experiment to discover that,
if you care to."

I also referred you to two or three relevant man pages.

If that doesn't answer your trolling, disengenuous, never-read-a-manpage,
low-grade, losing, pre/sub-newbie question, then answering your questions
is impossible.

You are not worth further effort, kid.



Re: What is the "nice" process state?

2007-11-03 Thread Jason McIntyre
On Sat, Nov 03, 2007 at 11:45:36AM +0100, Karel Kulhavy wrote:
> > 
> > You've been on this list and using OpenBSD for long enough that you
> > should be trying things like "man nice", "apropos nice" and "man top"
> 
> man nice doesn't say what the "nice" state in the top printout is neither
> man top says it.
> 

why would nice(1) describe the output of top(1)?

"neither man top says it" - have you actually read top(1)? it does
document the "NICE" column. it also lists renice(8) in the SEE ALSO
section.

top(1) also mentions the USERNAME column - i wonder if we should use the
top(1) manual page to describe how unix usernames work?

come on, man.

jmc



Re: What is the "nice" process state?

2007-11-03 Thread Douglas A. Tutty
On Sat, Nov 03, 2007 at 11:45:36AM +0100, Karel Kulhavy wrote:
 
> >From the replies I got (none of which actually answered my question) it looks
> like the "nice" state might be a state where the nice value != 0. Or less than
> zero would also make sense. But it could be also that OpenBSD has the nice()
> function like some other operating systems for giving up the scheduled time
> back to the system and then the nice state might show amount of time
> given up this way. So - what is the nice state printout actually?

The 'nice' column should be the nice level.  If its 0, then its not
niced either way.  If its 2 then it has a niceness of 2, if its -2 then
its niceness is -2 which means its not nice to other processes.  Since
the purpose of 'nice' is to adjust the scheduling priority, I don't
think anything keeps track of the amount of time given up this way.

Keep in mind, nice is only for processor scheduling while in userland.
It doesn't affect scheduling of system calls or io.  So a very nice
process can still use up a lot of system resources by hogging disk or
other I/O which itself can end up using CPU cycles.

Doug.



Re: What is the "nice" process state?

2007-11-03 Thread Karel Kulhavy
On Sat, Nov 03, 2007 at 01:40:11PM +0200, Lars Noodin wrote:
> Karel Kulhavy wrote:
> > ...
> > man nice doesn't say what the "nice" state in the top printout is neither
> > man top says it.
> > ...
> 
> Bug report time.  Manpages are 'easy' to update.

I don't think that should be added into man nice. I think it should be added
into man top.

CL<
> 
> -Lars



Re: What is the "nice" process state?

2007-11-03 Thread Lars Noodén
Karel Kulhavy wrote:
> ...
> man nice doesn't say what the "nice" state in the top printout is neither
> man top says it.
> ...

Bug report time.  Manpages are 'easy' to update.

-Lars



Re: What is the "nice" process state?

2007-11-03 Thread Karel Kulhavy
On Sat, Oct 27, 2007 at 09:35:41AM -0700, Darrin Chandler wrote:
> On Sat, Oct 27, 2007 at 01:57:06PM +0200, Karel Kulhavy wrote:
> > I am raytraing a video with a command "rt" and the "top" is showing this:
> > 
> > CPU states: 48.4% user, 48.7% nice,  3.0% system,  0.0% interrupt,  0.0% 
> > idle
> > [...]
> > PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
> > 29174 clock 79   10   33M   15M run  -0:00  4.25% rt
> > 
> > What is the "nice" state? I know what userspace, system, interrupt handler
> > and idle task is, but nice?
> 
> You've been on this list and using OpenBSD for long enough that you
> should be trying things like "man nice", "apropos nice" and "man top"

man nice doesn't say what the "nice" state in the top printout is neither
man top says it.

>From the replies I got (none of which actually answered my question) it looks
like the "nice" state might be a state where the nice value != 0. Or less than
zero would also make sense. But it could be also that OpenBSD has the nice()
function like some other operating systems for giving up the scheduled time
back to the system and then the nice state might show amount of time
given up this way. So - what is the nice state printout actually?

> before asking these kinds of questions. Also, Googling for "unix nice"
> also yields plenty of info. If you learn how to find answers to
> extremely basic questions on your own using provided documentation it

If you have columns in a program printout with a meaning that isn't obvious
obvious - like this one, they should be described in the manual page. It's not
a mistake of the user if they aren't.

CL<
> will save you a lot of time.
> 
> -- 
> Darrin Chandler|  Phoenix BSD User Group  |  MetaBUG
> [EMAIL PROTECTED]   |  http://phxbug.org/  |  http://metabug.org/
> http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation



Re: What is the "nice" process state?

2007-10-27 Thread Darrin Chandler
On Sat, Oct 27, 2007 at 01:57:06PM +0200, Karel Kulhavy wrote:
> I am raytraing a video with a command "rt" and the "top" is showing this:
> 
> CPU states: 48.4% user, 48.7% nice,  3.0% system,  0.0% interrupt,  0.0% idle
> [...]
> PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
> 29174 clock 79   10   33M   15M run  -0:00  4.25% rt
> 
> What is the "nice" state? I know what userspace, system, interrupt handler
> and idle task is, but nice?

You've been on this list and using OpenBSD for long enough that you
should be trying things like "man nice", "apropos nice" and "man top"
before asking these kinds of questions. Also, Googling for "unix nice"
also yields plenty of info. If you learn how to find answers to
extremely basic questions on your own using provided documentation it
will save you a lot of time.

-- 
Darrin Chandler|  Phoenix BSD User Group  |  MetaBUG
[EMAIL PROTECTED]   |  http://phxbug.org/  |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation



Re: What is the "nice" process state?

2007-10-27 Thread Lars Noodén
Karel Kulhavy wrote:
> ...
> What is the "nice" state? I know what userspace, system, interrupt handler
> and idle task is, but nice? ...

It's an adjustment to scheduling priority:

http://www.openbsd.org/cgi-bin/man.cgi?query=nice

You can use nice to give a process a higher or lower priority than other
processes when you start the process.  Or you can use renice to do the
same after the program is already started.

http://www.openbsd.org/cgi-bin/man.cgi?query=renice

Often it's used to slow down a CPU hog running in the background.

Regards
-Lars



Re: What is the "nice" process state?

2007-10-27 Thread Woodchuck
On Sat, 27 Oct 2007, Karel Kulhavy wrote:

> I am raytraing a video with a command "rt" and the "top" is showing this:
> 
> CPU states: 48.4% user, 48.7% nice,  3.0% system,  0.0% interrupt,  0.0% idle
> [...]
> PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
> 29174 clock 79   10   33M   15M run  -0:00  4.25% rt
> 
> What is the "nice" state? I know what userspace, system, interrupt handler
> and idle task is, but nice?
> 
> CL<

man 1 nice.
man 1 top.
man 3 sysctl  vide KERN_CPTIME

The nice value is added to the basic priority of a task.  The higher
the "nice", the less likely a task is to get CPU time,  so called
because it is being "nice" to other users.  It's part of an ancient
unix work-around for not having proper prioritized batch queues and
a more versatile scheduler.

The standard joke is that there actually was a user who once
voluntarily ran nice on a time-sharing system.

Top's  48.7% nice here is telling you that the CPU is spending 48.7%
of its time executing tasks that are "niced".  If this includes
processes with negative "nice" values, I do not know; you could
peruse the kernel source or conduct an experiment to discover that,
if you care to.

Dave



Re: What is the "nice" process state?

2007-10-27 Thread Paul de Weerd
On Sat, Oct 27, 2007 at 01:57:06PM +0200, Karel Kulhavy wrote:
| I am raytraing a video with a command "rt" and the "top" is showing this:
|
| CPU states: 48.4% user, 48.7% nice,  3.0% system,  0.0% interrupt,  0.0%
idle
| [...]
| PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
| 29174 clock 79   10   33M   15M run  -0:00  4.25% rt
|
| What is the "nice" state? I know what userspace, system, interrupt handler
| and idle task is, but nice?

See the nice(1) and renice(8) manpages for more information.

Cheers,

Paul 'WEiRD' de Weerd

--
>[<++>-]<+++.>+++[<-->-]<.>+++[<+
+++>-]<.>++[<>-]<+.--.[-]
 http://www.weirdnet.nl/

[demime 1.01d removed an attachment of type application/pgp-signature]



What is the "nice" process state?

2007-10-27 Thread Karel Kulhavy
I am raytraing a video with a command "rt" and the "top" is showing this:

CPU states: 48.4% user, 48.7% nice,  3.0% system,  0.0% interrupt,  0.0% idle
[...]
PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
29174 clock 79   10   33M   15M run  -0:00  4.25% rt

What is the "nice" state? I know what userspace, system, interrupt handler
and idle task is, but nice?

CL<