On 1/27/16 8:43 , Nathan Huff wrote:
> Is there anyway to list the currently associated objects on an event port?
>
> I am trying to debug an issue that I think is caused by a program thinking
> it has an fd associated with an event port when it really isn't. I know
> what the program thinks is associated, but I don't see an easy way to get
> what the kernel actually has associated.
There's no great way to do this. I'd suggest firing up mdb -k and
starting with something like 0t<pid>::pid2proc | ::pfiles. From there
grab the vnode and do something like:
> ffffff0331050000::print vnode_t v_data | ::print port_t
port_queue.portq_pcp[]
port_queue.portq_pp = {
port_queue.portq_pcp->pc_lock = {
_opaque = [ 0 ]
}
port_queue.portq_pcp->pc_lclosecv = {
_opaque = 0
}
port_queue.portq_pcp->pc_hash = 0xffffff0332218800
port_queue.portq_pcp->pc_hashsize = 0x100
port_queue.portq_pcp->pc_fdcount = 0x5
}
With that in hand, you can walk the hash and print the struct polldat
which should give you some of the information that you want.
I hope that this give you a useful starting point.
Robert
-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription:
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com