Re: procstat(1) committed to CVS HEAD

From: Julian Elischer <julian_at_elischer.org>
Date: Mon, 03 Dec 2007 09:05:14 -0800
Robert Watson wrote:
> 
> On Mon, 3 Dec 2007, Andrew Thompson wrote:
> 
>> On Sun, Dec 02, 2007 at 11:38:45PM +0000, Robert Watson wrote:
>>>
>>> Dear all, (and FYI to hackers_at_ where I previousl sought feedback):
>>>
>>> I've now committed procstat(1) to CVS.  I've found it to be quite a 
>>> helpful debugging tool, am particularly pleased with -k/-kk, and 
>>> would welcome feedback and ideas on further improving it.
>>
>> I would like to give some feedback. I listed the threads of proc 12 
>> which is intr,
>>
>> # procstat -t 12
>>  PID    TID COMM                 CPU  PRI STATE   WCHAN
>>   12 100003 intr                   0   40 wait    -
>>   12 100004 intr                   0   52 wait    -
>>   12 100030 intr                   0   16 wait    -
>>   [...]
>>   12 100036 intr                   0   36 wait    -
>>   12 100037 intr                   0   24 wait    -
>>
>> I had expected it to show the thread name such as 'irq14: ata0', is 
>> this possible (and a good thing to do)?
> 
> I just print out the 'comm' field returned by the generic sysctl, and I 
> notice that top(1) with -S is now having the same problem as 
> procstat(1).  I think this is a kernel bug in how we initialize or 
> otherwise handle thread names, and fairly recent, as it's not present on 
> my 7.0BETA2 box.  If I had to guess, it's that these are now 'true 
> threads' under the single 'intr' proc, and that we're not exporting the 
> thread name?

the td_td_name field is set from the proc name when the process is not threaded.
In the system, it is initialised correctly when new kernel threads are set up.
At least, ddb shows it as being set up..
top -SH can show you the td_name field.
check that.


> 
>> Great work on procstat :)
> 
> Thanks!
> 
> Robert N M Watson
> Computer Laboratory
> University of Cambridge
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Mon Dec 03 2007 - 16:05:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:23 UTC