On 11/10/06, Michael Shapiro <mws at zion.eng.sun.com> wrote: > > > Hello everyone:) > > > > I've got a couple of questions and I'll be very thankful if someone can > > shed a light on these. > > > > 1) For example, I want to print proc_t structure of process "bc" > > I tried the following variant but stucked at the this stage > > > > ::walk proc p |::print proc_t p_user.u_comm > > > > After that I've got result : > > ... > > p_user.u_comm = [ "ttymon" ] > > p_user.u_comm = [ "bc" ] > > .... > > > > What dcmd should I use to search for "bc" and then get the pointer to its > > proc_t structure back? > > Or I have to use "|:: print -a proc_t p_user.u_comm" and then use sed or > > awk to extract address and then pipe it again? > > > > I think of using then ::eval<p=K to get back to "p" variable after the > > search. > > You can use the ::pgrep dcmd for this purpose: it will give you back the > same type of output as ::ps but only for the matching names. Unfortunately there in no pgrep dcmd in Solaris 9's version of mdb.
> OS: Solaris 9 -- Ilya Voronin <ivoronin at gmail.com> http://blog.curthread.org