Managing Caplin Platform with the CMC
In this tutorial we shall explore a few management features offered by the CMC which can be useful to manipulate a live environment without stopping the server.
Toggle RTTP logging for individual users
It is possible to turn on RTTP server side logging for an individual user’s sesions without altering the Liberator configuration file.
Follow the steps below:
-
In a previous tutorial we enabled RTTP logging for the "admin user" by editing Liberator’s rttpd.conf file in the Deployment Framework’s overrides directory and restarting the server.
-
Use the test client to connect as "user1" and make a request or a trade.
-
Notice that RTTP logs are not created by Liberator in the "var/rttp" directory. They are only created for user "admin".
-
In Liberator’s detailed view in the CMC, navigate to the "Users" tab, locate the "user1" and turn on "Start RTTP Logging".
-
Notice that a new log file is created in the "var/rttp" directory for user1.
Eject Users' Sessions
Try terminating user1’s session from the CMC "Users" tab.
You can also terminate an individual user’s subscription via this view. |
Changing Log Level
INFO is the default logging level for all Liberator logs. Setting this to DEBUG will cause the generation of several large log files which will probably cause disk space issues on the server after some time. However, you may wist to switch to this logging level even during production when your clients are experiencing some abnormal behaviour. The CMC enables you to easily and quickly change the log levels for individual logs.
Follow the steps below:
-
Open up Liberator’s event log using the command:
tail -f servers/Liberator/var/event-rttp.log
. Notice that most log lines are at the INFO level and there are no more detailed logs. -
Open up Liberator’s detailed view in the CMC and navigate to the "Logs" tab. Select the "event_log" and set the log level to DEBUG.
-
The following two lines will appear in the event log:
<timestamp>: INFO: Processing UDP Command 'event_log-log-level' with arguments 'DEBUG' <timestamp>: NOTIFY: Logging level switched to DEBUG
All subsequent activity will also be logged at DEBUG level. E.g. for a new subscription:
<timestamp>: DEBUG: 00i2NRr6acOYG56DuZUveq REQUEST /FX/GBPUSD (/FX/GBPUSD) [096F9F10] <timestamp>: DEBUG: Creating new tracker-object </FX/GBPUSD> <timestamp>: DEBUG: Adding service timeout in 10.000000 seconds for request </FX/GBPUSD> in service <PricingAdapterPricingSvc1> <timestamp>: DEBUG: We can request object </FX/GBPUSD> from peer 0
Try this yourself
Note that you can also cycle log files via this view. This may be useful when the existing log files are very large and you wish to begin analysing new activity on a fresh log file.
You can find more information about the CMC on our website.