VMX-Capture services are controlled via the vmxadmin command. This was covered earlier in Controlling VMX-Capture using the vmxadmin command , but this section covers the commands which are specific to VMX-Capture management. In particular, we focus on PMUX and Probe controls.
Service Control
The following commands can be used to control VMX-Capture services :
Example Command | Description |
|---|---|
vmxadmin vmx status | Outputs the statuses of all processes, including process ID (PID) numbers if that process is running. |
vmxadmin -e fxdemo vmx-pmux stop | Stop all local PMUX in the fxdemo environment |
vmxadmin vmx-pmux start | Start all local PMUX. |
vmxadmin vmx-pmux my-instance status | Show the status of a specific PMUX (with id my-instance). |
vmxadmin vmx-p3 status | Show status of all local p3 instances. |
vmxadmin vmx-p3 TCP_RTT status | Show status of specific (TCP_RTT) p3 instance. |
Probe Control
Probes operate within PMUX processes and so the vmxadmin command syntax for controlling probes differs slightly from the syntax for controlling services. In the examples below, the probes that we are controlling are in a PMUX called capVP:
vmxadmin vmx-pmux capVP probe -args -c start -p adhoc_cap | Start a probe named adhoc_cap (tries to find adhoc_cap.stack.json first then adhoc_cap.capture.config) in the capVP PMUX instance. |
vmxadmin vmx-pmux capVP probe -args -c status | Checks status of all probes in the capVP PMUX instance. |
The status command is particularly useful as it provides the following information:
The time that the probe was added to the PMUX
The decoder library used (
probe.sowill be used for a Stack Probe,packcap_decoderor a variation of that will be used for a Capture Probe)The configuration file or command line arguments that the probe is using.
Here's an example of these commands used in sequence:
[valentine]$ vmxadmin vmx-pmux statusvalentine-vmx-pmux-VP (pid 1695193) is running...valentine-vmx-pmux-2VP (pid 1696773) is running...valentine-vmx-pmux-capVP (pid 1481145) is running...valentine-vmx-pmux-cap2VP (pid 1481404) is running...[valentine]$ vmxadmin vmx-pmux capVP probe -args statusdoProbe vmx -e "valentine" vmx-pmux capVP probe -args statusStarting PMUX capVP/opt/tsa/bin/libpcap_packet_decoder -p 8220 --max_packet_size_bytes 131072 --max_batch_size 1000 --pcap_buffer_size 100000 -i eth1PROBE_TYPE none /vmx/install/valentine/server/config/agent/pmux/capVP/.capture.configstatus for probesResult:Array of 1 items: Index 0 Array of 1 items: Index 0 Struct of 3 members: Key: String: 'added_timestamp' Value: Datetime: 2024.06.10 11:18:10.000000 Key: String: 'decoder' Value: String: '/opt/tsa/lib/packcap_decoder_367.so' Key: String: 'identifier' Value: String: 'config:name=capVP compression=gzip capture_file_type=pcapns output_dir=/data/capture file_prefix=capVP filter= rotate_period_seconds=10 retention_policy=24h influxdb_dsn=influxdb://vmxadmin:grafstats@localhost:8086/capture influxdb_measurement=pcap ' [valentine]$ vmxadmin vmx-pmux VP probe -args -c statusdoProbe vmx -e "valentine" vmx-pmux VP probe -args -c statusStarting PMUX VP/opt/tsa/bin/libpcap_packet_decoder -p 8210 --max_packet_size_bytes 131072 --max_batch_size 1000 --pcap_buffer_size 100000 -i eth1PROBE_TYPE none /vmx/install/valentine/server/config/agent/pmux/VP/.capture.configstatus for probesResult:Array of 1 items: Index 0 Array of 2 items: Index 0 Struct of 3 members: Key: String: 'added_timestamp' Value: Datetime: 2024.06.10 15:16:36.000000 Key: String: 'decoder' Value: String: '/opt/tsa/lib/probe.so' Key: String: 'identifier' Value: String: 'config:name=vmxbenchmarkstatistics filter="len=0" protocols=ethernet stat_collector=vmxbenchmarkstatistics' Index 1 Struct of 3 members: Key: String: 'added_timestamp' Value: Datetime: 2024.06.10 15:16:38.000000 Key: String: 'decoder' Value: String: '/opt/tsa/lib/probe.so' Key: String: 'identifier' Value: String: 'json:/vmx/install/ps2testenv/server/config/agent/pmux/VP/Port1_UDP_ingress.stack.json'Monitoring VMX-Capture PMUX health using the XMLRPC service
The XMLRPC is the interface for PMUX stats. These are useful for troubleshooting individual probe issues.
VMX-Explorer also uses XMLRPC calls to populate the System Health dashboards in VMX-Explorer.
The following commands are examples of how you can interrogate the XMLRPC service to find out information about the probes running in each PMUX:
Example Command | Description |
|---|---|
vmxadmin vmx xmlrpc | Find all xmlxprc ports for all instance types. These are defined in the env-instances.sh file for each instance. XMLRPC ports just needs to be unique on the server; this port is used for process monitoring. |
vmxadmin vmx xmlrpc -args getStats | Get all stats available for VMX-Capture instances that support XMLRPC - useful for an overview of a system. The output of this command is suitable to feed into telegraf. |
vmxadmin vmx-pmux MYPMUX xmlrpc -args callMethod system.listMethods | Lists the different XMLRPC methods that you can use to interact with this PMUX (output in JSON format). |
vmxadmin vmx-pmux MYPMUX xmlrpc -args callMethod listDecoders | Lists the decoders running within this PMUX. You will be provided with the date that the probe was added to the PMUX, the decoder used (probe.so for a Stack Decoder), and the configuration file or command line arguments that the probe is using. |
vmxadmin vmx-pmux MYPMUX xmlrpc -args callMethod getStatistics | Provides CPU and packet count statistics (in JSON format) for all of the probes within the PMUX. |
vmxadmin vmx-pmux MYPMUX xmlrpc -args getStats | Provides CPU and packet count statistics (in CSV format) for all of the probes within the PMUX. This provides a slightly easier overview (for a human reader) compared to the JSON format. |