re: bozohttpd minor fixes to man page

2016-10-04 Thread matthew green
Swift Griggs writes:
> 
> I like NetBSD's httpd. I noticed a couple of minor inconsistencies in the 
> bozohttpd(8) manual page. Where should I report these?

thanks.  directly to me is fine, and is send-pr from netbsd or from
the send-pr form on gnats.netbsd.org.

> * The -v option appears twice in the options summary. It's shown as both a 
>   flag and a switch that takes options. They can't be both right. 

this got fixed late last year by shm@.

> * The -V option is documented in the manual page, but does not appear in 
>   the options summary block at the top of the manual page. It's also 
>   unclear if "slashdir" is an option for -V or if the text refers to the 
>   "slashdir" given as the document root.

OK, i've cleared this one some.

> * -V is also not documented in the usage when you get help directly from 
>   the binary (ie.. just run /usr/libexec/httpd to see what I mean). 

i also fixed this.

thanks!


.mrg.


Re: What is the "[system]" process representing ?

2016-10-04 Thread Swift Griggs
On Tue, 4 Oct 2016, Michael van Elst wrote:
> [system] is all the kernel threads. In top you can switch to thread 
> display and get more details. Kernel threads are also displayd with 'ps 
> -s' and you can augment the display with the thread name using '-o 
> lname'.

Ah, I should have known there would be a switch for 'ps' since there is on 
several other OS's including Linux. However, IIRC, Linux will show all the 
threads by default. Thanks for the reminder. 

> 80% CPU for doing nothing however is bad. The top display probably tells 
> you which thread is misbehaving.

Next time it happens, I'll pay attention and expand the kernel threads to 
see which one is doing it. I guess there is no way to do a gdb 'attach' to 
the kernel thread to get a backtrace, though. I'm assuming one has to do 
this sort of thing with a specialized kernel debuggger/profiler.

> Saying this, if you run a kernel with LOCKDEBUG on a system with lots of 
> memory, this adds a ton of overhead to the ioflush function and then 
> it's not impossible to see a continous 80% CPU usage for '[system]'. But 
> that doesn't happen with normal kernels.

This is definitely abnormal in my experience. I have machines with less 
horsepower and they don't have the issue. It's got to be something 
specific to my configuration or hardware on that one machine. I'll run it 
to ground eventually, and especially now that I'll remember to drill down 
to the actual thread in question. I can then put in enough printf()'s or 
printk()'s that I can find the general problem area enough to report it. 

> top just can't display CPU usage correctly for processes that are active 
> for very short intervals, wether kernel threads or not.

Well sure, it's default refresh is 5 seconds, so by definition if it's 
shorter than that, it'll basically be invisible.

Thanks for the reply. 
-Swift


Re: What is the "[system]" process representing ?

2016-10-04 Thread Michael van Elst
swiftgri...@gmail.com (Swift Griggs) writes:

>Folks, I recently installed NetBSD on a Lenovo M83 Tiny machine and from 
>time to time, I notice the "[system]" (appears to be a kernel thread?) 
>getting up to 80% of the CPU while the box is doing  nothing.

[system] is all the kernel threads. In top you can switch to thread
display and get more details. Kernel threads are also displayd with 'ps -s'
and you can augment the display with the thread name using '-o lname'.

80% CPU for doing nothing however is bad. The top display probably tells
you which thread is misbehaving.



>On another system, I have a question about a 1.8Ghz CoreDuo based 32-bit 
>i386 laptop with 2GB of RAM. I noticed that '[system]' accumulates the 
>most time on the host, but it's never "on the board" when I run top or 
>other tools.

The kernel threads are only active for very short time intervals
and therefore appear rarely as active. But since they run all the
time, their usage accumulates. E.g.

a system with 59 days uptime:

0 ?  OKl   678:30.07 [system]

that's less than 1% overall. Here are the kernel threads reports by 'ps':

