projects
/
dell-switch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
982652b
)
dump switch mac address in snmp format (without leading 0)
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 17 Jul 2018 08:30:19 +0000
(10:30 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 17 Jul 2018 08:30:19 +0000
(10:30 +0200)
snmp-topology.pl
patch
|
blob
|
history
diff --git
a/snmp-topology.pl
b/snmp-topology.pl
index
7aa4117
..
dd1e6d8
100755
(executable)
--- a/
snmp-topology.pl
+++ b/
snmp-topology.pl
@@
-52,8
+52,10
@@
foreach my $file ( @dumps ) {
#warn "# stat = ",dump($stat);
open(my $fh, '>', '/dev/shm/mac2sw');
#warn "# stat = ",dump($stat);
open(my $fh, '>', '/dev/shm/mac2sw');
+open(my $fh2, '>', '/dev/shm/mac2sw.snmp');
foreach my $mac ( keys %{ $stat->{_mac2sw} } ) {
print $fh macfmt($mac), " ", $stat->{_mac2sw}->{$mac}, "\n";
foreach my $mac ( keys %{ $stat->{_mac2sw} } ) {
print $fh macfmt($mac), " ", $stat->{_mac2sw}->{$mac}, "\n";
+ print $fh $mac, " ", $stat->{_mac2sw}->{$mac}, "\n";
};
# XXX inject additional mac in filter to include wap devices
};
# XXX inject additional mac in filter to include wap devices