Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Apr 2009 21:33:51 +0300
From:      KES <kes-kes@yandex.ru>
To:        Anton Yuzhaninov <citrin@citrin.ru>
Cc:        freebsd-questions@freebsd.org
Subject:   Re[2]: How to check which FIB has a given process
Message-ID:  <245068501.20090416213351@yandex.ru>
In-Reply-To: <gs77ov$b03$1@ger.gmane.org>
References:  <1268944720.20090415200438@yandex.ru> <gs77ov$b03$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Здравствуйте, Anton.

Вы писали 16 апреля 2009 г., 15:19:43:

AY> 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>> 

AY> It is not easy, but possible via kgdb.

AY> under root run:

AY> cd /usr/obj/usr/src/sys/GENERIC
AY> (if you use custom kernel replace GENERIC by kernel name)
AY> make gdbinit
AY> kgdb kernel.debug /dev/mem
AY> (kgdb) ps

AY> find interesting process, than copy proc address (2-nd column)

AY> (kgdb) set $pp = (struct proc*) 0xffffff000fff3000

AY> And see FIB for this process:

AY> (kgdb) p $pp.p_fibnum
AY> $1 = 0x0


It is really not easy.
I expected something like:
checkfib <PID>
=)

Thank you for answer
-- 
С уважением,
 KES                          mailto:kes-kes@yandex.ru




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?245068501.20090416213351>