Useful SMARTS tips

Basic stuff

Start or stop Smarts

/etc/init.d/ic-serviced stop/start

Logfile location

$BASEDIR_IP/local/logs/
$BASEDIR_SAM/local/logs/

dmctl commands

dmctl -s <ServerName> ($BASEDIR_SAM/bin)

Logging into a server using dmctl

dmctl -s <ServerName>

Roll logfiles

dmctl -s <ServerName> exec roll_log

check when last save was done of the repository

dmctl -s <ServerName> get ICF_PercistenceManager::ICF-PercistenceManager

Force a resync of topology between APM and SAM / APM and OI

dmctl -s <SAM/OI ServerName> invoke GA_DaemonDriver::<name of the APM domain>_Topo-Driver start

Recompute codebook through dmctl

dmctl -s <APM ServerName> invoke ICF_PolicyManager reconfigureAndWait true

Force a notification to clear

dmctl -s <SAM or OI> invoke ICS_NotificationFactory::ICS-NotificationFactory \
archiveNotification \
ICS_Notification::<NOTIFICATIONName> \
<User> \
"Archived this SUSPENDED alarm"

Check NotificationLists

dmctl -s <SAM ServerName> geti ICS_NotificationList

dmctl -s <SAM ServerName> get ICS_NotificationList::<NL-List>

Shows all notifications matching the defined criteria + get the Notification lists definition

dmctl -s <SAM ServerName> get ICF_Criteria::ICF-Criteria-ICS_<NL-Name>-0

Checkpoint the repository to disk

dmctl -s <ServerName> invoke ICF_PersistenceManager::ICF-PersistenceManager save

Put APM in debug mode

dmctl -s <APM ServerName> put ICF_TopologyManager::ICF-TopologyManager::DebugEnabled TRUE

Sync OI to IP topology

DMDriver=$DMName"_Topo-Driver"

dmctl -s $OIDomain invoke GA_DaemonDriver::$DMDriver start 2>&1 >/dev/null

Connect to the broker

dmctl -s localhost:426/dmbroker

Check what traps get send to AM/APM

dmctl -s <AM-server> invoke SNMP_TrapManager::SNMP-Trap-Manager setTrace

This will dump traps into the server logfile in <basedir>IP/smarts/local/logs. To disable trap tracing, run the following command:
dmctl -s <AM-server> invoke SNMP_TrapManager::SNMP-Trap-Manager clearTrace

Add a source in NPM through CLI

dmctl -s <NPM-serverName> invoke ICF_TopologyManager::ICF-TopologyManager addManagedElement <AMServerName> "AM"

Reloads the trap_mgr.conf file without restart

dmctl -s <TA Name> invoke GA_Driver::DRV-trap-config start

Dump the SNMP pollers

dmctl -s <ServerName> exec dmdebug --dumpAccessor=DEVSTAT-SNMP-Poller --output

Dump ICMP Pollers

dmctl -s <Domain Name> exec dmdebug --dumpAccessor=DEVSTAT-TCPIP-Pinger --output

A common debugging tool is dmdebug --queues which prints information about all server queues in the system.

dmctl -s <server name> exec dmdebug --queues --output=<file name>

Rediscover a single device using dmctl:

dmctl -s <APM ServerName> invoke ICF_TopologyManager::ICF-TopologyManager rediscover <ClassName::Name>

Get subscriptions of an APM

dmctl -s <APM ServerName> get GA_SubscriberProfile::PROFILE-default

dump the codebook:

dmctl -s <APM ServerName> -b <broker> exec dmdebug --dumpCodebook

dump the matrix

dmctl -s <APM ServerName> -b <broker> exec dmdebug --dumpMatrix

Accessor dump

dmctl -s <APM ServerName> -b <broker> exec dmdebug --dumpAccessor=DEVSTAT-SNMP-Poller
dmctl -s <APM ServerName> -b <broker> exec dmdebug --dumpAccessor (will dump all ICMP and SNMP poll status)

Enable SNMP debug for one specific device

dmtcl -s <APM ServerName> invoke ICIP_SNMPAccessorInterface: DEVSTAT-SNMP-Poller setTrace ICIM_UnitaryComputerSystem::<DeviceName> TRUE

Dump client sessions in logfile:

