/usr/share/munin/plugins/netstat_multi is in munin-plugins-extra 2.0.33-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 | #!/usr/bin/perl
# -*- perl -*-
#
# netstat_multi - Munin plugin for detailed Network statistics
# Copyright (C) 2011 Redpill Linpro AS
#
# Author: Trygve Vea <tv@redpill-linpro.com>
# Author: Ørjan Ommundsen <orjan@redpill-linpro.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=head1 NAME
netstat_multi - Munin plugin to monitor verbose Network statistics
=head1 APPLICABLE SYSTEMS
Works on any Linux-system with /proc/net/snmp and /proc/net/netstat.
=head1 CONFIGURATION
No configuration needed.
=head1 INTERPRETATION
Each graph uses data from the proc filesystem.
=head1 MAGIC MARKERS
#%# family=contrib
#%# capabilities=autoconf multigraph
=head1 VERSION
$Id$
=head1 PATCHES-TO
The munin-project.
=head1 AUTHOR
Trygve Vea <tv@redpill-linpro.com>
Ørjan Ommundsen <orjan@redpill-linpro.com>
=head1 LICENSE
GPLv2
=cut
use strict;
use warnings;
use Munin::Plugin;
need_multigraph();
my %sets = ();
my %datas = ();
my $key;
my @columns;
my @statfiles = ('/proc/net/netstat','/proc/net/snmp');
my @graph_parameters = ('title','total','order','scale','vlabel','args', 'category');
my @field_parameters = ('graph', 'min', 'max', 'draw', 'cdef', 'warning', 'colour', 'info', 'type', 'negative');
my %aspects = (
'TCPSynCookies' => {
'title' => 'TCP Syncookies',
'category' => 'Network',
'vlabel' => 'packets in (-) / out (+) per second',
'min' => 0,
'values' => {
'TcpExt_SyncookiesSent' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'label' => 'SYN cookies',
'min' => 0,
'negative' => 'TcpExt_SyncookiesRecv'
},
'TcpExt_SyncookiesRecv' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'graph' => 'no'
},
'TcpExt_SyncookiesFailed' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'label' => 'Invalid SYN cookies received',
'min' => 0,
'info' => 'Invalid SYN cookies received'
}
}
},
'TCPSockets' => {
'title' => 'TCP Sockets',
'category' => 'Network',
'vlabel' => 'events per second',
'width' => 600,
'values' => {
'Tcp_ActiveOpens' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Active connection openings',
},
'Tcp_PassiveOpens' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Passive connection openings',
},
'Tcp_EstabResets' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Connection resets received',
},
'Tcp_AttemptFails' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Failed connection attempts',
}
}
},
'TCPSegments' => {
'title' => 'TCP Segments',
'category' => 'Network',
'vlabel' => 'segments in (-) / out (+) per second',
'width' => 600,
'values' => {
'Tcp_InSegs' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Segments received',
'graph' => 'no',
},
'Tcp_OutSegs' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'label' => 'Segments',
'min' => 0,
'negative' => 'Tcp_InSegs'
},
'Tcp_RetransSegs' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'label' => 'Segments retransmitted',
'min' => 0,
},
'Tcp_InErrs' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'label' => 'Bad segments received',
'min' => 0,
},
}
},
'TCPCurrConn' => {
'title' => 'TCP Open Connections',
'category' => 'Network',
'vlabel' => 'number of connections',
'width' => 600,
'values' => {
'Tcp_CurrEstab' => {
'type' => 'GAUGE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Active TCP connections',
'info' => 'Currently active TCP connections',
}
}
},
'TCPTimeouts' => {
'title' => 'TCP other timeouts',
'category' => 'Network',
'vlabel' => 'timeouts per second',
'width' => 600,
'values' => {
'TcpExt_TCPTimeouts' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Other timeouts',
'info' => 'TCP other (unspecified) timeouts',
}
}
},
'TCPDatalossEvents' => {
'title' => 'TCP data loss events',
'category' => 'Network',
'vlabel' => 'events per second',
'width' => 600,
'values' => {
'TcpExt_TCPLoss' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Data loss events',
'info' => 'TCP data loss events',
},
'TcpExt_TCPLostRetransmit' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Retransmits lost',
'info' => 'TCP retransmits lost',
}
}
},
'SOCKBUFERR' => {
'title' => 'TCP socket buffer errors',
'category' => 'Network',
'vlabel' => 'errors per second',
'width' => 600,
'values' => {
'TcpExt_TCPRcvCollapsed' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Receives collapsed',
'info' => 'Packets collapsed in receive queue due to low socket buffer',
},
'TcpExt_PruneCalled' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Prunes in recv_queue',
'info' => 'Packets pruned from receive queue because of socket buffer overrun',
},
'TcpExt_ListenOverflows' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Listen overflows',
'info' => 'Times the listen queue of a socket overflowed',
},
'TcpExt_ListenDrops' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'SYNs ignored',
'info' => 'SYNs to LISTEN sockets ignored',
},
'TcpExt_TCPSchedulerFailed' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Scheduler failures',
'info' => 'Receiver schedulations too late for direct processing',
},
'TcpExt_EmbryonicRsts' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Embryonic resets',
'info' => 'Resets received for embryonic SYN_RECV sockets',
}
}
},
'TCPReorder' => {
'title' => 'TCP SACK/FACK reorders',
'category' => 'Network',
'vlabel' => 'reorders per second',
'width' => 600,
'values' => {
'TcpExt_TCPFACKReorder' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'FACK reorder',
'info' => 'Reordering using FACK',
},
'TcpExt_TCPSACKReorder' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'SACK reorder',
'info' => 'Reordering using SACK',
},
'TcpExt_TCPRenoReorder' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Reno reorder',
'info' => 'Reordering using Reno',
},
'TcpExt_TCPTSReorder' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Timestamp reorder',
'info' => 'Reordering using timestamps',
}
}
},
'TCPSACKFACK' => {
'title' => 'TCP Selective ACK / Forward ACK',
'category' => 'Network',
'vlabel' => 'packets per second',
'width' => 600,
'values' => {
'TcpExt_TCPSackRecovery' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'SACK recovery',
'info' => 'Recovered from packet loss due to SACK data',
},
'TcpExt_TCPSACKReneging' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'SACK renegotiations',
'info' => 'Renegotiations after bad SACKs received',
},
'TcpExt_TCPSackFailures' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'SACK failures',
'info' => 'Timeouts after SACK recovery',
},
'TcpExt_TCPSackRecoveryFail' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'SACK retransmit failures',
'info' => 'SACK retransmit failures',
}
}
},
'TCPDSACK' => {
'title' => 'TCP Duplicate Selective ACKs',
'category' => 'Network',
'vlabel' => 'packets per second',
'width' => 600,
'values' => {
'TcpExt_TCPDSACKOldSent' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'DSACK old sent',
'info' => 'DSACKs sent for old packets',
},
'TcpExt_TCPDSACKOfoRecv' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'DSACKS for Ofo received',
'info' => 'DSACKS received for Out of order packets',
},
'TcpExt_TCPDSACKRecv' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'DSACKs received',
'info' => 'DSACKs received',
},
'TcpExt_TCPDSACKOfoSent' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'DSACKs for Ofo sent',
'info' => 'DSACKs sent for Out of order packets',
},
'TcpExt_TCPDSACKUndo' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'DSACK undos',
}
}
},
'TCPAborted' => {
'title' => 'TCP aborted connections',
'category' => 'Network',
'vlabel' => 'connections per second',
'width' => 600,
'values' => {
'TcpExt_TCPAbortOnSyn' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Abort on SYN',
},
'TcpExt_TCPAbortOnData' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Abort on data',
'info' => 'Connections reset due to unexpected data',
},
'TcpExt_TCPAbortOnClose' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Abort on close',
'info' => 'Connections reset due to early user close',
},
'TcpExt_TCPAbortOnMemory' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Abort on memory',
},
'TcpExt_TCPAbortOnTimeout' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Abort on timeout',
'info' => 'Connections aborted due to timeout',
},
'TcpExt_TCPAbortOnLinger' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Abort on linger',
},
'TcpExt_TCPAbortFailed' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Abort failure',
},
'TcpExt_TCPMemoryPressures' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Memory pressures',
}
}
},
'TCPDelayedACK' => {
'title' => 'TCP delayed ACKs',
'category' => 'Network',
'vlabel' => 'packets per second',
'width' => 600,
'values' => {
'TcpExt_DelayedACKs' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Delayed ACKs',
'info' => 'Delayed ACKs sent',
},
'TcpExt_DelayedACKLocked' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Delayed ACKs locked',
'info' => 'Delayed ACKs further delayed because of locked socket',
},
'TcpExt_DelayedACKLost' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Delayed ACKs lost',
}
}
},
'TCPRetrans' => {
'title' => 'TCP retransmissions',
'category' => 'Network',
'vlabel' => 'events per second',
'width' => 600,
'values' => {
'TcpExt_TCPFastRetrans' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Fast retransmissions',
},
'TcpExt_TCPForwardRetrans' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Forward retransmissions',
},
'TcpExt_TCPSlowStartRetrans' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Slow Start retransmissions',
},
'TcpExt_TCPLossFailures' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Timeouts in loss state',
}
}
},
'TCPPAWS' => {
'title' => 'PAWS (Protect against wrapped sequence numbers)',
'category' => 'Network',
'vlabel' => 'packets per second',
'width' => 600,
'values' => {
'TcpExt_PAWSPassive' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Active',
},
'TcpExt_PAWSActive' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Passive',
},
'TcpExt_PAWSEstab' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Established',
}
}
},
'IPReassembly' => {
'title' => 'IP packet reassembly',
'category' => 'Network',
'vlabel' => 'packets per second',
'width' => 600,
'values' => {
'Ip_ReasmTimeout' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Reassembly timeouts',
'info' => 'IP packet fragments dropped after timeout',
},
'Ip_ReasmReqds' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Reassemblies required',
'info' => 'IP packet reassemblies required',
},
'Ip_ReasmOKs' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Reassembly successes',
'info' => 'IP packet reassemblies succeeded',
},
'Ip_ReasmFails' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Reassembly failures',
'info' => 'IP packet reassemblies failed',
},
'Ip_FragFails' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Fragments failed',
'info' => 'IP packet fragments failed',
}
}
},
'TCPTimeWait' => {
'title' => 'TCP Time-Wait',
'category' => 'Network',
'vlabel' => 'connections per second',
'width' => 600,
'values' => {
'TcpExt_TW' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'TimeWait',
},
'TcpExt_TWRecycled' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'TimeWait Recycled',
},
'TcpExt_TWKilled' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'TimeWait killed',
}
}
},
'UDPDatagrams' => {
'title' => 'UDP datagrams',
'category' => 'Network',
'vlabel' => 'datagrams per second',
'width' => 600,
'values' => {
'Udp_InDatagrams' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Incoming datagrams',
'info' => 'UDP packets received',
},
'Udp_NoPorts' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Unknown ports',
'info' => 'Packets to unknown port received',
},
'Udp_InErrors' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Incoming errors',
'info' => 'UDP incoming packet errors',
},
'Udp_OutDatagrams' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Outgoing datagrams',
'info' => 'UDP packets sent',
}
}
},
'TCPQueueing' => {
'title' => 'TCP Queueing',
'category' => 'Network',
'vlabel' => 'packets per second',
'width' => 600,
'values' => {
'TcpExt_TCPPrequeued' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Prequeued',
'info' => 'Packets directly queued to recvmsg prequeue',
},
'TcpExt_TCPDirectCopyFromBacklog' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Direct copy from backlog',
'info' => 'Packets directly received from backlog',
},
'TcpExt_TCPDirectCopyFromPrequeue' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Direct copy from prequeue',
'info' => 'Packets directly received from prequeue',
},
'TcpExt_TCPPrequeueDropped' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Prequeue items dropped',
'info' => 'Prequeue items dropped',
}
}
},
'TCPHP' => {
'title' => 'TCP Packet headers predicted',
'category' => 'Network',
'vlabel' => 'packets per second',
'width' => 600,
'values' => {
'TcpExt_TCPHPHits' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Headers predicted',
'info' => 'TCP packets header predicted',
},
'TcpExt_TCPHPHitsToUser' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Headers predicted to user',
'info' => 'Packets header predicted and directly queued to user',
},
'TcpExt_TCPPureAcks' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Pure ACKs received',
'info' => 'Acknowledgments not containing data received',
},
'TcpExt_TCPHPAcks' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Predicted ACKs',
'info' => 'Predicted acknowledgments',
}
}
},
'IPEXT' => {
'title' => 'IP packet types',
'category' => 'Network',
'vlabel' => 'packets in (-) / out (+) per second',
'width' => 600,
'values' => {
'IpExt_InNoRoutes' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'No route',
},
'IpExt_InTruncatedPkts' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Incoming truncated packets',
},
'IpExt_InMcastPkts' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'IpExt_OutMcastPkts' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Multicast packets',
'negative' => 'IpExt_InMcastPkts'
},
'IpExt_InBcastPkts' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'IpExt_OutBcastPkts' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Broadcast packets',
'negative' => 'IpExt_InBcastPkts'
}
}
},
'TCPReno' => {
'title' => 'TCP Congestion avoidance algorithm (Reno)',
'category' => 'Network',
'vlabel' => 'events per second',
'width' => 600,
'values' => {
'TcpExt_TCPRenoReorder' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Reorder successes',
'info' => 'Reno packet window reordering successful',
},
'TcpExt_TCPRenoFailures' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Fast retransmit failures',
'info' => 'Timeouts after reno fast retransmit',
},
'TcpExt_TCPRenoRecovery' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Fast Retransmit successes',
'info' => 'Reno recoveries from packet loss due to fast retransmit',
},
'TcpExt_TCPRenoRecoveryFail' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Recovery failures',
'info' => 'Reno fast recovery failure',
},
'TcpExt_TCPFullUndo' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Full recoveries',
'info' => 'Congestion windows fully recovered',
},
'TcpExt_TCPPartialUndo' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Partial recoveries',
'info' => 'Congestion windows partially recovered using Hoe heuristic',
},
'TcpExt_TCPLossUndo' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Partial ACK recoveries',
'info' => 'Congestion windows recovered after partial ack',
}
}
},
'ICMP' => {
'title' => 'ICMP',
'category' => 'Network',
'vlabel' => 'packets in (-) / out (+) per second',
'width' => 600,
'values' => {
'Icmp_InDestUnreachs' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutDestUnreachs' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Unreachables',
'info' => 'ICMP Destination Unreachables',
'negative' => 'Icmp_InDestUnreachs'
},
'Icmp_InEchoReps' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutEchoReps' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Echo Replies',
'info' => 'ICMP Echo Replies',
'negative' => 'Icmp_InEchoReps'
},
'Icmp_InEchos' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutEchos' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Echos',
'info' => 'ICMP Echos',
'negative' => 'Icmp_InEchos'
},
'Icmp_InRedirects' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutRedirects' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Redirects',
'info' => 'ICMP Redirects',
'negative' => 'Icmp_InRedirects'
},
'Icmp_InTimeExcds' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutTimeExcds' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Time exceededs',
'info' => 'ICMP Time Exceeded',
'negative' => 'Icmp_InTimeExcds'
},
'Icmp_InParmProbs' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutParmProbs' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Parameter Problems',
'negative' => 'Icmp_InParmProbs'
},
'Icmp_InSrcQuenchs' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutSrcQuenchs' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Source Quenches',
'negative' => 'Icmp_InSrcQuenchs'
},
'Icmp_InAddrMaskReps' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutAddrMaskReps' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Address Mask replies',
'negative' => 'Icmp_InAddrMaskReps'
},
'Icmp_InAddrMasks' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutAddrMasks' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Address Mask requests',
'negative' => 'Icmp_InAddrMasks'
},
'Icmp_InTimestampReps' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutTimestampReps' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Timestamp Replies',
'negative' => 'Icmp_InTimestampReps'
},
'Icmp_InTimestamps' => {
'type' => 'DERIVE',
'min' => 0,
'graph' => 'no'
},
'Icmp_OutTimestamps' => {
'type' => 'DERIVE',
'draw' => 'LINE1',
'min' => 0,
'label' => 'Timestamps',
'negative' => 'Icmp_InTimestamps'
}
}
}
);
foreach (@statfiles) {
open F, $_;
while(<F>)
{
chomp($_);
my @line = split(/ /,$_);
$line[0] =~ s/\://;
if ( !$sets{$line[0]} ) {
$sets{$line[0]} = 1;
@columns = @line;
next;
}
for (my $i = 1; $i < @line; $i++) {
if ( length($columns[$i]) > 0 ) {
$datas{"$columns[0]_$columns[$i]"} = $line[$i];
}
}
}
close F;
}
foreach $key (sort keys %aspects) {
my $val;
print "multigraph $key\n";
if ( defined($ARGV[0]) and $ARGV[0] eq 'config' ) {
foreach (@graph_parameters) {
if (!defined($aspects{$key}{$_})) {
next;
}
print "graph_$_ $aspects{$key}{$_}\n";
}
print "\n";
foreach $val (sort keys %{$aspects{$key}{'values'}}) {
if (defined($aspects{$key}{'values'}{$val}{'label'})) {
print "$val.label $aspects{$key}{'values'}{$val}{'label'}\n";
} else {
print "$val.label $val\n";
}
if (!defined($datas{$val})) {
next;
}
foreach (@field_parameters) {
if (!defined($aspects{$key}{'values'}{$val}{$_})) {
next;
}
print "$val.$_ $aspects{$key}{'values'}{$val}{$_}\n";
}
}
print "\n";
}
elsif ( defined($ARGV[0]) and $ARGV[0] eq 'debug' ) {
foreach $key (sort keys %datas) {
print "$key = $datas{$key}\n";
}
}
elsif ( defined($ARGV[0]) and $ARGV[0] eq 'autoconf' ) {
print "no (defaults to no, because it generates 22 graphs - which may be a bit too verbose)\n";
exit 0;
}
else {
foreach $val (sort keys %{$aspects{$key}{'values'}}) {
if (!defined($datas{$val})) {
next;
}
print "$val.value $datas{$val}\n";
}
print "\n";
}
}
|