From 2602490a2d0d81a3f37c65aae5973a9aae21dd21 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Fri, 3 May 2013 13:53:16 +0000 Subject: [PATCH] From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8626 : It is useful to see not only the minimal, maximum and average service time for RPC procedures, but also the total time these took. From me: add it to the man page. svn path=/trunk/; revision=49144 --- doc/tshark.pod | 6 ++++-- ui/cli/tap-rpcstat.c | 11 ++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/tshark.pod b/doc/tshark.pod index b1b0bb5101..4dc8714dc0 100644 --- a/doc/tshark.pod +++ b/doc/tshark.pod @@ -1301,8 +1301,10 @@ This option can only be used once on the command line. =item B<-z> rpc,srt,I,I[,I] -Collect call/reply SRT (Service Response Time) data for I/I. Data collected -is number of calls for each procedure, MinSRT, MaxSRT and AvgSRT. +Collect call/reply SRT (Service Response Time) data for I/I. +Data collected is the number of calls for each procedure, MinSRT, MaxSRT, +AvgSRT, and the total time taken for each procedure. + Example: B<-z rpc,srt,100003,3> will collect data for NFS v3. diff --git a/ui/cli/tap-rpcstat.c b/ui/cli/tap-rpcstat.c index 9d75ff9842..9a34faec7b 100644 --- a/ui/cli/tap-rpcstat.c +++ b/ui/cli/tap-rpcstat.c @@ -197,10 +197,10 @@ rpcstat_draw(void *prs) guint32 i; guint64 td; printf("\n"); - printf("=======================================================\n"); + printf("==================================================================\n"); printf("%s Version %d SRT Statistics:\n", rs->prog, rs->version); printf("Filter: %s\n",rs->filter?rs->filter:""); - printf("Procedure Calls Min SRT Max SRT Avg SRT\n"); + printf("Procedure Calls Min SRT Max SRT Avg SRT Total\n"); for(i=0;inum_procedures;i++){ if(rs->procedures[i].num==0){ continue; @@ -209,15 +209,16 @@ rpcstat_draw(void *prs) td = ((guint64)(rs->procedures[i].tot.secs)) * NANOSECS_PER_SEC + rs->procedures[i].tot.nsecs; td = ((td / rs->procedures[i].num) + 500) / 1000; - printf("%-15s %6d %3d.%06d %3d.%06d %3" G_GINT64_MODIFIER "u.%06" G_GINT64_MODIFIER "u\n", + printf("%-15s %6d %3d.%06d %3d.%06d %3" G_GINT64_MODIFIER "u.%06" G_GINT64_MODIFIER "u %3d.%06d\n", rs->procedures[i].proc, rs->procedures[i].num, (int)(rs->procedures[i].min.secs),(rs->procedures[i].min.nsecs+500)/1000, (int)(rs->procedures[i].max.secs),(rs->procedures[i].max.nsecs+500)/1000, - td/MICROSECS_PER_SEC, td%MICROSECS_PER_SEC + td/MICROSECS_PER_SEC, td%MICROSECS_PER_SEC, + (int)(rs->procedures[i].tot.secs),(rs->procedures[i].tot.nsecs+500)/1000 ); } - printf("=======================================================\n"); + printf("==================================================================\n"); } static guint32 rpc_program=0;