Sun.betty
2007-Mar-26 08:18 UTC
[dtrace-discuss] How to use dtrace to see process is doing what?that process has ran so long time.
Hi! everybody here: How are you! use ps command can see some processes has ran so long time (what are they doing) how to know what are they doing . why are they tie up all along. I am new to dtrace.I have no idea about what probe I should use on it. Please give me some tips or prompt. Thanks very much.I am eager to wait it. $ ps -ef | grep test test 3901 3756 0 Mar 23 ? 21:08 /data/test/pgsql/bin/postmaster -i -p 7777 test 3898 3756 0 Mar 23 ? 72:21 /data/test/pgsql/bin/postmaster -i -p 7777 --------------------------------- ????????-3.5G???20M??? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070326/ce7971ac/attachment.html>
Rayson Ho
2007-Mar-26 08:41 UTC
[dtrace-discuss] How to use dtrace to see process is doing what?that process has ran so long time.
The really useful book: http://developers.sun.com/solaris/articles/solaris_perftools.html And specifically this chapter: http://developers.sun.com/solaris/articles/solaris_performanceandtools_ch3_processes.pdf truss(1), pstack(1), and dtrace''s PID provider are useful... Rayson On 3/26/07, Sun.betty <alanxzq at yahoo.com.cn> wrote:> Hi! everybody here: > How are you! > use ps command can see some processes has ran so long time (what are they > doing) > how to know what are they doing . why are they tie up all along. > I am new to dtrace.I have no idea about what probe I should use on it. > Please give me some tips or prompt. Thanks very much.I am eager to wait it. > $ ps -ef | grep test > test 3901 3756 0 Mar 23 ? 21:08 > /data/test/pgsql/bin/postmaster -i -p 7777 > test 3898 3756 0 Mar 23 ? 72:21 > /data/test/pgsql/bin/postmaster -i -p 7777 > > > ________________________________ > ????????-3.5G???20M??? > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >
Tom Whitten
2007-Mar-26 14:59 UTC
[dtrace-discuss] How to use dtrace to see process is doing what?that process has ran so long time.
Also there is sotruss(1) to trace calls into shared libraries. tom Rayson Ho writes:> The really useful book: > http://developers.sun.com/solaris/articles/solaris_perftools.html > > And specifically this chapter: > http://developers.sun.com/solaris/articles/solaris_performanceandtools_ch3_processes.pdf > > truss(1), pstack(1), and dtrace''s PID provider are useful... > > Rayson > > > > > On 3/26/07, Sun.betty <alanxzq at yahoo.com.cn> wrote: > > Hi! everybody here: > > How are you! > > use ps command can see some processes has ran so long time (what are they > > doing) > > how to know what are they doing . why are they tie up all along. > > I am new to dtrace.I have no idea about what probe I should use on it. > > Please give me some tips or prompt. Thanks very much.I am eager to wait it. > > $ ps -ef | grep test > > test 3901 3756 0 Mar 23 ? 21:08 > > /data/test/pgsql/bin/postmaster -i -p 7777 > > test 3898 3756 0 Mar 23 ? 72:21 > > /data/test/pgsql/bin/postmaster -i -p 7777 > > > > > > ________________________________ > > ????????????????-3.5G??????20M?????? > > > > > > _______________________________________________ > > dtrace-discuss mailing list > > dtrace-discuss at opensolaris.org > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
Jeremy Harris
2007-Mar-26 19:09 UTC
[dtrace-discuss] How to use dtrace to see process is doing what?that process has ran so long time.
Tom Whitten wrote:>>> $ ps -ef | grep test >>> test 3901 3756 0 Mar 23 ? 21:08 >>> /data/test/pgsql/bin/postmaster -i -p 7777 >>> test 3898 3756 0 Mar 23 ? 72:21 >>> /data/test/pgsql/bin/postmaster -i -p 7777In addition to all the suggestions for tools, google is good for guessing at what an application is. In this case I''d suggest it is Postgresql, a database. Having it running for a long (calendar) time and using a fair amount of (cpu) time isn''t at all unexpected, depending on what the system is used for. Cheers, Jeremy
Jim Mauro
2007-Mar-26 19:17 UTC
[dtrace-discuss] How to use dtrace to see process is doing what?that process has ran so long time.
Before you start with DTrace, use prstat. prstat -Lmp <PID_of_target_process> Watch the microstates as reported by prstat (man prstat(1) to see what they are). This is the easiest first step for determining where the threads in a process are spending time (executing is usr, executing in sys, sleeping, etc). Once you have that information, you can figure out the next move: - If CPU bound in usr or sys, dtrace to get an execution profile - if sleeping, truss to determine what the threads are sleeping on, and pstack or dtrace to determine the path - If waiting for user locks, plockstat /jim Sun.betty wrote:> Hi! everybody here: > How are you! > use ps command can see some processes has ran so long time (what are > they doing) > how to know what are they doing . why are they tie up all along. > I am new to dtrace.I have no idea about what probe I should use on it. > Please give me some tips or prompt. Thanks very much.I am eager to > wait it. > $ ps -ef | grep test > test 3901 3756 0 Mar 23 ? 21:08 /data/test/pgsql/bin/postmaster -i -p 7777 > test 3898 3756 0 Mar 23 ? 72:21 /data/test/pgsql/bin/postmaster -i -p 7777 > > ------------------------------------------------------------------------ > ????????-3.5G???20M??? <http://cn.mail.yahoo.com> > ------------------------------------------------------------------------ > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >