Commit bea9e9ef authored by Olav Kvittem's avatar Olav Kvittem
Browse files

last line not displayed on -last. print column adjustment

parent 9916e6f0
...@@ -46,7 +46,7 @@ my ($rtmp,$period,$last,$debug,$swfurl,$pageurl,$flash_version,$reconnect); ...@@ -46,7 +46,7 @@ my ($rtmp,$period,$last,$debug,$swfurl,$pageurl,$flash_version,$reconnect);
require "newgetopt.pl"; require "newgetopt.pl";
@opts=('list', 'man','fullformat', 'net', 'rtp', 'mpeg', 'pcap', 'crude', 'bins=s', 'log', 'nperiod=s', 'period=s', 'last=s', 'packets=s', 'src=s', 'flow_key=s', 'flow_no=s', 'flow_min=s', 'nohead', 'dump=s', 'format=s', 'id=s', 'sum=s', 'ttl', 'rtt=s', 'codec=s', 'log', 'verbose', 'v', 'h', 'debug', 'av','xml=s', 'rtmp','tcp', 'port=s','swfurl=s','pageurl=s','flashversion=s','new','q','exclude=s','report=s', 'filename','test','ipv6','p=s','name=s','tcp_t','wait=s', 'version'); @opts=('list', 'man', 'net', 'rtp', 'mpeg', 'pcap', 'crude', 'bins=s', 'log', 'nperiod=s', 'period=s', 'last=s', 'packets=s', 'src=s', 'flow_key=s', 'flow_no=s', 'flow_min=s', 'nohead', 'dump=s', 'format=s', 'id=s', 'sum=s', 'ttl', 'rtt=s', 'codec=s', 'log', 'verbose', 'v', 'h', 'debug', 'av','xml=s', 'rtmp','tcp', 'port=s','swfurl=s','pageurl=s','flashversion=s','new','q','exclude=s','report=s', 'filename','test','ipv6','p=s','name=s','tcp_t','wait=s', 'version');
&NGetOpt(@opts) || die pod2usage(1); &NGetOpt(@opts) || die pod2usage(1);
...@@ -180,6 +180,7 @@ $SIG{ALRM} = sub { ...@@ -180,6 +180,7 @@ $SIG{ALRM} = sub {
if (! $endstream) { # Changed logic 20120706:1007 CDT if (! $endstream) { # Changed logic 20120706:1007 CDT
$endstream=1; $endstream=1;
#ok &display_stats; #ok &display_stats;
&display_stats;
} }
# die "End after alarm\n"; # die "End after alarm\n";
# return(0); # return(0);
...@@ -1907,7 +1908,7 @@ sub print_out { ...@@ -1907,7 +1908,7 @@ sub print_out {
#} #}
#print " flu- pcr_jitter(ms) PCR_gap (ms) " if $opt_mpeg; #print " flu- pcr_jitter(ms) PCR_gap (ms) " if $opt_mpeg;
print " " if $opt_new; print " " if $opt_new;
print " load(bps) source\n"; print " burst(bps) source\n";
printf "%-8s %6s %6s %4s%4s %4s %4s %4s %6s %4s %4s %4s %4s", printf "%-8s %6s %6s %4s%4s %4s %4s %4s %6s %4s %4s %4s %4s",
"time","span", "setup", "time","span", "setup",
"numb ", "avg", "sdv", "min", "max", "numb ", "avg", "sdv", "min", "max",
...@@ -1936,7 +1937,7 @@ sub print_out { ...@@ -1936,7 +1937,7 @@ sub print_out {
} }
#print " " if @opt_new; #print " " if @opt_new;
#printf " %4s %5s %5s %5s", "avg", "sdv", "min", "max" if $opt_mpeg; #printf " %4s %5s %5s %5s", "avg", "sdv", "min", "max" if $opt_mpeg;
printf " %5s %5s %5s %5s %-15s\n", printf " %5s %5s %5s %5s %-15s\n",
"avg", "1s", "100ms", "sdv", $media; "avg", "1s", "100ms", "sdv", $media;
} }
} }
...@@ -2053,7 +2054,7 @@ sub print_out { ...@@ -2053,7 +2054,7 @@ sub print_out {
} else { } else {
print "gap(ms) " ; print "gap(ms) " ;
} }
print "thrust(bps) source \n"; print "burst(bps) source \n";
if($opt_mpeg) { if($opt_mpeg) {
printf "%-8s %8s %4s %4s %4s ", printf "%-8s %8s %4s %4s %4s ",
...@@ -2065,7 +2066,7 @@ sub print_out { ...@@ -2065,7 +2066,7 @@ sub print_out {
} }
if($opt_mpeg) { if($opt_mpeg) {
printf " %5s %5s %5s %5s", printf " %4s %4s %4s %4s",
"avg", "sdv", "avg", "sdv"; #pcr and "avg", "sdv", "avg", "sdv"; #pcr and
} }
...@@ -2108,8 +2109,8 @@ sub print_out { ...@@ -2108,8 +2109,8 @@ sub print_out {
&lesbar( (10**3) * sdv($pcr_stats{$f}{$TS}{'num'}, &lesbar( (10**3) * sdv($pcr_stats{$f}{$TS}{'num'},
$pcr_stats{$f}{$TS}{'pcr_jitter_sum'}, $pcr_stats{$f}{$TS}{'pcr_jitter_sum'},
$pcr_stats{$f}{$TS}{'pcr_jitter_square'})), $pcr_stats{$f}{$TS}{'pcr_jitter_square'})),
$dwell_avg, $dwell_avg,
$dwell_sdv, $dwell_sdv,
#&lesbar( (10**3) * avg($pts_stats{$f}{$TS}{'dwell_sum'}, $pts_stats{$f}{$TS}{'num'})), #&lesbar( (10**3) * avg($pts_stats{$f}{$TS}{'dwell_sum'}, $pts_stats{$f}{$TS}{'num'})),
#&lesbar( (10**3) * sdv($pts_stats{$f}{$TS}{'num'}, #&lesbar( (10**3) * sdv($pts_stats{$f}{$TS}{'num'},
# $pts_stats{$f}{$TS}{'dwell_sum'}, # $pts_stats{$f}{$TS}{'dwell_sum'},
...@@ -2131,15 +2132,15 @@ sub print_out { ...@@ -2131,15 +2132,15 @@ sub print_out {
} else { } else {
printf " %4d %4.1f", $sumbyte{$f}/$n, sdv($n, $sumbyte{$f}, $ssbyte{$f}); printf " %4d %4.1f", $sumbyte{$f}/$n, sdv($n, $sumbyte{$f}, $ssbyte{$f});
} }
printf " %5s %4.1f %4.1f %5s ",@jitterstat; printf " %5s %4.1f %4.1f %4s ",@jitterstat;
if ($opt_rtp){ if ($opt_rtp){
printf " %4.1f", $mos; printf " %4.1f", $mos;
} }
printf " %5s %5s %5s %s ", printf " %5s %5s %5s %s ",
&lesbar( avg($sumbyte{$f}*8, $span)), &lesbar( avg($sumbyte{$f}*8, $span)),
&lesbar($maxbps{$f}), &lesbar($maxbps{$f}),
&lesbar($max100ms{$f}), &lesbar($max100ms{$f}),
$source; $source;
print "\n"; print "\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment