nv-l

Re: [nv-l] Commands?

2005-12-12 14:44:28
Subject: Re: [nv-l] Commands?
From: don.turrentine AT amsouth DOT com
To: nv-l AT lists.us.ibm DOT com
Date: Mon, 12 Dec 2005 13:42:56 -0600



Kelly,

I use the nvUtil command much line John suggested to get the number of
routers, switches/hubs, and servers.  I use the following cmds in a shell
script:

# Total Counts
#
nvNodes=`/usr/OV/bin/nvUtil e "('isNode'=True)" | wc -l`
echo "Total number of nodes managed by NetView is: " $nvNodes > $tmpfile

nvRtrs=`/usr/OV/bin/nvUtil e "('isRouter'=True)" | wc -l`
echo "Total number of routers managed by NetView is: " $nvRtrs >> $tmpfile

nvSwitches=`/usr/OV/bin/nvUtil e "('isHub'=True)" | wc -l`
echo "Total number of switches/hubs managed by NetView is: " $nvSwitches >>
$tmp
file

nvServers=`/usr/OV/bin/nvUtil e "('isServer'=True)" | wc -l`
echo "Total number of servers managed by NetView is: " $nvServers >>
$tmpfile

Inorder for the Server count to work you must first setup an "isServer"
field in the database and then use nvdbimport to set this field to True for
each server.  I set this field for each server that is monitored by
NetView.  Something that helps me is that I only add devices to NetView
using a seedfile, I never use auto discovery so this is easy to maintain.

As far as locations go you could use Smartsets that mimick your locations.
Our device naming scheme allows me to run run similar cmds to those above
using nvUtil and the 'IP Hostname' attribute to get node counts per
location.  Another thing to look at would be the sysLocation field of the
system MIB, assuming SNMP is enabled and these fields are set correctly.

Another way to get the number of routers (Gateways) is to use the following
command.

/usr/OV/bin/ovtopodump -l |grep ^NUMBER |sed 's/NUMBER OF//'|sed 's/:/:/'

The output is below.

 NETWORKS: 5563
 SEGMENTS: 5579
 NODES: 2739
 INTERFACES: 9873
 GATEWAYS: 1312

-Don

---



                                                                           
             "Kelly Root"                                                  
             <kelly.root@hewit                                             
             t.com>                                                     To 
             Sent by:                  nv-l AT lists.us.ibm DOT com             
  
             owner-nv-l@lists.                                          cc 
             us.ibm.com                                                    
                                                                   Subject 
                                       [nv-l] Commands?                    
             12/12/2005 11:10                                              
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             nv-l AT lists.us DOT ibm                                           
  
                   .com                                                    
                                                                           
                                                                           





I need to find out how many routers and servers Netview manages.  What is
the command?

I also need a report on what Netview is managing in a specific location.
What is the command to get this information?


Kelly Root
Hewitt Associates
kjroot AT hewitt DOT com



The information contained in this e-mail and any accompanying documents may
contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if
this message has been addressed to you in error, please immediately alert
the sender by reply e-mail and then delete this message, including any
attachments. Any dissemination, distribution or other use of the contents
of this message by anyone other than the intended recipient is strictly
prohibited.






<Prev in Thread] Current Thread [Next in Thread>