Deployment with a Profiler
less than a minute
You can deploy the Edge Delta Agent with a profiler. The Edge Delta Agent is a Go-based binary that (when specified during deployment) can expose CPU and memory profiling information. This information can be useful to understand specific activity, such as understanding why CPU usage is high. After deployment, to obtain the data, you can run a command to download a report.
Deploy the Agent with a Profiler
To deploy the agent with a profiler, follow the regular installation instructions for each agent type; however, you must add the environment variable PROFILER_PORT for port 6060.
- Linux example
- Docker Example
You can only add a profiler while you deploy an agent. You cannot add a profiler to an existing agent deployment.
Obtain a Profiler Report
You can view the profiler report and send it to Edge Delta for analysis.
- Run the following command to install pprof, which requires golang installed:
go install github.com/google/pprof@latest
- Run the following command to visualize pprof results:
pprof -web /tmp/cpu.pb.gz
For information on heap, run:
curl -sK -v http://localhost:8080/debug/pprof/heap --output /tmp/heap.pb.gz
For information on CPU, run:
curl http://localhost:6060/debug/pprof/profile?seconds=60 --output /tmp/cpu.pb.gz
For information on goroutine, run:
curl http://localhost:6060/debug/pprof/goroutine --output /tmp/goroutine.pb.gx