print_event_repository_loader_stats.py
The print_event_repository_loader_stats.py script displays the Event Repository Event Loader statistics for a running Event Loader.
Note: In multi-tenant MATRIXX installations, run this script on the base
Event Repository only.
Syntax
print_event_repository_loader_stats.py --host serverName|ipAddress --port portNumber [-u username] [[interval] [count]] [--version] [-s sub-domain] [-v] [--uri=full_MongoDB_uri] [--srv] [--eventDatabase TenantDatabaseName] [--authDatabase AuthenticationDatabaseName] [-h]
Options
- interval
- The interval to wait before running the script (repeating the command) again. The interval is a number in seconds. The full interval is the number in seconds (specified) plus the command runtime.
- count
- The number of times to run the script (repeat the command) in succession. If you specify an interval without specifying a count, the script repeats the command indefinitely.
- -u username, --user=username
- Specify the MongoDB user to log in as.
- -v, --verbose
- Runs the script in verbose mode and returns more details as standard output.
- --uri
- The full URI for the MongoDB or MongoDB Atlas database. If the username or password has any
special characters, they must be URI-encoded, for example, if the password
has an @ character, it must be in the URI as %40. If the URI has an
ampersand (&), the & must be escaped (preceded by a backslash
(\&)) or the full URI must be inside quotes, for
example:
uri=mongodb+srv://cluster0.8n9ep.mongodb.net/MtxEventDatabase?retryWrites=true\&option=value uri="http://host/path?var1=val1&var2=val2"
- --srv
- If this parameter is specified, an SRV-based URI is generated for a MongoDB Atlas database. If this parameter is not specified, a regular MongoDB database URI is generated.
- --version
- Show the program version number.
- --host=serverName|ipAddress
- The MongoDB server to connect to. This option specifies the host name or IP address of a
machine on which one of the
mongod
instances in your replica set is running. Connecting to a machine on which your primarymongod
is running is recommended. - --port
- The MongoDB server port to connect to. Specify this option only if the port is not the default (27017).
- -s, --sub-domain
- Specifies the sub-domain where the Event Loader is (or was). Specify this option only if the sub-domain is not the default (SubDomainID).
- --eventDatabase
- (Optional) The name of the tenant database. Specify this option as needed for tenant repository queries. The default value is
MtxEventDatabase
. If you specify a URI, and the event database is notMtxEventDatabase
, you must specify the--eventDatabase
option. - --authDatabase
- (Optional) The name of the database to be used for the authentication in the MongoDB URI. The default value is
admin
. - -h, --help
- Show help about the script options.
Script Output
This section describes the fields displayed in the output of the print_event_repository_loader_stats.py script.
Output Field | Description |
---|---|
Time | The time when the statistics were generated. All statistics are for events between the time the Event Loader service started loading events into the Event Repository and the time the statistics were generated (as indicated by the Time field in the output). |
AccumulatedReadTimeInMillisec | The time used reading from MATRIXX Event Files (MEFs). |
AccumulatedWorkingTimeInMillisec | The time used to process the MEF files. |
AccumulatedToMdcConvertTimeInMillisec | The time used for data conversion from files to the in-memory MATRIXX Data Container (MDC). |
AccumulatedToMongoDataConvertTimeInMillisec | The time used to convert from the in-memory MDC to MongoDB bulk data. |
AccumulatedMongoDbCommitTimeInMillisec | The accumulated commit time. |
ProcessedMefFiles | The number of MEF files processed. |
ProcessedCount | The number of records processed. |
ProcessedCountInBytes | The number of bytes processed. |
LoadCount | The number of records attempted to be loaded into MongoDB. |
LoadCountInBytes | The number of bytes attempted to be loaded into MONGODB. |
ThroughputPerSec | The throughput calculation (LoadCount divided by AccumulatedWorkingTimeInMillisec). |
Display Statistics for a Running Event Loader
=======================================================================
print_event_repository_loader_stats.py started on 2016-03-17 16:39:36
=======================================================================
- Event Loader 0 (sub-domain 1, pid 21647, version 5000.41322): started 2016-03-17T22:02:58+00:00 on "MtxBld04", backlog 1, last connected 2016-03-17T22:04:26+00:00, has 2 stats records. The latest is:
Time: 2016-03-17T22:03:03+00:00
AccumulatedReadTimeInMillisec: 37
AccumulatedWorkingTimeInMillisec: 4045
AccumulatedToMdcConvertTimeInMillisec: 770
AccumulatedToMongoDataConvertTimeInMillisec: 986
AccumulatedMongoDbCommitTimeInMillisec: 1844
ProcessedMefFiles: 14
ProcessedCount: 67207
ProcessedCountInBytes: 23027941
LoadCount: 62961
LoadCountInBytes: 65046966
ThroughputPerSec: 15565