% ps asx -o uid,pid,ppid,cpu,pri,nice,vsz,rss,wchan,stat,tty,time,comm,lname | 
grep system
  0 0 0 0 123  0 0  7728 -OKl  ?  678:30.22 [system 
(zombie) 
  0 0 0 0  96  0 0  7728 vndbpOKl  ?  678:30.22 [system 
vnd0 
  0 0 0 0  96  0 0  7728 nfsiod   OKl  ?  678:30.22 [system 
nfsio
  0 0 0 0  96  0 0  7728 nfsiod   OKl  ?  678:30.22 [system 
nfsio
  0 0 0 0  96  0 0  7728 nfsiod   OKl  ?  678:30.22 [system 
nfsio
  0 0 0 0  96  0 0  7728 nfsiod   OKl  ?  678:30.22 [system 
nfsio
  0 0 0 0 123  0 0  7728 physiod  OKl  ?  678:30.22 [system 
physiod  
  0 0 0 0  96  0 0  7728 lnxcmplt OKl  ?  678:30.22 [system 
VCHIQka-0
  0 0 0 0 125  0 0  7728 aiodoned OKl  ?  678:30.22 [system 
aiodoned 
  0 0 0 0 124  0 0  7728 syncer   OKl  ?  678:30.22 [system 
ioflush  
  0 0 0 0 126  0 0  7728 pgdaemon OKl  ?  678:30.22 [system 
pgdaemon 
  0 0 0 0 123  0 0  7728 data OKl  ?  678:30.22 [system 
vcaudio  
  0 0 0 0  96  0 0  7728 semacv   OKl  ?  678:30.22 [system 
VCHIQs-0 
  0 0 0 0  96  0 0  7728 semacv   OKl  ?  678:30.22 [system 
VCHIQr-0 
  0 0 0 0  96  0 0  7728 semacv   OKl  ?  678:30.22 [system 
VCHIQ-0  
  0 0 0 0  96  0 0  7728 cleanup  OKl  ?  678:30.22 [system 
iscsi_cleanup
  0 0 0 0  96  0 0  7728 sccomp   OKl  ?  678:30.22 [system 
scsibus0 
  0 0 0 0  96  0 0  7728 usbevt   OKl  ?  678:30.22 [system 
usb0 
  0 0 0 0  96  0 0  7728 npfgccv  OKl  ?  678:30.22 [system 
npfgc
  0 0 0 0  96  0 0  7728 unpgcOKl  ?  678:30.22 [system 
unpgc
  0 0 0 0 222  0 0  7728 nd6_time OKl  ?  678:30.22 [system 
nd6_timer
  0 0 0 0 222  0 0  7728 rt_timer OKl  ?  678:30.22 [system 
rt_timer 
  0 0 0 0  43  0 0  7728 vcmbox0  OKl  ?  678:30.22 [system 
vcmbox0  
  0 0 0 0 125  0 0  7728 vmem_reh OKl  ?  678:30.22 [system 
vmem_rehash  
  0 0 0 0 123  0 0  7728 mmctaskq OKl  ?  678:30.22 [system 
sdmmc0   
  0 0 0 0  96  0 0  7728 usbtsk   OKl  ?  678:30.22 [system 
usbtask-dr   
  0 0 0 0  96  0 0  7728 usbtsk   OKl  ?  678:30.22 [system 
usbtask-hc   
  0 0 0 0  43  0 0  7728 dwc2 OKl  ?  678:30.22 [system 
dwc2 
  0 0 0 0  96  0 0  7728 iicintr  OKl  ?  678:30.22 [system 
iic0 
  0 0 0 0 127  0 0  7728 xcallOKl  ?  678:30.22 [system 
xcall/3  
  0 0 0 0 223  0 0  7728 -OKl  ?  678:30.22 [system 
softser/3
  0 0 0 0 220  0 0  7728 -OKl  ?  678:30.22 [system 
softclk/3
  0 0 0 0 221  0 0  7728 -OKl  ?  678:30.22 [system 
softbio/3
  0 0 0 0 222  0 0  7728 -OKl  ?  678:30.22 [system 
softnet/3
  0 0 0 0   0  0 0  7728 -OKl  ?  678:30.22 [system 
idle/3   
  0 0 0 0 127  0 0  7728 xcallOKl  ?  678:30.22 [system 
xcall/2  
  0 0 0 0 223  0 0  7728 -OKl  ?  678:30.22 [system 
softser/2
  0 0 0 0 220  0 0  7728 -OKl  ?  678:30.22 [system 
softclk/2
  0 0 0 0 221  0 0  7728 -OKl  ?  678:30.22 [system 
softbio/2
  0 0 0 0 222  0 0  7728 -OKl  ?