Loading...
Loading...
Query Coralogix continuous-profiling data with the `cx profiling` CLI — find which services use the most CPU or memory, which profile types a service has, what profiles can be filtered by, when usage spiked and which pod or version caused it, and which code paths and functions a service spends its CPU or memory on (flame graphs). Use when the user asks "which services use the most CPU", "top memory consumers", "what is service X spending CPU on", "hot functions", "flame graph for a service", "why is this service using so much CPU", "memory allocations by function", "CPU spike by pod", "which version increased CPU", "continuous profiling", "profiling data", or wants to explore profiles of a service. For how much CPU or memory a service or pod uses and whether it is saturated, use `cx-service-catalog` instead.
npx skill4agent add coralogix/cx-cli cx-profilingprofiles.cpu-profiles:Read| Command | Purpose | Key flags |
|---|---|---|
| Profiled services ranked by CPU+wall seconds ( | |
| A service's language and which profile types have data | - |
| Label keys a service's profiles can be filtered by, with their values | |
| One profile type's usage over time, split by | |
| Decoded flame graph plus the top functions by self value | |
-o json-o toon--start--endnow-1hnownownow-1h--profile-typecpuwallmemory-allocation-bytesmemory-allocation-objectsmemory-heap-bytesmemory-heap-objectsMEMORY_HEAP_BYTESmetadatahas_data: true--filterkey=v1,v2key!=v1,v2key:existskey:not-existsfiltersservices --environmentdeployment.environment.nameservices--offset--include-time-seriesflame-graph--http-timeoutcx profiling services --category cpu --limit 10 -o json
cx profiling services --category memory --environment <env> --limit 10 -o jsoncx profiling metadata <service> -o jsoncx profiling filters <service> --profile-type cpu -o jsonpodcx profiling metrics <service> --profile-type cpu --sum-by pod --limit 5 -o json
cx profiling metrics <service> --profile-type cpu --sum-by service.version --start now-24h -o jsoncx profiling flame-graph <service> --profile-type cpu --top-functions 10 -o json | jq '.top_functions'
cx profiling flame-graph <service> --profile-type cpu --filter k8s.pod.name=<pod> \
--min-node-ratio 0.05 --max-depth 20 -o jsoncputotal_cpu_secondstotal_wall_secondsmemorytotal_memory_allocations_bytestotal_heap_byteslast_activeseriestotal--limittotal_seriesunitsecondsbytesobjectstop_functionstreefunctionfilelineselftotalself_percenttotal_percentchildrenomitted_subtrees--min-node-ratio--max-depthunknownwarningsmaxBytesservicesmetricsflame-graph--min-node-ratio--max-depth.top_functionsselftotalselfmetadata--startmetadatahas_data: truecx-service-catalogcx-telemetry-querying-p <profile>profilecx-service-catalogcx-telemetry-queryingcx logscx spanscx metricscx-infra