dmctl -s <SAM ServerName> exec dmdebug --clients
command writes client sessions to the logfile with their sessionID

clear the client session

dmctl -s <SAM ServerName> exec dmdebug --disconnect=<SessionID>

Remove devices in bulk

Shell script:

for i in `cat routerlist`;do
dmctl -s <APM ServerName> invoke Router::$i remove | tee;
done

Where “routerlist” is just a list of routers as they appear in AM; no commands, just names or IPs.

Make sure the “|tee” follows “remove” or I think you will have to login to the domain 600 times.

sm_service commands

Show the running services

sm_service show

Show the command the sm_service daemon starts

sm_service show --cmdline ic-<ServerName>

sm_config commands

SAM repository and GUI configuration

Exporting the configuration

sm_config -s <ServerName> export <FileName>

Importing the configuration

sm_config -s <ServerName> import <FileName>

sm_adapter commands

run an ASL script

sm_adapter -s <ServerName> <ASL script>

Start an CLI adapter listening to a notification list

sm_adapter -s <ServerName> --subscribe=Default/n
sm_adapter -s <ServerName> --subscribe=ALL_NOTIFICATION/n

sm_tpmgr commands

Load a specific configuration file without need of a restart (be aware this is not always possible)

sm_tpmgr -s <ServerName> --load-conf=discovery.conf

Check network stats etc of the Domain Manager

sm_tpmgr -s <ServerName> --show-dm-processes

Check the size of an APM (ports/Routers/Switches etc)

sm_tpmgr --sizes -s <APM ServerName>

Re-read oid2type files

sm_tpmgr -s <APM ServerName> --reloadoid

Discover based on seedfile

sm_tpmgr -s <APM ServerName> --seed="/tmp/seedfile" --status --tracelevel=debug --loglevel=debug

create a seedfile from the repository:

sm_tpmgr -s <APM ServerName> --dump-agents --output=seedfile.log

sm_server commands

Get the Smarts version

sm_server --version

dynmodel commands

Compile dynamic model files

dynmodel <Filename> to compile a new model file from *.mdl -> *.ldm

Broker commands

List broker status and process status

brcontrol

Delete processes from the broker

brcontrol delete_dm <NAME>

Add a process under the broker

brcontrol add_dm <NAME> <HOST> <PORT> <PID>

Device Certification

Field Certification

For certification, we need to add the System OID to the oid2type_Field.conf in /opt/InCharge7/IP/smarts/local/conf/discovery/oid2type_Field.conf
add : eg.

.1.3.6.1.4.1.1977.1.6.1279.1 {
TYPE = Host
VENDOR = ssmForSun
MODEL = SUN SPARCstation Solaris2
CERTIFICATION = TEMPLATE

INSTRUMENTATION:
Interface-Fault = MIB2
Interface-Performance = MIB2
}

Global Console

Console manipulations

<ctrl><alt>M : gives all hidden classes
<ctrl><alt>S : you can create own objects etc

sm_gui options

-c (on the APM -> gives you to what notifications are available to the classes.)
-D com.smarts.maxTopoInstances=10000 extend the amount of instances that can be browsed.

sm_snmp

Sending a trap

sm_snmp -dest=<IP address APM management server> trap <devicename> .1.3.6.1.4.1.8239.2.1.3.2 6 2 10

License manager

License manager on fixed port:

Modification in smarts.lic:

#USA
SERVER sinmn11u 83cf9d67 1744
VENDOR sm_lmgrd92 USER_DEFINED port=1745
USE_SERVER
INCREMENT AD_SDI sm_lmgrd92 6.2 permanent 1 9935A866F998 DUP_GROUP=SITE SN=DO394040093 TS_OK
INCREMENT DMC_CORR sm_lmgrd92 6.2 permanent 1 3F5E69D35473 DUP_GROUP=SITE SN=DO394040091 TS_OK
[...]

SAM

Escalation policies and filters

Another issue I had with escalation policies when I set them up in 6.5.3 was that the filter criteria can be edited via two paths
1. Right click on the escalation policy -> Path ->Edit Properties -> Edit Filter
2. Select Escalation Policy -> Top Menu "Escalation" -> Policy -> Edit Properties -> Edit Filter
What I had found was that the filter via the second path is not the same as the filter via the first path and that caused me issues in the past. Since then I always update the filter via both paths.