mrtg speaker: yan-shiang wang adviser: quincy wu date: 2005/11/23
TRANSCRIPT
MRTG
Speaker: Yan-Shiang Wang
Adviser: Quincy Wu
Date: 2005/11/23
2
Network Management
OSI CMIP (Common Management Information Protocol) designed 1980
SNMP de facto network management standard
3
SNMP
Simple Network Management Protocol application layer protocol facilitates the exchange of
management information between network devices
part of the TCP/IP UDP port 161
4
SNMP-basic components
managed devices sometimes called network elements
agents network-management software module
network-management systems (NMSs) executes applications that monitor and co
ntrol managed devices
5
SNMP-basic components (cont.)
Manager Agent
SNMP SNMP
UDP UDP
IP IP
Interface Interface
network
6
SNMP-basic commands
read NMS examines different variables
write NMS changes the values of variables
trap used by managed devices to asynchronously
report events to the NMS traversal operations
which variables a managed device supports sequentially gather information in variable tables
7
MIB
Management Information Base collection of information that is organized
hierarchically managed object (or MIB object or MO)
scalar and tabular each resource to be managed data variable
object identifier (or object ID or OID)
8
MIB (cont.)
MIB
Agent
SNMP
UDP
IP
Interface
resources
9
MIB tree exampleroot
ccitt(0) iso(1) iso-ccitt(2)
standard(0) registration-authority(1)
identified-organization(3)
dod(6)
internet(1)
member-body(2)
directory(1) mgmt(2) experimental(3) private(4) security(5) snmpV2(6)
enterprise(1)
ucdavis(2021)
memory(4)
memTotalFree(11)
systemStats(11)
ssCpuRawUser(50)
10
MIB tree example
memTotalFree (MO) .1.3.6.1.4.1.2021.4.11 (OID)
ssCpuRawUser (MO) .1.3.6.1.4.1.2021.11.50 (OID)
11
SNMPv1
RFC-1157 operates over UDP, IP, CLNS, DDP, IPX
SMI(Structure of Management Information) RFC-1155 ASN.1 data types
name, syntax, and encoding SMI-specific data types
simple, and application-wide SNMP MIB tables
12
SNMPv2
evolution of the initial version draft standard currently SMI(Structure of Management Information) RFC-1902 modules
MIB modules, compliance statements, and capability statements
13
SMI(Structure of Management Information) example
/usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt memTotalFree OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Total Available Memory on the host" ::= { memory 11 }
14
SMI(Structure of Management Information) example
/usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt ssCpuRawUser OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "user CPU time." ::= { systemStats 50 }
15
SNMPv1 vs. SNMPv2
request/response protocol Get, GetNext, Set, and Trap
adds/enhances protocol SNMPv2 Trap GetBulk and Inform
16
SNMP Service
Getretrieve objects
GetNextretrieve next objects
Setupdate objects
Trapreport events
Get Request
Get ResponseManager Agent
GetNext Request
Get ResponseManager Agent
Set Request
Get ResponseManager Agent
Trap RequestManager Agent
17
GetNext
MIB Tree only leaf objects
have values
1 2 3 4 1 2
18
SNMP example
snmptranslate .1.3.6.1.4.1.2021.11.50.0 OID to MO
snmptranslate -On UCD-SNMP-MIB::ssCpuRawUser.0 MO to OID
snmptranslate -Of UCD-SNMP-MIB::ssCpuRawUser.0 show total path
snmptranslate -IR ssCpuRawUser show total MO
snmptranslate -IR -Td ssCpuRawUser show MO’s content
snmptranslate -IR -Tp ucdavis show tree structure
19
SNMP example (cont.)
snmpget -c mrtg -v 2c localhost ssCpuRawUser.0 -c: community -v: version target MO.0 show MO’s value
snmpgetnext -c mrtg -v 2c localhost ssCpuRawUser.0 show MO’s next relative value
snmpwalk -v 2c -c mrtg localhost show all system MO’s value
snmpwalk -v 2c -c mrtg localhost systemStats show MO’s family value
snmptable -v 2c -Cw 80 -c mrtg localhost sysORTable -Cw: width show MO’s value (tabular)
snmptable -v 2c -Cw 80 -c mrtg localhost dskTable show MO’s value (tabular)
20
MRTG
Multi Router Traffic Grapher required
net-snmp libpng: png library gd: draw graph zlib: zip graph perl apache
21
MRTG - configure
/usr/local/share/snmp/snmpd.conf rocommunity mrtg syslocation Lab syscontact root@localhost
cfgmaker mrtg@localhost > mrtg.cfg mrtg mrtg.cfg indexmaker -output index.html mrtg.cfg
22
MRTG - addition
CPU Utilization systemStats::ssCpuRawUser.0
Memory Usage memory::memAvailReal.0
Disk Usage dskTable::dskPercent.0
23
24