[nmstools-cvs] src/bin ios_devlist.pl.in,1.2,1.3
Brought to you by:
ssinyagin
|
From: Michel H. <mi...@us...> - 2003-01-29 14:18:56
|
Update of /cvsroot/nmstools/src/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv32642
Modified Files:
ios_devlist.pl.in
Log Message:
IOS overview added
Index: ios_devlist.pl.in
===================================================================
RCS file: /cvsroot/nmstools/src/bin/ios_devlist.pl.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ios_devlist.pl.in 20 Aug 2002 13:17:14 -0000 1.2
--- ios_devlist.pl.in 29 Jan 2003 14:18:49 -0000 1.3
***************
*** 23,26 ****
--- 23,29 ----
# Revision history:
# $Log$
+ # Revision 1.3 2003/01/29 14:18:49 mihahn
+ # IOS overview added
+ #
# Revision 1.2 2002/08/20 13:17:14 ssinyagin
# Added device type counters
***************
*** 126,129 ****
--- 129,133 ----
my $devcount;
my %iosversion;
+ my %iosvrscnt;
my %uptime;
my %proctype;
***************
*** 144,147 ****
--- 148,152 ----
$devtype{$hostname} = 'N/A';
$devtypecnt{'N/A'}++;
+ $iosvrscnt{'N/A'}++;
next;
}
***************
*** 158,161 ****
--- 163,167 ----
{
$iosversion{$hostname} = $1;
+ $iosvrscnt{$1}++;
}
elsif( /^$hostname\s+uptime\s+is\s+(.*\S)\s*$/ )
***************
*** 276,279 ****
--- 282,296 ----
}
printf OUT ("</counters>\n");
+
+
+ printf OUT ("<ioscounters>\n");
+ printf OUT ("<total>%d</total>\n", $devcount);
+ foreach my $type ( sort keys %iosvrscnt )
+ {
+ printf OUT ("<iosversion type=\"%s\">%d</iosversion>\n",
+ $type, $iosvrscnt{$type});
+ }
+ printf OUT ("</ioscounters>\n");
+
printf OUT ("</devicelist>\n");
|