Fix wrong bps type case in cvs output. Fix opbs ipbs typos

This commit is contained in:
Peter Haag 2016-06-05 11:27:35 +02:00
parent 3039c97c29
commit 25138d83f6
2 changed files with 8 additions and 9 deletions

View File

@ -363,7 +363,6 @@ profile_param_info_t **list = &profile_list;
profile_list = NULL; profile_list = NULL;
while ( ( fgets(line, 512, stdin) != NULL )) { while ( ( fgets(line, 512, stdin) != NULL )) {
LogInfo("Process line '%s'\n", line);
line[511] = '\0'; line[511] = '\0';
if ( *list == NULL ) if ( *list == NULL )
@ -387,6 +386,7 @@ profile_param_info_t **list = &profile_list;
// <profilegroup>#<profilename>#<profiletype>#<channelname>#<channel_sourcelist> // <profilegroup>#<profilename>#<profiletype>#<channelname>#<channel_sourcelist>
p = strchr(line, '\n'); p = strchr(line, '\n');
if ( p ) *p = '\0'; if ( p ) *p = '\0';
LogInfo("Process line '%s'\n", line);
q = line; q = line;
p = strchr(q, '#'); p = strchr(q, '#');
@ -527,12 +527,11 @@ int main( int argc, char **argv ) {
unsigned int num_channels, compress; unsigned int num_channels, compress;
struct stat stat_buf; struct stat stat_buf;
profile_param_info_t *profile_list; profile_param_info_t *profile_list;
char *rfile, *ffile, *filename, *Mdirs, *tstring; char *rfile, *ffile, *filename, *Mdirs;
char *profile_datadir, *profile_statdir, *nameserver; char *profile_datadir, *profile_statdir, *nameserver;
int c, syntax_only, subdir_index, stdin_profile_params, do_xstat; int c, syntax_only, subdir_index, stdin_profile_params, do_xstat;
time_t tslot; time_t tslot;
tstring = NULL;
profile_datadir = NULL; profile_datadir = NULL;
profile_statdir = NULL; profile_statdir = NULL;
Mdirs = NULL; Mdirs = NULL;

View File

@ -1355,10 +1355,10 @@ struct tm *tbuff;
duration += ((double)StatData->msec_last - (double)StatData->msec_first) / 1000.0; duration += ((double)StatData->msec_last - (double)StatData->msec_first) / 1000.0;
if ( duration != 0 ) { if ( duration != 0 ) {
in_pps = (uint32_t)((double)StatData->counter[INPACKETS] / duration); in_pps = (uint64_t)((double)StatData->counter[INPACKETS] / duration);
in_bps = (uint32_t)((double)(8 * StatData->counter[INBYTES]) / duration); in_bps = (uint64_t)((double)(8 * StatData->counter[INBYTES]) / duration);
out_pps = (uint32_t)((double)StatData->counter[OUTPACKETS] / duration); out_pps = (uint64_t)((double)StatData->counter[OUTPACKETS] / duration);
out_bps = (uint32_t)((double)(8 * StatData->counter[OUTBYTES]) / duration); out_bps = (uint64_t)((double)(8 * StatData->counter[OUTBYTES]) / duration);
} else { } else {
in_pps = in_bps = 0; in_pps = in_bps = 0;
out_pps = out_bps = 0; out_pps = out_bps = 0;
@ -1774,9 +1774,9 @@ int32_t i, j, hash_num, order_index;
if ( cvs_output ) { if ( cvs_output ) {
if ( order_mode[order_index].inout == OUT ) if ( order_mode[order_index].inout == OUT )
printf("ts,te,td,pr,val,fl,flP,opkt,opktP,obyt,obytP,opps,opbs,obpp\n"); printf("ts,te,td,pr,val,fl,flP,opkt,opktP,obyt,obytP,opps,obps,obpp\n");
else else
printf("ts,te,td,pr,val,fl,flP,ipkt,ipktP,ibyt,ibytP,ipps,ipbs,ibpp\n"); printf("ts,te,td,pr,val,fl,flP,ipkt,ipktP,ibyt,ibytP,ipps,ibps,ibpp\n");
} }
j = numflows - topN; j = numflows - topN;