From: Sanjay H A <san...@ly...> - 2008-01-30 05:52:41
|
Hello Sir I got the point. Then I will insert persuite routines in my application to measure performance periodically. But I am afraid about the test I did with perfsuite sampler program.The thing I noticed is, inside busyloop(), if I insert printf statement or some sleep statement , the performance data will not be printed on standard output periodically. Any solutions for that? Thanx Regards Sanjay ---------[ Received Mail Content ]---------- Subject : Re: [PerfSuite-users] Periodic measurement Date : Tue, 29 Jan 2008 11:12:05 -0600 From : Rick Kufrin <rk...@nc...> To : Sanjay H A <san...@ly...> Cc : per...@li... Sanjay, PerfSuite uses a self-monitoring (first person) model, rather than one that monitors external processes/threads. I'm afraid the style of measurement you're describing is not likely to be available through PerfSuite. There may be other tools available out there that can do the sort of thing you're interested in, however. There are certainly tools that can "attach" to external processes, but the tricky part is obtaining the periodic sampling as the process runs. Rick Sanjay H A wrote: > Hello Sir > > I tested sampler program, it worked. > > 1. One thing I noticed is, inside busyloop(), if I insert printf statement or some sleep statement , the performance data will not > be printed on standard output. May I know the reason? > > 2. If I want to run some external program instead of busy loop (Using system command). The performance data will not be printed . sample code given below > > int main(int argc, char **argv) > { > process_options(argc, argv); > > setup_pshwpc(); > > setup_alarm(seconds); > > // busyloop(); > system("../loop 10000 >> temp "); // calling my program > shutdown_pshwpc(write_results); > > exit(0); > } > > What I assumed is, PID of the process will be different from the parent process (Thats why it is not printing the performance data) Is it true? Is there any solution for this type of problem. > > My point is I dont want to alter the code of my application. Instead I want to call my application from sampler program. I want to periodicaly measure the performance parameters ! > of my application > > Thanx > Regards > > Sanjay > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > > > > > > ---------[ Received Mail Content ]---------- > > Subject : Re: [PerfSuite-users] Periodic measurement > > Date : Sat, 26 Jan 2008 10:26:54 -0600 (CST) > > From : Rick Kufrin > > To : Sanjay H A > > Cc : per...@li... > > > Sanjay, > > This type of periodic sampling is not supported directly by the psrun > command. It can be done via the PerfSuite API, however output format is > up to your own code. There is an example contained in the PerfSuite > distribution called "sampler" that shows how to set up interval timers > that trigger a read of the current performance data values. You can find > the example in the directory $PREFIX/share/perfsuite/examples/sampler > (where $PREFIX is the value supplied to the configure option --prefix, or > /usr/local if nothing was supplied). > > Rick > > On Sat, 26 Jan 2008, Sanjay H A wrote: > > >> Hello Sir >> Thanx for informative reply. >> After commenting the events in the XML file >> that are not supported on my system, psrun worked. >> >> I want to measure >> performance events periodicaly for an long running application. Means If >> I have application runs for 1 hour, I want to measure these performace >> parameters for every 5 minutes.Is there any options in perfsuite? What I >> noticed is, if I run application with psrun, it creates xml file when >> the application finishes. >> >> Thanx again >> >> Regards >> Sanjay >> >> >> >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > PerfSuite-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfsuite-users > > |