From owner-freebsd-questions@FreeBSD.ORG Thu Apr 16 12:19:56 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D356A1065672 for ; Thu, 16 Apr 2009 12:19:56 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 88C1B8FC14 for ; Thu, 16 Apr 2009 12:19:56 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LuQZQ-0005ad-01 for freebsd-questions@freebsd.org; Thu, 16 Apr 2009 12:19:56 +0000 Received: from mailsupport.rambler.ru ([81.19.66.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Apr 2009 12:19:55 +0000 Received: from citrin by mailsupport.rambler.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Apr 2009 12:19:55 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Anton Yuzhaninov Date: Thu, 16 Apr 2009 12:19:43 +0000 (UTC) Organization: Rambler Lines: 33 Message-ID: References: <1268944720.20090415200438@yandex.ru> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: mailsupport.rambler.ru X-Comment-To: KES User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/7.1-STABLE (amd64)) Sender: news Subject: Re: How to check which FIB has a given process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2009 12:19:57 -0000 On Wed, 15 Apr 2009 20:04:38 +0300, KES wrote: K> Hi, Freebsd-questions. K> K> I can set process to have some FIB K> setfib X /some/programm K> K> How to check which FIB has some process? K> It is not easy, but possible via kgdb. under root run: cd /usr/obj/usr/src/sys/GENERIC (if you use custom kernel replace GENERIC by kernel name) make gdbinit kgdb kernel.debug /dev/mem (kgdb) ps find interesting process, than copy proc address (2-nd column) (kgdb) set $pp = (struct proc*) 0xffffff000fff3000 And see FIB for this process: (kgdb) p $pp.p_fibnum $1 = 0x0 -- Anton Yuzhaninov P. S. For amd64 you will need this patch: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/133775