kern.nprocs not (closely) matching ps -ax |wc -l ??

2006-10-30 Thread Bill Marquette

I understand that the ps -ax would have spawned at least one more
process (and a header) than the sysctl count, but I'm not seeing why
sysctl is showing 11 more processes than ps does:
$ sysctl kern.nprocs  (ps -ax |wc -l)  sysctl kern.nprocs
kern.nprocs=46
 35
kern.nprocs=46

This machine has been up a while and has had enough various errors to
make the boot dmesg disappear from logs, so here's the various kern.*
sysctl's that show what kernel I'm running:
kern.ostype=OpenBSD
kern.osrelease=3.8
kern.osrevision=200511
kern.version=OpenBSD 3.8-current (GENERIC) #320: Sat Dec 17 10:09:10 MST 2005
   [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC

A 3.9 system is a tad different, but exhibits the same strangeness:
$ sysctl kern.nprocs  (ps -ax |wc -l)  sysctl kern.nprocs
kern.nprocs=48
 39
kern.nprocs=48


Any idea where the discrepancy might be coming from?

--Bill



Re: kern.nprocs not (closely) matching ps -ax |wc -l ??

2006-10-30 Thread Philip Guenther

On 10/30/06, Bill Marquette [EMAIL PROTECTED] wrote:

I understand that the ps -ax would have spawned at least one
more process (and a header) than the sysctl count, but I'm not
seeing why sysctl is showing 11 more processes than ps does:


Check out the -k option to ps.


Philip Guenther



Re: kern.nprocs not (closely) matching ps -ax |wc -l ??

2006-10-30 Thread Otto Moerbeek
On Mon, 30 Oct 2006, Bill Marquette wrote:

 I understand that the ps -ax would have spawned at least one more
 process (and a header) than the sysctl count, but I'm not seeing why
 sysctl is showing 11 more processes than ps does:
 $ sysctl kern.nprocs  (ps -ax |wc -l)  sysctl kern.nprocs
 kern.nprocs=46
  35
 kern.nprocs=46
 
 This machine has been up a while and has had enough various errors to
 make the boot dmesg disappear from logs, so here's the various kern.*
 sysctl's that show what kernel I'm running:
 kern.ostype=OpenBSD
 kern.osrelease=3.8
 kern.osrevision=200511
 kern.version=OpenBSD 3.8-current (GENERIC) #320: Sat Dec 17 10:09:10 MST 2005
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
 
 A 3.9 system is a tad different, but exhibits the same strangeness:
 $ sysctl kern.nprocs  (ps -ax |wc -l)  sysctl kern.nprocs
 kern.nprocs=48
  39
 kern.nprocs=48
 
 
 Any idea where the discrepancy might be coming from?

By default, ps does not show kernel processes. See ps(1), -k option.

-Otto



Re: kern.nprocs not (closely) matching ps -ax |wc -l ??

2006-10-30 Thread Bill Marquette

On 10/30/06, Otto Moerbeek [EMAIL PROTECTED] wrote:


On Mon, 30 Oct 2006, Bill Marquette wrote:

 I understand that the ps -ax would have spawned at least one more
 process (and a header) than the sysctl count, but I'm not seeing why
 sysctl is showing 11 more processes than ps does:
 $ sysctl kern.nprocs  (ps -ax |wc -l)  sysctl kern.nprocs
 kern.nprocs=46
  35
 kern.nprocs=46

 This machine has been up a while and has had enough various errors to
 make the boot dmesg disappear from logs, so here's the various kern.*
 sysctl's that show what kernel I'm running:
 kern.ostype=OpenBSD
 kern.osrelease=3.8
 kern.osrevision=200511
 kern.version=OpenBSD 3.8-current (GENERIC) #320: Sat Dec 17 10:09:10 MST 2005
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC

 A 3.9 system is a tad different, but exhibits the same strangeness:
 $ sysctl kern.nprocs  (ps -ax |wc -l)  sysctl kern.nprocs
 kern.nprocs=48
  39
 kern.nprocs=48


 Any idea where the discrepancy might be coming from?

By default, ps does not show kernel processes. See ps(1), -k option.

-Otto


Gah, thanks!  Never occurred to me that -a wouldn't show all
processes.  Learn something every day, thanks to all for their
responses.

--Bill

--Bill