The mcontrol command performs control operations on a cell. The operation is stated as an argument.

mcontrol syntax

C:\Users\Administrator>mcontrol  -?
BMC Impact 控制 9.6.00.002 (Build 261331927 - 21-Jul-2016)
版權所有 1998-2013 BMC Software, Inc. 未發佈作品。保留所有權利。
使用:mcontrol [-h|-?] [-z] [-q] [-v] [-c ConfigFile] {-p Var=Value} [-l HomeLoc
ation] [-n CellName | -n @Host[/Port[#Key]] ] [-i Userid[/Password][@Host[/Port]
] ] 控制
   -h   打印此幫助並退出
   -z   打印版本號並退出
   -q   靜態執行(無橫幅)
   -v   詳細信息
   -c   從 ConfigFile 配置
   -p   參數 Var 的值已指派
   -l   主目錄為 HomeLocation(默認值:$MCELL_HOME)
   -n   連接至 Cell CellName - 在目錄中定義
        或在指示的主機和端口上,使用指示的密鑰
   -i   以用户 Userid 和 Password 在 IAS 主機和端口上驗證
        控制:stop shutdown pause start standby restart statbld
           prop [{Destination}]
           tracerule on|off | (phases Phase ...) | (names Name ...) | (ports Tra
ceport ...)
           timer (delete | adjust Adjustment) [event EventID] [info TimerInfo]
           metrics [on|off|reset]
           reload [{dir|trace|conf|collect|kb|data|cell|all}]

C:\Users\Administrator>

mcontrol option

Option

Description

Control

Specifies the control command to use.

mcontrol controls

Control

Description

metrics [on|off|reset|intervalInterval|amount Amount]

on = enables metrics

off = disables metrics

reset= resets running counters

interval  Interval = sets the length of the short term metrics collection in seconds. For example: interval 300

amount Amount = sets the number of short term metrics collection that make up a medium term metrics collection. For example: if the amount is 5, it means 5 short term metrics make up a medium term metrics collection.

If an argument is not specified, metrics are reported by default.

pause

Suspends reception of adapter messages; events are no longer accepted

profiling on|off|reset

on = enables the collection of profile data 

off = suspends the collection of profile data 

reset= resets the profile counter

prop [Destinations]

If one or more Destinations are mentioned, only propagations to these destinations are retried; if no Destinations are specified, all pending propagation destinations are retried

reload [dir|trace|conf|collect|kb|data|all]

Reload cell configuration, for one or more categories; if you do not select an argument, all categories reload

dir – mcell.dir 
trace – mcell.trace
conf – mcell.conf, propagate, modify
collect-collector definitions
kb - Knowledge Base, classes, rules
data – data instances
all – all the categories
When you run the mcontrol -n reload command, the cell generates an MC_CELL_RELOADED class event with category set to the list of all reloaded categories.

restart

Stops and restarts the cell

shutdown

Terminates the cell in fast shutdown mode; same as mkill -s

standby

Switches cell to standby mode

start

Resumes reception of adapter messages; cell operates normally again

statbld

Forces the cell to perform a StateBuild immediately instead of waiting for the next scheduled StateBuild; mcontrol waits until termination of the forced StateBuild and, if successful, returns the path to the resulting saved state file

stop

Terminates the cell in normal mode; same as mkill

timer adjust Adjustment[eventEventID] [info TimerInfo]

Adjusts all indicated timers by the specified Adjustment number of seconds 


The timer expiration time is adjusted by the number of seconds specified by Adjustment. A positive value for Adjustment increases the amount of time it takes for the timer to expire. A negative value decreases the amount of time it takes for the timer to expire. If the negative Adjustment value is greater than the time it would take for the timer to expire, then the timer will expire immediately. 


If no event is specified, all matching timers on all events are selected. If no timer information is specified, all timers on the indicated event for all timer rules are selected.

timer delete [event EventID] [infoTimerInfo]

Deletes all indicated timers for the specified event 

If no event is specified, all matching timers on all events are selected. If no timer information is specified, all timers on the indicated event for all timer rules are selected.

tracerule on | off

Globally enables (on) or disables (off) rule tracing

tracerule phases Phase

Modifies the configuration of which rule phases are enabled for tracing. The Phases value has the same format as the TraceRulePhasesparameter in the mcell.conf file. Use a plus sign ➕️ before the phase name to enable tracing for all rules in that phase. Use a minus sign (-) before the phase name to disable tracing for all rules in that phase. 

For example: 
mcontrol -n CellName phases -new, +abstract 
This command disables tracing of all rules in the new phase and enables all rules in the abstract phase.

tracerule names Name

Modifies the configuration of which rules are enabled for tracing. TheNames value has the same format as the TraceRuleNames parameter in the mcell.conf file. 


For example: 

mcontrol -n CellName tracerule names problem_rule 

This command enables tracing for the rule named problem_rule. Ifproblem_rule is of a phase that has been disabled by thetracerule phases command option, rule tracing forproblem_rule will not be enabled.

tracerule ports Traceports

Determines the category of tracing messages that are reported. TheTraceports value has the same format as the TraceRulePortsparameter in the mcell.conf file and is a comma-separated list of any of the following trace message categories:

entry
using
using_policy
using_failure
using_policy_failure
assign
For example: 
mcontrol -n CellName tracerule ports entry, assign
This command traces all entry to the specified rules, and assignments within those rules.

Dynamic rule tracing using mcontrol

While the cell is running, rule tracing configuration can be changed by using the mcontrol tracerule CLI. The tracerule control parameters for the mcontrol CLI correspond to the TraceRule parameters in the mcell.conf file.

Each time the cell starts, it reverts to the static rule tracing configuration defined in mcell.trace file.