capture_diagstats_tofile.py
The capture_diagstats_tofile.py script runs automatically on MATRIXX Engine, collecting SNMP processing statistics for diagnostic use. By default, it runs every five minutes and at each 24-hour increment, it rotates the compressed statistics file and starts collecting statistics in a new file.
This script runs automatically, and it will restart if its process stops. You can disable this script by adding a SED line to process_control_cfg_sed.extra.
Only one instance of this script can run at a time, and it will not start if another instance is already running. Because this script runs automatically when each MATRIXX Engine cluster, engine, and pod starts, do not attempt to run it manually on a component until the component is up and running.
Syntax
capture_diagstats_tofile.py --time_interval_in_seconds=seconds --file_rotation_time_in_hours=hours --file_rotation_size_in_kbytes=size_in_bytes --max_number_of_backups=max_backups --compression_level=level [-h]
Options
The capture_diagstats_tofile.py script has the following options.
- --time_interval_in_seconds=seconds, -i=seconds
- How often this script is run. By default runs it every 300 seconds (five minutes). A value of 0 also uses the default.
- --file_rotation_time_in_hours=hours, -t=hours
- How often the statistics file is rotated (closed, compressed, and replaced with a new
file). The default is every 24 hours; A value of 0 disables this option. If disabled, be
sure to specify the
--file_rotation_size_in_kbytes
option. - --file_rotation_size_in_kbytes=size_in_kbytes, -s=size_in_kbytes
- A size limit for the statistics file. When the file size reaches this limit, the file is closed and rotated. The default is 50000 (50 MB); a value of 0 disables this feature.
- --max_number_of_backups=max_backups, -n=max_backups
- The maximum number of files to store in $MTX_LOG_DIR. When the number of files reaches this number, the oldest is deleted. The default is 10; a value of 0 disables this feature.
- --compression_level=level, --c=level
- The LINUX compression level to use on the statistics file before it is sent to the SNMP server. The default is 5; a value of 0 disables compression. The range is 1-9.
- -h, --help
- Show help about the script options.
capture_diagstats_tofile.py Output Files
- SNMP Engine ID
- System information, such as the platform kernel version
- Release version
Example Output File
Engine ID: matrixx-mtx-generic-1.2.1-test1-laptop72
#Kernel: Linux test1-laptop72 3.10.0-1160.11.1.el8.x86_64 #1 SMP Mon Nov 30 13:05:31 EST 2020 x86_64 x86_64 x86_64 GNU/Linux
#Release: 5220
#---------------------------
#Timestamp: 20210323_0052
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.1.2.0 = Gauge32: 100
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.1.3.0 = Gauge32: 500
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.1.4.0 = INTEGER: 1
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.1.13.0 = Gauge32: 0
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.1.14.0 = Counter64: 0
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.1.15.0 = Counter64: 0
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.1.16.0 = Counter64: 0
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.1.17.0 = ""
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.1.18.0 = ""
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.2.3.1.1.6 = Gauge32: 6
.iso.org.dod.internet.private.enterprises.35838.1.1.1.1.2.3.1.1.9 = Gauge32: 9
.
.
.
iso.org.dod.internet.private.enterprises.35838.1.1.1.4.1.12.0 = Counter32: 0
.iso.org.dod.internet.private.enterprises.35838.1.1.1.4.1.13.0 = Counter64: 0
.iso.org.dod.internet.private.enterprises.35838.1.1.1.4.1.14.0 = Counter64: 0
.iso.org.dod.internet.private.enterprises.35838.1.1.1.5.2.1.1.1.11.65.108.101.114.116.68.98.83.99.97.110 = STRING: "AlertDbScan"
.iso.org.dod.internet.private.enterprises.35838.1.1.1.5.2.1.1.1.11.69.118.101.110.116.68.98.83.99.97.110 = STRING: "EventDbScan"
.iso.org.dod.internet.private.enterprises.35838.1.1.1.5.2.1.1.1.14.65.99.116.105.118.105.116.121.68.98.83.99.97.110 = STRING: "ActivityDbScan"
.iso.org.dod.internet.private.enterprises.35838.1.1.1.5.2.1.1.1.14.85.112.103.114.97.100.101.67.108.101.97.110.117.112 = STRING: "UpgradeCleanup"
.iso.org.dod.internet.private.enterprises.35838.1.1.1.5.2.1.1.1.16.83.117.98.115.99.114.105.98.101.114.68.98.83.99.97.110 = STRING: "SubscriberDbScan"
.iso.org.dod.internet.private.enterprises.35838.1.1.1.5.2.1.1.1.24.83.99.104.101.100.117.108.101.68.98.84.97.115.107.79.98.106.101.99.116.83.99.97.110 = STRING: "ScheduleDbTaskObjectScan".iso.org.dod.internet.privat...