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:
c4d0a3b
)
how blocked port state as B
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 20 Jun 2018 08:31:36 +0000
(10:31 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 20 Jun 2018 08:31:36 +0000
(10:31 +0200)
syslog-count-link.pl
patch
|
blob
|
history
diff --git
a/syslog-count-link.pl
b/syslog-count-link.pl
index
04e8d42
..
c78ee40
100755
(executable)
--- a/
syslog-count-link.pl
+++ b/
syslog-count-link.pl
@@
-98,9
+98,9
@@
while(<>) {
if ( m/(\S+)\s%LINK-[IW]-(\w+):\s*(\w+)/ ) {
my ($host,$state,$port) = ($1,$2,$3);
stat_host_port( $host, $port, substr($state,0,1) );
if ( m/(\S+)\s%LINK-[IW]-(\w+):\s*(\w+)/ ) {
my ($host,$state,$port) = ($1,$2,$3);
stat_host_port( $host, $port, substr($state,0,1) );
- } elsif ( m/(\S+)\s%STP-W-PORTSTATUS:\s([\w\/]+): STP status (\w+)/ ) {
- my ($host,$port,$state) = ($1,$2,
$3
);
- stat_host_port( $host, $port,
'-'
);
+ } elsif ( m/(\S+)\s%STP-W-PORTSTATUS:\s([\w\/]+)
(?: of instance \d+)?
: STP status (\w+)/ ) {
+ my ($host,$port,$state) = ($1,$2,
substr($3,0,1)
);
+ stat_host_port( $host, $port,
$state =~ m/f/i ? '-' : $state
);
## Dell new
## Dell new