Re: Show which CPU is executing a thread?

看板FB_smp作者時間16年前 (2009/06/02 19:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/9 (看更多)
First of all thank you for your help Dan. One last question though, does anyone have the structure of the kinfo_proc struct? In kvm.h it seems to be defined transparently and i would very much like to know where in this struct i can find the CPU ID. 2009/6/1 Dan Nelson <dnelson@allantgroup.com> > In the last episode (Jun 01), nocturnal said: > > 2009/6/1 nocturnal <swehack@gmail.com> > > > I've been searching the web, all i want is to show which CPU is > > > currently executing a certain thread. Is this info available to me i= n > > > user space? Which manuals should i read to do this? > > > > > > I know Solaris has something about lwp that can show the last CPU use= d, > > > i think. I would be happy if FreeBSD had something similar so it > > > doesn't have to be very live or accurate. > > > > > > Thank you in advance for any info or hints. > > > > I'm more after a programming API for this and when i search the web all= i > > find is people saying it cannot be done on FreeBSD in userspace, yet. > > > > Solaris and Linux can do it but FreeBSD doesn't have this in user space= .. > > FreeBSD can and does. See the kvm_getprocs manpage, and take a look at > /usr/src/bin/ps/ps.c or /usr/src/usr.bin/top/machine.c to see how it's > used. > > > Is anyone working on it, what is the status? Will it be part of SMPng? > > SMPng went into FeeeBSD 5.0.. you must be reading some old mailing list > archives :) > > -- > Dan Nelson > dnelson@allantgroup.com > _______________________________________________ > freebsd-smp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-smp > To unsubscribe, send any mail to "freebsd-smp-unsubscribe@freebsd.org" > --=20 Med v=E4nliga h=E4lsningar Stefan Midjich aka nocturnal [SWEHACK] http://swehack.se _______________________________________________ freebsd-smp@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-smp To unsubscribe, send any mail to "freebsd-smp-unsubscribe@freebsd.org"
文章代碼(AID): #1A9GPl00 (FB_smp)
討論串 (同標題文章)
文章代碼(AID): #1A9GPl00 (FB_smp)