Fix wrong bps type case in cvs output. Fix opbs ipbs typos
This commit is contained in:
parent
3039c97c29
commit
25138d83f6
@ -363,7 +363,6 @@ profile_param_info_t **list = &profile_list;
|
||||
|
||||
profile_list = NULL;
|
||||
while ( ( fgets(line, 512, stdin) != NULL )) {
|
||||
LogInfo("Process line '%s'\n", line);
|
||||
line[511] = '\0';
|
||||
|
||||
if ( *list == NULL )
|
||||
@ -387,6 +386,7 @@ profile_param_info_t **list = &profile_list;
|
||||
// <profilegroup>#<profilename>#<profiletype>#<channelname>#<channel_sourcelist>
|
||||
p = strchr(line, '\n');
|
||||
if ( p ) *p = '\0';
|
||||
LogInfo("Process line '%s'\n", line);
|
||||
|
||||
q = line;
|
||||
p = strchr(q, '#');
|
||||
@ -527,12 +527,11 @@ int main( int argc, char **argv ) {
|
||||
unsigned int num_channels, compress;
|
||||
struct stat stat_buf;
|
||||
profile_param_info_t *profile_list;
|
||||
char *rfile, *ffile, *filename, *Mdirs, *tstring;
|
||||
char *rfile, *ffile, *filename, *Mdirs;
|
||||
char *profile_datadir, *profile_statdir, *nameserver;
|
||||
int c, syntax_only, subdir_index, stdin_profile_params, do_xstat;
|
||||
time_t tslot;
|
||||
|
||||
tstring = NULL;
|
||||
profile_datadir = NULL;
|
||||
profile_statdir = NULL;
|
||||
Mdirs = NULL;
|
||||
|
12
bin/nfstat.c
12
bin/nfstat.c
@ -1355,10 +1355,10 @@ struct tm *tbuff;
|
||||
duration += ((double)StatData->msec_last - (double)StatData->msec_first) / 1000.0;
|
||||
|
||||
if ( duration != 0 ) {
|
||||
in_pps = (uint32_t)((double)StatData->counter[INPACKETS] / duration);
|
||||
in_bps = (uint32_t)((double)(8 * StatData->counter[INBYTES]) / duration);
|
||||
out_pps = (uint32_t)((double)StatData->counter[OUTPACKETS] / duration);
|
||||
out_bps = (uint32_t)((double)(8 * StatData->counter[OUTBYTES]) / duration);
|
||||
in_pps = (uint64_t)((double)StatData->counter[INPACKETS] / duration);
|
||||
in_bps = (uint64_t)((double)(8 * StatData->counter[INBYTES]) / duration);
|
||||
out_pps = (uint64_t)((double)StatData->counter[OUTPACKETS] / duration);
|
||||
out_bps = (uint64_t)((double)(8 * StatData->counter[OUTBYTES]) / duration);
|
||||
} else {
|
||||
in_pps = in_bps = 0;
|
||||
out_pps = out_bps = 0;
|
||||
@ -1774,9 +1774,9 @@ int32_t i, j, hash_num, order_index;
|
||||
|
||||
if ( cvs_output ) {
|
||||
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
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user