C H A P T E R 5 |
This chapter contains the following sections:
The first section describes how to set up your system to send and receive traps, the traps you can use to receive change notification for logical domains, and descriptions of the output.
The second section describes active management operations, which are controlled by using the ldomAdminState property of the Logical Domains Table (ldomTable). For more information about this property and this table, see TABLE 4-1.
The following procedures provide examples of how you can set up to send and receive traps.
Edit the /etc/sma/snmp/snmpd.conf file to add the directives to define the trap and inform version and destination.
trapcommunity string --> define community string to be used when sending traps trapsink host[community [port]] --> to send v1 traps trap2sink host[community [port]] --> to send v2c traps informsink host[community [port]] --> to send informs |
For more details, refer to the Solaris 10 OS snmpd.conf(1M) man page.
For example, to send both v1 and v2c traps to the SNMP trap daemon running on the same host, add the following directives to the /etc/sma/snmp/snmpd.conf file:
trapcommunity public trapsink localhost trap2sink localhost |
Start the SNMP trap daemon utility, snmptrapd(1M).
Refer to the Solaris 10 OS snmptrapd(1M) man page for options to specify the format of the output.
For example, the following input:
# /usr/sfw/sbin/snmptrapd -P -F “TRAP from %B on %m/%l/%y at %h:%j:%k Enterprise=%N Type=%w SubType=%q \nwith Varbinds: %v \nSecurity info:%P\n\n" localhost:162 |
TRAP from localhost on 5/18/2007 at 16:30:10 Enterprise=. Type=0 SubType=0with Varbinds: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (47105) 0:07:51.05 SNMPv2-MIB::snmpTrapOID.0 = OID: SUN-LDOM-MIB::ldomCreate SUN-LDOM-MIB::ldomIndexNotif = INTEGER: 3 SUN-LDOM-MIB::ldomName = STRING: ldg2 SUN-LDOM-MIB::ldomTrapDesc = STRING: Ldom CreatedSecurity info:TRAP2, SNMP v2c, community public |
This section describes the following LDoms MIB traps you can use:
Note - Be sure that you have added the ldom prefix to trap names when setting traps. |
Setting this trap notifies you of any logical domains that are created.
Setting this trap notifies you of any logical domains that are destroyed.
Setting this trap notifies you of any operating state changes in a logical domain.
Setting this trap notifies you of any changes in the number of virtual CPUs for a logical domain.
Setting this trap notifies you of any changes in the amount of virtual memory for a logical domain.
Setting this trap notifies you of any changes to a virtual disk service for a logical domain.
Setting this trap notifies you of any changes to a virtual disk for a logical domain.
Setting this trap notifies you of any changes to a virtual switch for a logical domain.
Setting this trap notifies you of any changes to a virtual network for a logical domain.
Setting this trap notifies you of any changes to a virtual console concentrator for a logical domain.
Setting this trap notifies you of any changes to a virtual console group for a logical domain.
You can use the snmpset(1M) command to start or stop any logical domain:
The snmpset command with a write of 1 (active) to the ldomAdminState property starts the logical domain.
The snmpset command with a write of 2 (stopping) to the ldomAdminState property stops the logical domain.
The start logical domain operation starts an existing bound logical domain. If a logical domain with the given domain name does not exist or is not already bound, then this operation fails.
Check to see that the control (primary) domain exists and is bound.
# ldm list primary Name State Flags Cons VCPU Memory Util Uptime primary bound ---cv 4 1G |
% snmpset -v1 -c private localhost SUN-LDOM-MIB::ldomTable.1.ldomAdminState.1 = 1 |
Check to see that the primary domain is now active using the ldm list command from the Logical Domains Manager.
# ldm list primary Name State Flags Cons VCPU Memory Util Uptime primary active -t-cv 4 1G 0.0% 0s |
You can also retrieve the logical domain state using the SNMP tools.
% snmpget -v 1 -c public localhost SUN-LDOM-MIB::ldomOperState.1 SUN-LDOM-MIB::ldomOperState.1 = INTEGER: active(1) |
The stop operation stops a started logical domain. Any instances of an operating system that are hosted by the domain are stopped.
% snmpset -v1 -c private localhost SUN-LDOM-MIB::ldomTable.1.ldomAdminState.1 = 2 |
Check to see that the primary domain is now bound (stopped) using the ldm list command from the Logical Domains Manager.
# ldm list primary Name State Flags Cons VCPU Memory Util Uptime primary bound ---cv 4 1G |
You can also retrieve the logical domain state using the SNMP tools.
% snmpget -v 1 -c public localhost SUN-LDOM-MIB::ldomOperState.1 SUN-LDOM-MIB::ldomOperState.1 = INTEGER: bound(6) |
Copyright © 2007, Sun Microsystems, Inc. All rights reserved.