Monitoring the active L1 Board with a python script "showMac.py"
The script showMac.py is to discover all the active L1 Read-out Boards, which are connected to the aggregation switches ( sw-agg-01 and sw-agg-02 ) and sending data through the DAQ switch (sw-daq-02), and list their mac-addresses and their names in the order of mac-address.
And the traffics are also monitored as well.
NB. It supports aggregation switch and daq switch only
The scripts are saved in the directory /group/online/showMac/
Since the script is based on net-snmp, which is installed only in gw01 or gw02, it can only be launched from gw01 or gw02
usage: showMac.py switchName [-t interval][-p][-v][-h][-d]
Get the learned Mac Addresses from the switch,
By default, the data are listed in the order of mac address;
with options:
'-t interval', set traffic monitoring interval (only for aggregation switches)
'-p', the data are displayed by the order of ports (only for aggregation switches)
'-d', diagnose mode, which will display more information, include error information and the other counters
'-v', get version
'-h', help
*
example:
1. Monitoring the active L1 board which sending data through DAQ switch
[gliu@gw01 showMac]$ showMac.py sw-daq-02
snmpwalking Mac Addr >>>>>>>
snmpwalking the IP and Mac Addr >>>>>>>
Mac Addr IP Addr Port SubSystem L1 Board
00:17:A4:C1:D6:A2 Unknown Gi 0/74 NON-TELL1 xx-d1
00:CC:BB:01:06:00 Unknown Gi 0/15 RICH2 r2ukl106-d1
00:CC:BB:04:01:00 192.169.4.1 Gi 0/36 TMU tmutellq03-d1
00:CC:BB:04:02:00 192.169.4.2 Gi 0/28 TMU tmutellq04-d1
00:CC:BB:04:03:00 192.169.4.3 Gi 0/37 TMU tmutellq34-d1
2. monitoring the aggregation switch
[gliu@gw01 showMac]$ showMac.py sw-agg-01
Mac Address Port SubSystem L1 Board InUcastPkt OutUcastPkt
00:01:E8:22:4B:BB A21 NON-L1 uplink 0 0
00:CC:BB:04:01:00 A10 TMU tmutellq03-d1 1071 0
00:CC:BB:04:03:00 A15 TMU tmutellq34-d1 357 0
Press any key to quit ...
This is the basic mode, it display the learned TELL1 boards and the Rx, Tx packect counters of the connected port only
3. monitoring the aggregation switch and display the data in the order of port
[gliu@gw01 showMac]$ showMac.py sw-agg-01 -p
Mac Address Port SubSystem L1 Board InUcastPkt OutUcastPkt
00:E0:81:52:47:36 A01 NON-L1 management 66527 66561
00:CC:BB:04:01:00 A10 TMU tmutellq03-d1 1071 0
00:CC:BB:04:03:00 A15 TMU tmutellq34-d1 357 0
00:01:E8:22:4B:BB A21 NON-L1 uplink 0 0
00:01:E8:22:4B:BB A22 NON-L1 uplink 0 1071
00:01:E8:22:4B:BB A23 NON-L1 uplink 0 357
Press any key to quit ...
The data are display in the order of the port, and the corresponding uplink ports are display as well.
the uplink assignment of each module is as below
01-05, uplink 21 (Exception for Module A, A02-05, uplink 21)
06-10, uplink 22
11-15, uplink 23
16-20, uplink 24
4. monitoring the aggregation switch in a predefined time interval
[gliu@gw01 showMac]$ showMac.py sw-agg-02 -t 5
waiting 5.0 seconds >>>>>>>
Mac Address Port SubSystem L1 Board InUcastPkt OutUcastPkt
00:01:E8:22:4B:BB A21 NON-L1 uplink 0 0
00:CC:BB:11:09:00 D12 VELO vetella09-d1 753 0
5. monitoring the aggregation switch in more detail
[gliu@gw01 showMac]$ showMac.py sw-agg-02 -dp
Mac Address Port SubSys L1 Board InByte InUniPkt InNUniPkt InErr InDiscard InUnknown OutByte OutUniPkt OutNUniPkt OutErr OutDiscard
00:E0:81:52:47:36 A01 NON-L1 management 250732 2597 1 0 0 0 254160 2597 0 0 0
00:01:E8:22:4B:BB A21 NON-L1 uplink 0 0 0 0 0 8675 0 0 0 0 0
00:CC:BB:11:09:00 D12 VELO vetella09-d1 2422892 636 0 0 0 8700 0 0 0 0 0
00:01:E8:22:4B:BB D23 NON-L1 uplink 0 0 0 0 0 8700 2414262 624 0 0 0
--
GuomingLiu - 27 Feb 2008