Previous
viam-server
The RDK (Robot Development Kit) that powers viam-server includes several debug endpoints that expose server internals.
These endpoints can be helpful during development or when troubleshooting complex issues:
pprofSetting enable_web_profile to true in your machine configuration allows you to visualize runtime profiling data by opening a locally hosted webpage that displays profiling data.
The pprof tool provides the following information about machine performance:
For more detailed information on using pprof, refer to the Go pprof documentation.
To enable the pprof endpoints, set enable_web_profile to true in your machine configuration:
enable_web_profile field at the root level of your configuration:
{
"components": [...],
"services": [...],
"enable_web_profile": true
}
The debug endpoints expose internal details about your machine’s configuration and runtime behavior. Only enable these endpoints in development environments.
Once enabled, you can access the pprof interface by navigating to https://localhost:8080/debug/pprof/ in your browser.
The following pprof routes are available:
/debug/pprof/cmdline: Command line arguments used to start the process/debug/pprof/profile: CPU profile data (30-second sample by default)/debug/pprof/symbol: Symbol lookup for program counters/debug/pprof/trace: Execution trace datagraphThe /debug/graph endpoint shows a graphical representation of the machine resources managed by the RDK.
To access this endpoint, visit https://localhost:8080/debug/graph on the machine.
To view different layouts, use the layout query parameter:
The following example URL specifies the circo layout:
https://localhost:8080/debug/graph?layout=circo
Available layout options include:
dot (default): Hierarchical layoutneato: Spring model layoutfdp: Force-directed layoutsfdp: Multiscale version of fdp for large graphscirco: Circular layouttwopi: Radial layoutosage: Array-based layouttext: raw DOT text of the graph, for use with external toolsWas this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!