Changeset 99ee456 for tools/traceends
- Timestamp:
- 12/03/18 13:30:46 (2 years ago)
- Branches:
- develop
- Children:
- e86a0c6
- Parents:
- 50e9c6b
- Location:
- tools/traceends
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/traceends/traceends.cc
r8e11beb r99ee456 45 45 #include <map> 46 46 47 #include "libtrace_parallel.h" 48 47 49 typedef struct end_counter { 48 50 uint64_t src_bytes; … … 87 89 }; 88 90 89 int mode = MODE_IPV4; 90 91 IP4EndMap ipv4; 92 IP6EndMap ipv6; 93 MacEndMap mac; 91 92 typedef struct traceend_global { 93 int mode; 94 int threads; 95 int track_source; 96 int track_dest; 97 } global_t; 98 99 typedef struct traceend_local { 100 union { 101 IP4EndMap *ipv4; 102 IP6EndMap *ipv6; 103 MacEndMap *mac; 104 } map; 105 } local_t; 106 107 typedef struct traceend_result_local { 108 union { 109 IP4EndMap *ipv4; 110 IP6EndMap *ipv6; 111 MacEndMap *mac; 112 } map; 113 int threads_reported; 114 } result_t; 115 116 libtrace_t *currenttrace = NULL; 94 117 95 118 static int usage(char *argv0) … … 104 127 } 105 128 106 volatile int done=0;107 108 129 static void cleanup_signal(int sig) 109 130 { 110 131 (void)sig; 111 done=1; 112 trace_interrupt(); 113 } 114 115 static end_counter_t *create_counter() { 132 if (currenttrace) { 133 trace_pstop(currenttrace); 134 } 135 } 136 137 static void *cb_starting(libtrace_t *trace UNUSED, libtrace_thread_t *t UNUSED, 138 void *global) { 139 140 global_t *glob = (global_t *)global; 141 local_t *local = (local_t *)malloc(sizeof(local_t)); 142 143 switch(glob->mode) { 144 case MODE_IPV4: 145 local->map.ipv4 = new IP4EndMap(); 146 break; 147 case MODE_IPV6: 148 local->map.ipv6 = new IP6EndMap(); 149 break; 150 case MODE_MAC: 151 local->map.mac = new MacEndMap(); 152 break; 153 } 154 return local; 155 156 } 157 158 static void cb_stopping(libtrace_t *trace, libtrace_thread_t *t, 159 void *global UNUSED, void *tls) { 160 161 local_t *local = (local_t *)tls; 162 libtrace_generic_t gen; 163 164 gen.ptr = local; 165 trace_publish_result(trace, t, 0, gen, RESULT_USER); 166 } 167 168 static inline end_counter_t *create_counter() { 116 169 end_counter_t *c = (end_counter_t *)malloc(sizeof(end_counter_t)); 117 170 … … 127 180 } 128 181 129 static char *mac_string(mac_addr_t m, char *str) { 130 131 182 static inline char *mac_string(mac_addr_t m, char *str) { 132 183 snprintf(str, 80, "%02x:%02x:%02x:%02x:%02x:%02x", 133 184 m.addr[0], m.addr[1], m.addr[2], m.addr[3], m.addr[4], … … 136 187 } 137 188 138 static void dump_mac_map() { 139 MacEndMap::iterator it; 140 char str[80]; 141 char timestr[80]; 142 struct tm *tm; 143 time_t t; 144 145 for (it = mac.begin(); it != mac.end(); it++) { 146 t = (time_t)(it->second->last_active); 147 tm = localtime(&t); 148 strftime(timestr, 80, "%d/%m,%H:%M:%S", tm); 149 printf("%18s %16s %16" PRIu64 " %16" PRIu64 " %16" PRIu64 " %16" PRIu64 " %16" PRIu64 " %16" PRIu64 "\n", 150 mac_string(it->first, str), 151 timestr, 152 it->second->src_pkts, 153 it->second->src_bytes, 154 it->second->src_pbytes, 155 it->second->dst_pkts, 156 it->second->dst_bytes, 157 it->second->dst_pbytes); 158 } 159 } 160 161 static void dump_ipv4_map() { 189 static inline void combine_counters(end_counter_t *c, end_counter_t *c2) { 190 191 c->src_pkts += c2->src_pkts; 192 c->src_bytes += c2->src_bytes; 193 c->src_pbytes += c2->src_pbytes; 194 c->dst_pkts += c2->dst_pkts; 195 c->dst_bytes += c2->dst_bytes; 196 c->dst_pbytes += c2->dst_pbytes; 197 198 } 199 200 static void combine_mac_maps(MacEndMap *dst, MacEndMap *src) { 201 202 MacEndMap::iterator it; 203 MacEndMap::iterator found; 204 205 for (it = src->begin(); it != src->end(); it++) { 206 found = dst->find(it->first); 207 208 if (found == dst->end()) { 209 (*dst)[it->first] = it->second; 210 continue; 211 } 212 213 combine_counters(found->second, it->second); 214 free(it->second); 215 } 216 217 } 218 219 static void combine_ipv4_maps(IP4EndMap *dst, IP4EndMap *src) { 220 221 IP4EndMap::iterator it; 222 IP4EndMap::iterator found; 223 224 for (it = src->begin(); it != src->end(); it++) { 225 found = dst->find(it->first); 226 227 if (found == dst->end()) { 228 (*dst)[it->first] = it->second; 229 continue; 230 } 231 232 combine_counters(found->second, it->second); 233 free(it->second); 234 } 235 236 } 237 238 static void combine_ipv6_maps(IP6EndMap *dst, IP6EndMap *src) { 239 240 IP6EndMap::iterator it; 241 IP6EndMap::iterator found; 242 243 for (it = src->begin(); it != src->end(); it++) { 244 found = dst->find(it->first); 245 246 if (found == dst->end()) { 247 (*dst)[it->first] = it->second; 248 continue; 249 } 250 251 combine_counters(found->second, it->second); 252 free(it->second); 253 } 254 255 } 256 257 static void dump_ipv4_map(IP4EndMap *ipv4, bool destroy) { 162 258 IP4EndMap::iterator it; 163 259 struct in_addr in; … … 165 261 struct tm *tm; 166 262 time_t t; 167 for (it = ipv4 .begin(); it != ipv4.end(); it++) {263 for (it = ipv4->begin(); it != ipv4->end(); it++) { 168 264 in.s_addr = it->first; 169 265 t = (time_t)(it->second->last_active); … … 179 275 it->second->dst_bytes, 180 276 it->second->dst_pbytes); 181 } 182 } 183 184 static void dump_ipv6_map() { 277 if (destroy) { 278 free(it->second); 279 } 280 } 281 } 282 283 static void dump_ipv6_map(IP6EndMap *ipv6, bool destroy) { 185 284 IP6EndMap::iterator it; 186 285 struct in6_addr in; … … 190 289 time_t t; 191 290 192 for (it = ipv6 .begin(); it != ipv6.end(); it++) {291 for (it = ipv6->begin(); it != ipv6->end(); it++) { 193 292 in = it->first; 194 293 t = (time_t)(it->second->last_active); … … 204 303 it->second->dst_bytes, 205 304 it->second->dst_pbytes); 206 } 207 } 208 209 static void update_ipv6(libtrace_ip6_t *ip, uint16_t ip_len, uint32_t rem, 210 uint32_t plen, double ts) { 305 if (destroy) { 306 free(it->second); 307 } 308 } 309 } 310 311 static void dump_mac_map(MacEndMap *mac, bool destroy) { 312 MacEndMap::iterator it; 313 char str[80]; 314 char timestr[80]; 315 struct tm *tm; 316 time_t t; 317 318 for (it = mac->begin(); it != mac->end(); it++) { 319 t = (time_t)(it->second->last_active); 320 tm = localtime(&t); 321 strftime(timestr, 80, "%d/%m,%H:%M:%S", tm); 322 printf("%18s %16s %16" PRIu64 " %16" PRIu64 " %16" PRIu64 " %16" PRIu64 " %16" PRIu64 " %16" PRIu64 "\n", 323 mac_string(it->first, str), 324 timestr, 325 it->second->src_pkts, 326 it->second->src_bytes, 327 it->second->src_pbytes, 328 it->second->dst_pkts, 329 it->second->dst_bytes, 330 it->second->dst_pbytes); 331 if (destroy) { 332 free(it->second); 333 } 334 } 335 } 336 337 static void update_ipv6(global_t *glob, 338 local_t *local, libtrace_ip6_t *ip, uint16_t ip_len, 339 uint32_t rem, uint32_t plen, double ts) { 211 340 212 341 struct in6_addr key; … … 216 345 if (rem < sizeof(libtrace_ip6_t)) 217 346 return; 218 219 key = ip->ip_src; 220 221 it = ipv6.find(key); 222 if (it == ipv6.end()) { 223 c = create_counter(); 224 ipv6[key] = c; 225 } else { 226 c = it->second; 227 } 228 229 c->src_pkts ++; 230 c->src_pbytes += plen; 231 c->src_bytes += ip_len; 232 c->last_active = ts; 233 234 key = ip->ip_dst; 235 236 it = ipv6.find(key); 237 if (it == ipv6.end()) { 238 c = create_counter(); 239 ipv6[key] = c; 240 } else { 241 c = it->second; 242 } 243 244 c->dst_pkts ++; 245 c->dst_pbytes += plen; 246 c->dst_bytes += ip_len; 247 c->last_active = ts; 248 } 249 250 static void update_mac(uint8_t *src, uint8_t *dst, uint16_t ip_len, 347 if (glob->track_source) { 348 key = ip->ip_src; 349 350 it = local->map.ipv6->find(key); 351 if (it == local->map.ipv6->end()) { 352 c = create_counter(); 353 (*(local->map.ipv6))[key] = c; 354 } else { 355 c = it->second; 356 } 357 358 c->src_pkts ++; 359 c->src_pbytes += plen; 360 c->src_bytes += ip_len; 361 if (ts != 0) 362 c->last_active = ts; 363 } 364 365 if (glob->track_dest) { 366 key = ip->ip_dst; 367 368 it = local->map.ipv6->find(key); 369 if (it == local->map.ipv6->end()) { 370 c = create_counter(); 371 (*(local->map.ipv6))[key] = c; 372 } else { 373 c = it->second; 374 } 375 376 c->dst_pkts ++; 377 c->dst_pbytes += plen; 378 c->dst_bytes += ip_len; 379 if (ts != 0) 380 c->last_active = ts; 381 } 382 } 383 384 static void update_mac(global_t *glob, local_t *local, 385 uint8_t *src, uint8_t *dst, uint16_t ip_len, 251 386 uint32_t plen, double ts) { 252 387 … … 255 390 MacEndMap::iterator it; 256 391 257 memcpy(&(key.addr), src, sizeof(key.addr)); 258 it = mac.find(key); 259 260 if (it == mac.end()) { 261 c = create_counter(); 262 mac[key] = c; 263 } else { 264 c = it->second; 265 } 266 267 c->src_pkts ++; 268 c->src_pbytes += plen; 269 c->src_bytes += ip_len; 270 c->last_active = ts; 271 272 memcpy(&key.addr, dst, sizeof(key.addr)); 273 it = mac.find(key); 274 275 if (it == mac.end()) { 276 c = create_counter(); 277 mac[key] = c; 278 } else { 279 c = it->second; 280 } 281 282 c->dst_pkts ++; 283 c->dst_pbytes += plen; 284 c->dst_bytes += ip_len; 285 c->last_active = ts; 286 } 287 288 static void update_ipv4(libtrace_ip_t *ip, uint16_t ip_len, uint32_t rem, 289 uint32_t plen, double ts) { 392 if (glob->track_source) { 393 memcpy(&(key.addr), src, sizeof(key.addr)); 394 it = local->map.mac->find(key); 395 396 if (it == local->map.mac->end()) { 397 c = create_counter(); 398 (*(local->map.mac))[key] = c; 399 } else { 400 c = it->second; 401 } 402 403 c->src_pkts ++; 404 c->src_pbytes += plen; 405 c->src_bytes += ip_len; 406 c->last_active = ts; 407 } 408 409 if (glob->track_dest) { 410 memcpy(&key.addr, dst, sizeof(key.addr)); 411 it = local->map.mac->find(key); 412 413 if (it == local->map.mac->end()) { 414 c = create_counter(); 415 (*(local->map.mac))[key] = c; 416 } else { 417 c = it->second; 418 } 419 420 c->dst_pkts ++; 421 c->dst_pbytes += plen; 422 c->dst_bytes += ip_len; 423 c->last_active = ts; 424 } 425 } 426 427 static void update_ipv4(global_t *glob, 428 local_t *local, libtrace_ip_t *ip, uint16_t ip_len, 429 uint32_t rem, uint32_t plen, double ts) { 290 430 291 431 uint32_t key; … … 295 435 if (rem < sizeof(libtrace_ip_t)) 296 436 return; 297 298 key = ip->ip_src.s_addr; 299 300 it = ipv4.find(key); 301 if (it == ipv4.end()) { 302 c = create_counter(); 303 ipv4[key] = c; 304 } else { 305 c = it->second; 306 } 307 308 c->src_pkts ++; 309 c->src_pbytes += plen; 310 c->src_bytes += ip->ip_len; 311 if (ts != 0) 312 c->last_active = ts; 313 314 key = ip->ip_dst.s_addr; 315 316 it = ipv4.find(key); 317 if (it == ipv4.end()) { 318 c = create_counter(); 319 ipv4[key] = c; 320 } else { 321 c = it->second; 322 } 323 324 c->dst_pkts ++; 325 c->dst_pbytes += plen; 326 c->dst_bytes += ip_len; 327 if (ts != 0) 328 c->last_active = ts; 329 } 330 331 static int per_packet(libtrace_packet_t *packet) { 332 437 438 if (glob->track_source) { 439 key = ip->ip_src.s_addr; 440 441 it = local->map.ipv4->find(key); 442 if (it == local->map.ipv4->end()) { 443 c = create_counter(); 444 (*(local->map.ipv4))[key] = c; 445 } else { 446 c = it->second; 447 } 448 449 c->src_pkts ++; 450 c->src_pbytes += plen; 451 c->src_bytes += ip->ip_len; 452 if (ts != 0) 453 c->last_active = ts; 454 } 455 456 if (glob->track_dest) { 457 key = ip->ip_dst.s_addr; 458 459 it = local->map.ipv4->find(key); 460 if (it == local->map.ipv4->end()) { 461 c = create_counter(); 462 (*(local->map.ipv4))[key] = c; 463 } else { 464 c = it->second; 465 } 466 467 c->dst_pkts ++; 468 c->dst_pbytes += plen; 469 c->dst_bytes += ip_len; 470 if (ts != 0) 471 c->last_active = ts; 472 } 473 } 474 475 static void *cb_result_starting(libtrace_t *trace UNUSED, 476 libtrace_thread_t *t UNUSED, void *global) { 477 478 global_t *glob = (global_t *)global; 479 result_t *res = (result_t *)malloc(sizeof(result_t)); 480 481 switch(glob->mode) { 482 case MODE_IPV4: 483 res->map.ipv4 = new IP4EndMap(); 484 break; 485 case MODE_IPV6: 486 res->map.ipv6 = new IP6EndMap(); 487 break; 488 case MODE_MAC: 489 res->map.mac = new MacEndMap(); 490 break; 491 } 492 res->threads_reported = 0; 493 return res; 494 } 495 496 static void cb_result(libtrace_t *trace UNUSED, 497 libtrace_thread_t *sender UNUSED, void *global, 498 void *tls, libtrace_result_t *result) { 499 500 global_t *glob = (global_t *)global; 501 result_t *res = (result_t *)tls; 502 local_t *recvd = (local_t *)(result->value.ptr); 503 504 505 switch(glob->mode) { 506 case MODE_IPV4: 507 combine_ipv4_maps(res->map.ipv4, recvd->map.ipv4); 508 delete(recvd->map.ipv4); 509 break; 510 case MODE_IPV6: 511 combine_ipv6_maps(res->map.ipv6, recvd->map.ipv6); 512 delete(recvd->map.ipv6); 513 break; 514 case MODE_MAC: 515 combine_mac_maps(res->map.mac, recvd->map.mac); 516 delete(recvd->map.mac); 517 break; 518 } 519 res->threads_reported ++; 520 free(recvd); 521 } 522 523 static void cb_result_stopping(libtrace_t *trace UNUSED, 524 libtrace_thread_t *t UNUSED, void *global, void *tls) { 525 526 global_t *glob = (global_t *)global; 527 result_t *res = (result_t *)tls; 528 switch(glob->mode) { 529 case MODE_IPV4: 530 dump_ipv4_map(res->map.ipv4, 1); 531 delete(res->map.ipv4); 532 break; 533 case MODE_IPV6: 534 dump_ipv6_map(res->map.ipv6, 1); 535 delete(res->map.ipv6); 536 break; 537 case MODE_MAC: 538 dump_mac_map(res->map.mac, 1); 539 delete(res->map.mac); 540 break; 541 } 542 free(res); 543 } 544 545 546 static libtrace_packet_t *cb_packet(libtrace_t *trace, libtrace_thread_t *t, 547 void *global, void *tls, libtrace_packet_t *packet) { 548 549 global_t *glob = (global_t *)global; 550 local_t *local = (local_t *)tls; 333 551 void *header; 334 552 uint16_t ethertype; … … 344 562 345 563 if (header == NULL || rem == 0) 346 return 1;347 564 return packet; 565 348 566 if (ethertype == TRACE_ETHERTYPE_IP) { 349 567 ip = (libtrace_ip_t *)header; 350 568 if (rem < sizeof(libtrace_ip_t)) 351 return 1;569 goto endpacketcb; 352 570 ip_len = ntohs(ip->ip_len); 353 if ( mode == MODE_IPV4 && ip) {354 update_ipv4( ip, ip_len, rem, plen, ts);355 return 1;571 if (glob->mode == MODE_IPV4 && ip) { 572 update_ipv4(glob, local, ip, ip_len, rem, plen, ts); 573 goto endpacketcb; 356 574 } 357 575 } … … 360 578 ip6 = (libtrace_ip6_t *)header; 361 579 if (rem < sizeof(libtrace_ip6_t)) 362 return 1;580 goto endpacketcb; 363 581 ip_len = ntohs(ip6->plen) + sizeof(libtrace_ip6_t); 364 if ( mode == MODE_IPV6 && ip6) {365 update_ipv6( ip6, ip_len, rem, plen, ts);366 return 1;582 if (glob->mode == MODE_IPV6 && ip6) { 583 update_ipv6(glob, local, ip6, ip_len, rem, plen, ts); 584 goto endpacketcb; 367 585 } 368 586 } 369 587 370 if ( mode == MODE_MAC) {588 if (glob->mode == MODE_MAC) { 371 589 src_mac = trace_get_source_mac(packet); 372 590 dst_mac = trace_get_destination_mac(packet); 373 591 374 592 if (src_mac == NULL || dst_mac == NULL) 375 return 1; 376 update_mac(src_mac, dst_mac, ip_len, plen, ts); 377 } 378 379 return 1; 593 goto endpacketcb; 594 update_mac(glob, local, src_mac, dst_mac, ip_len, plen, ts); 595 } 596 597 endpacketcb: 598 return packet; 380 599 } 381 600 … … 383 602 384 603 int i; 604 int threads = 1; 385 605 struct sigaction sigact; 386 606 struct libtrace_filter_t *filter=NULL; 387 607 struct libtrace_t *input = NULL; 388 struct libtrace_packet_t *packet = trace_create_packet(); 608 global_t glob; 609 libtrace_callback_set_t *pktcbs, *repcbs; 610 611 glob.mode = MODE_IPV4; 612 glob.track_source = 1; 613 glob.track_dest = 1; 389 614 390 615 while(1) { … … 394 619 { "help", 0, 0, 'H' }, 395 620 { "addresses", 1, 0, 'A' }, 621 { "threads", 1, 0, 't' }, 622 { "ignore-dest", 0, 0, 'D' }, 623 { "ignore-source", 0, 0, 'S' }, 396 624 { NULL, 0, 0, 0 }, 397 625 }; 398 626 399 int c=getopt_long(argc, argv, "A:f: H",627 int c=getopt_long(argc, argv, "A:f:t:HDS", 400 628 long_options, &option_index); 401 629 … … 405 633 case 'A': 406 634 if (strncmp(optarg, "mac", 3) == 0) 407 mode = MODE_MAC;635 glob.mode = MODE_MAC; 408 636 else if (strncmp(optarg, "v4", 2) == 0) 409 mode = MODE_IPV4;637 glob.mode = MODE_IPV4; 410 638 else if (strncmp(optarg, "v6", 2) == 0) 411 mode = MODE_IPV6;639 glob.mode = MODE_IPV6; 412 640 else { 413 641 fprintf(stderr, "Invalid address type, must be either mac, v4 or v6\n"); … … 415 643 } 416 644 break; 417 645 case 'D': 646 glob.track_dest = 0; 647 break; 418 648 case 'f': filter=trace_create_filter(optarg); 419 649 break; 420 650 case 'H': 421 651 usage(argv[0]); 652 break; 653 case 'S': 654 glob.track_source = 0; 655 break; 656 case 't': 657 threads = atoi(optarg); 422 658 break; 423 659 default: … … 437 673 sigaction(SIGHUP, &sigact, NULL); 438 674 675 if (threads <= 0) { 676 threads = 1; 677 } 678 glob.threads = threads; 679 680 if (glob.track_source == 0 && glob.track_dest == 0) { 681 fprintf(stderr, "Bad configuration -- ignoring both source and dest endpoints will produce\nno results!\n"); 682 usage(argv[0]); 683 return 1; 684 } 685 439 686 for (i = optind; i < argc; i++) { 440 687 input = trace_create(argv[i]); … … 442 689 if (trace_is_err(input)) { 443 690 trace_perror(input,"%s",argv[i]); 691 trace_destroy(input); 444 692 return 1; 445 693 } … … 451 699 } 452 700 453 if (trace_start(input)==-1) { 454 trace_perror(input,"%s",argv[i]); 701 trace_set_combiner(input, &combiner_unordered, 702 (libtrace_generic_t){0}); 703 trace_set_perpkt_threads(input, threads); 704 705 pktcbs = trace_create_callback_set(); 706 trace_set_starting_cb(pktcbs, cb_starting); 707 trace_set_stopping_cb(pktcbs, cb_stopping); 708 trace_set_packet_cb(pktcbs, cb_packet); 709 710 repcbs = trace_create_callback_set(); 711 trace_set_starting_cb(repcbs, cb_result_starting); 712 trace_set_stopping_cb(repcbs, cb_result_stopping); 713 trace_set_result_cb(repcbs, cb_result); 714 715 currenttrace = input; 716 if (trace_pstart(input, &glob, pktcbs, repcbs) == -1) { 717 trace_perror(input, "Failed to start trace"); 718 trace_destroy(input); 719 trace_destroy_callback_set(pktcbs); 720 trace_destroy_callback_set(repcbs); 455 721 return 1; 456 722 } 457 723 458 while (trace_read_packet(input,packet)>0) { 459 if (IS_LIBTRACE_META_PACKET(packet)) 460 continue; 461 if (per_packet(packet) < 1) 462 done = 1; 463 if (done) 464 break; 465 } 466 467 if (done) 468 break; 724 trace_join(input); 469 725 470 726 if (trace_is_err(input)) { … … 474 730 } 475 731 732 currenttrace = NULL; 476 733 trace_destroy(input); 477 } 478 479 /* Dump results */ 480 if (mode == MODE_IPV4) 481 dump_ipv4_map(); 482 if (mode == MODE_IPV6) 483 dump_ipv6_map(); 484 if (mode == MODE_MAC) 485 dump_mac_map(); 734 trace_destroy_callback_set(pktcbs); 735 trace_destroy_callback_set(repcbs); 736 } 737 486 738 return 0; 487 739 } -
tools/traceends/tracetopends
re19ada0 r99ee456 12 12 filter="" 13 13 addr="v4" 14 threads=4 15 ignoresource="" 16 ignoredest="" 14 17 15 while getopts " f:sdn:bapA:h" opt; do18 while getopts "t:f:sdn:bapA:hSD" opt; do 16 19 case $opt in 17 20 A) … … 21 24 filter=$OPTARG 22 25 ;; 26 S) 27 ignoresource="-S" 28 ;; 29 D) 30 ignoredest="-D" 31 ;; 23 32 s) 24 33 send=1 … … 27 36 send=0 28 37 ;; 38 t) 39 threads=$OPTARG 40 ;; 29 41 n) 30 42 top_count=$OPTARG … … 118 130 119 131 if [ "$filter" = "" ]; then 120 traceends - A $addr$@ | { trap '' int; sort -n -k $sort_index -r -s; } | { trap '' int; head -n $top_count; }132 traceends -t $threads -A $addr $ignoredest $ignoresource $@ | { trap '' int; sort -n -k $sort_index -r -s; } | { trap '' int; head -n $top_count; } 121 133 else 122 traceends - A $addr -f "$filter"$@ | { trap '' int; sort -n -k $sort_index -r -s; } | { trap '' int; head -n $top_count; }134 traceends -t $threads -A $addr -f "$filter" $ignoredest $ignoresource $@ | { trap '' int; sort -n -k $sort_index -r -s; } | { trap '' int; head -n $top_count; } 123 135 fi 124 136
Note: See TracChangeset
for help on using the changeset viewer.