From: stefano <st....@gm...> - 2008-01-29 17:27:38
|
Currently our statistics (in the window statusbar) are defined in the following way: Time: seconds from the startup of the program (refreshed every 5 sec) Peers: total number of "live peers" in the simulation Sessions: total number of sessions of "live peers" in the overlay (so 2 peers => 1 session for each peer = 2 sessions) Packets sents: total packets sents by all "live peers" for all current sessions Received: total packets received by all "live peers" for all current sessions So, peers, sessions, packets sents and received are not cumulative but this data represents only the "current state of the overlay", because we want to know how much traffic is produced by the active peers. If you need cumulative data it must be implemented: - If you need a fast way to count peers probably you can write to the log file and then doing "grep" in the logfile - if you need cumulative counters for packets you have to modify gtk_statusbar_update in gsim-sipdht2.c and made counter variables static. Cheers, Stefano 2008/1/29, Oredope, Adetola <ao...@es...>: > > Thanks a lot for your quick response. > > > > I will like your help in defining some parameters in the simulation and > they are as follows > > > > *Time:* The time the overlay has been running for? > > *Peers:* The Amount of peers in the overlay? > > *Sessions:* The amount of active sessions in the overlay? (I discovered > that when there a just 2 peers there are also 2 sessions, why is this so?) > > *Packets sent:* Is this the total amount of packet sent in the overlay or > is it by the bootstrap (1st ) peer ? if it the total amount of packets is > there a way narrowing down the average ammont of packets sent by each peer > > *Received:* Same question as sent > > > > I look forward to hearing from you. > > > > Thanks a lot once again for your help. > > > > Regards, > > > > Tola > > > > > > *From:* stefano [mailto:st....@gm...] > *Sent:* 29 January 2008 12:47 > *To:* Oredope, Adetola > *Cc:* sip...@li... > *Subject:* Re: [Sipdht-devel] results for gsim-sipdht2 > > > > If you mean how to log libxpp and libsipdht2 messages to a file > it's not implemented, however you can add yourself the following code > somewhere in gsim-sipdht2.c > > #include <sofia-sip/su_log.h> > extern su_log_t xpp_log[]; > extern su_log_t sipdht_log[]; > > static > void log_handler(void *logarg, char const *format, va_list ap) > { > static FILE *log = NULL; > > if (!log) > log = fopen("/tmp/sim.log", "a+"); > vfprintf(log, format, ap); > fflush(log); > } > > then in main() just before gtk_main() add: > > su_log_set_level(xpp_log, 8); > su_log_redirect(xpp_log, log_handler, NULL); > su_log_set_level(sipdht_log, 8); > su_log_redirect(sipdht_log, log_handler, NULL); > > Ciao, > Stefano > > 2008/1/29, Oredope, Adetola <ao...@es...>: > > I know I have asked this earlier on but I was kind of unclear > > > > I will like to find out if there is way I can collect the results of the > simulator into a file or out put it to command line. > > > > Regards > > > > Adetola Oredope > > > > Pervasive Networks and Services Research Group, > > University of Essex, Department of Electronic Systems Engineering, > > Wivenhoe Park, Colchester > > CO4 3SQ > > United Kingdom > > http://www.essex.ac.uk/ese/research/pervasivenetworks/ > > > > --- Never walk away from someone who deserves help; your hand is God's > hand for that person. > > > ------------------------------------------------------------------------- > 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/ > _______________________________________________ > Sipdht-devel mailing list > Sip...@li... > https://lists.sourceforge.net/lists/listinfo/sipdht-devel > > > |