Mladen Nikitovic wrote: > Hi, > > I would like to observe the number of runnable threads in a multiprocessor > system. I have a peice code that runs in user mode so I'm looking for a > function that can provide me with the current value of disp_nrunnable in each > cpu structure. > > I could not find anything close to this when I searched the source browser on > opensolaris.org. The best "hit" was probably the function get_cpu that would > give me the cpu-struct, which in turn can provide me with the disp structure. > However, get_cpu cannot be reached from a userland so I'm basically stuck. > > Does anyone know how I can get hold of disp_nrunnable or any variable that > tells me how many threads are currently ready? > > I cannot use dtrace in this particular case so that is not an option. > If you just want to observe a snapshot of this, how about mdb?
[EMAIL PROTECTED] echo "::walk cpu |::print cpu_t cpu_disp |::print disp_t disp_nrunnable" | mdb -k disp_nrunnable = 0 disp_nrunnable = 0 disp_nrunnable = 0 disp_nrunnable = 0 -Eric _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code