collectl2pcp - Linux
Overview
collectl2pcp continuously collects Linux system metrics and converts them into the Performance Co-Pilot (PCP) pmlogger format. It is useful for integrating existing collectl data collection into a PCP-based monitoring framework.
Syntax
collectl2pcp [options] [interval] [[output file] | -]
Options/Flags
- -V, –version: Print version information and exit.
- -d, –debug: Enable verbose debugging messages.
- -h, –help: Print usage information and exit.
- -i, –interval: Interval between data collections in seconds. Default: 10.
- -t, –max-time: Maximum run time in seconds. Default: 0 (unlimited).
- -o, –output: Output file to write data to. Default: stdout.
- -p, –port: PCP port number used for communication. Default: 44321.
- -H, –hostname: Hostname or IP address of PCP server. Default: localhost.
Examples
Simple usage:
collectl2pcp 10 output.log
With maximum time limit:
collectl2pcp -t 600
Sending to a remote PCP server:
collectl2pcp -H my-pcp-server -p 12345
Common Issues
- Error connecting to PCP server: Ensure that the PCP daemon is running and the correct hostname/port are provided.
- Missing data points: Check that collectl is collecting the desired metrics. Enable debug mode (-d) for additional diagnostic information.
Integration
With other PCP tools: Use pmlogger to integrate the collected data into PCP archives and pmchart to visualize it.
With Grafana: Use the PCP integration plugin to import data into Grafana dashboards.
Related Commands
- collectl: Collects system metrics in native format.
- pmlogger: Logs data to a PCP archive.
- pmchart: Displays data from PCP archives in graphical form.