Changeset 4ba74cc
- Timestamp:
- 10/28/08 12:51:53 (14 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- 37f2a9b
- Parents:
- 530cef6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/tracemerge/tracemerge.c
r34e22d1 r4ba74cc 12 12 "%s flags outputuri traceuri [traceuri...]\n" 13 13 "-i [interfaces_per_input] --set-interface [interfaces_per_input]\n" 14 " Each trace is allocated an interface. Default leaves this flag as read from the original traces, if appropriate\n" 14 " Each trace is allocated an interface. Default leaves this flag as\n" 15 " read from the original traces, if appropriate\n" 15 16 "-u --unique-packets Discard duplicate packets\n" 17 "-z [level] --compression [level]\n" 18 " Compression level\n" 16 19 "-H --libtrace-help Print libtrace runtime documentation\n" 17 20 ,argv0); … … 38 41 uint64_t last_ts=0; 39 42 struct sigaction sigact; 43 int compression=6; 40 44 41 45 while (1) { … … 45 49 { "unique-packets", 0, 0, 'u' }, 46 50 { "libtrace-help", 0, 0, 'H' }, 51 { "compression", 2, 0, 'z' }, 47 52 { NULL, 0, 0, 0 }, 48 53 }; 49 54 50 int c=getopt_long(argc, argv, "i::uH ",55 int c=getopt_long(argc, argv, "i::uHz::", 51 56 long_options, &option_index); 52 57 … … 66 71 exit(1); 67 72 break; 73 case 'z': 74 if (optarg) 75 compression = atoi(optarg); 76 else 77 compression = 6; 78 if (compression<0 || compression>9) { 79 fprintf(stderr,"Compression level must be between 0 and 9\n"); 80 usage(argv[0]); 81 } 82 break; 68 83 default: 69 84 fprintf(stderr,"unknown option: %c\n",c); … … 82 97 return 1; 83 98 } 99 100 if (trace_config_output(output, TRACE_OPTION_OUTPUT_COMPRESS, &compression) == -1) { 101 trace_perror_output(output,"Unable to set compression level"); 102 } 103 84 104 if (trace_start_output(output)==-1) { 85 105 trace_perror_output(output,"trace_start_output");
Note: See TracChangeset
for help on using the changeset viewer.