Summary: The following knowledge base article explains the process to modify the diagnostics logging for Strategy components from the command line in Windows and Unix environments. Both enabling and disabling logs are covered.
Introduction:
Diagnostics logging can be turned on from the command line in both Windows and Unix/Linux environments by using the mstrctl utility. This utility is described in detail in the following Strategy Knowledge Base technical note:
KB10941: What is the MSTRCtl utility and how is it used in MicroStrategy Intelligence Server 9.x?
Steps to enable logging:
mstrctl -s IntelligenceServer gsc
mstrctl -s IntelligenceServer ssc
./mstrctl -s IntelligenceServer ssc <configuration> <log_destinations> <log_destination n="NewTraceFile" tp="3" max_size="2048" callstack_message_ids=""/> </log_destinations> </configuration>
mstrctl -s IntelligenceServer gsic
./mstrctl -s IntelligenceServer ssic <configuration n="CastorServer"> <diagnostics pru="0"> <logger n="Component_name"> <dispatcher n="dispatcher_name"> <log_destination n="NewTraceFile"/> </dispatcher> </logger> </diagnostics> </configuration>
./mstrctl -s IntelligenceServer ssic <configuration n="CastorServer"> <diagnostics pru="0"> <logger n="Component_name"> <dispatcher n="dispatcher_name"> <log_destination n="TraceFile" delete="1"/> </dispatcher> </logger> </diagnostics> </configuration>
EXAMPLE
An example scenario to turn on the SMTP Sender > Trace under CastorServer Instance is shown below:
./mstrctl -s IntelligenceServer gsc <?xml version="1.0"?> <configuration> <base_tcp_port_number>34952</base_tcp_port_number> <log_path>/var/log/Strategy</log_path> <install_path>/opt/Strategy/IntelligenceServer</install_path> <log_destinations> <log_destination n="SystemLog" tp="2" callstack_message_ids="0x800438C7"/> <log_destination n="LicenseSummary" tp="3" max_size="4000" callstack_message_ids=""/> <log_destination n="DebugOutput" tp="1" callstack_message_ids=""/> <log_destination n="DSSPerformanceMonitor" tp="4" max_size="2000" callstack_message_ids=""/> <log_destination n="DSSErrors" tp="3" max_size="2048" callstack_message_ids="0x800438C7"/> </log_destinations> ...
./mstrctl -s IntelligenceServer gsic <?xml version="1.0"?> <configuration n="CastorServer"> ... <logger n="SMTPSender"> <dispatcher n="Error"> <log_destination n="DSSErrors"/> </dispatcher> <dispatcher n="Packet Trace"/> <dispatcher n="Trace"/> <dispatcher n="Verbose Packet Trace"/> </logger>
./mstrctl -s IntelligenceServer ssc <configuration> <log_destinations> <log_destination n="SMTPSenderTrace" tp="3" max_size="2048" callstack_message_ids=""/> </log_destinations> </configuration>
./mstrctl -s IntelligenceServer gsc <?xml version="1.0"?> <configuration> <base_tcp_port_number>34952</base_tcp_port_number> <log_destinations> <log_destination n="SystemLog" tp="2" callstack_message_ids="0x800438C7"/> <log_destination n="LicenseSummary" tp="3" max_size="4000" callstack_message_ids=""/> <log_destination n="DebugOutput" tp="1" callstack_message_ids=""/> <log_destination n="DSSPerformanceMonitor" tp="4" max_size="2000" callstack_message_ids=""/> <log_destination n="DSSErrors" tp="3" max_size="2048" callstack_message_ids="0x800438C7"/> <log_destination n="SMTPSenderTrace" tp="3" max_size="2048" callstack_message_ids=""/> </log_destinations>
./mstrctl -s IntelligenceServer ssic <configuration> <diagnostics> <logger n="SMTPSender"> <dispatcher n="Trace"> <log_destination n="SMTPSenderTrace"/> </dispatcher> </logger> </diagnostics> </configuration>
./mstrctl -s IntelligenceServer gsic <?xml version="1.0"?> <configuration n="CastorServer"> ... <logger n="SMTPSender"> <dispatcher n="Error"> <log_destination n="DSSErrors"/> </dispatcher> <dispatcher n="Packet Trace"/> <dispatcher n="Trace"> <log_destination n="SMTPSenderTrace"/> </dispatcher> <dispatcher n="Verbose Packet Trace"/> </logger>
For any traces setup to log under machine default, "mstrctl -s IntelligenceServer ssc" and "mstrctl -s IntelligenceServer gsc" should be used for all steps listed above.
Users should note, that when enabling diagnostics from the command line through the 'mstrctl' utility, the Intelligence Server log configuration is not automatically updated. As a result, any logging enabled while the Intelligence Server is running will need an Intelligence Server restart to take effect. Users can force the Intelligence Server to update its diagnostic configuration manually by running the command 'echo "d" > <MSTR_HOME_PATH>/IntelligenceServer/command-iserver.txt' on Unix/Linux systems, where <MSTR_HOME_PATH> is the home path chosen during installation.
To enable a new performance logging configuration, users should run the command 'echo "p" > <MSTR_HOME_PATH>/IntelligenceServer/command-iserver.txt' at the command line.
KB15868