This documentation helps you set up the configuration to find which processes want to be monitored and profiled.
Startup your service in Linux, and make sure your service already has the symbol data inside the binary file. So we could locate the stack symbol, It could be checked following these ways:
objdump --syms path/to/service
.readelf --syms path/to/service
.After your service has been started, then configure the Linux process scanner to let Rover know how to find the service. Please make sure the Linux Process Detector has been active.
Then configure the finder to locate/identity service. It contains these data configure:
You could use the ps -ef
and grep
to filter the which process you want to profile. In this case, my service is sqrt
.
$ ps -ef|grep sqrt root 2072 1790 0 14:59 pts/0 00:00:00 ./sqrt name=a
Following the command example above, you could see the last column showing the process command line is ./sqrt name=a
. We use the regex to filter the process, In this case, we could use sqrt
as the service identity.
For the demo, we update the entity data as:
OS_LINUX
.sqrt
.en0
.sqrt
.You could be following this configuration to get more configuration information.
Make sure the profiling module has been active.
You could be following this configuration to get more configuration information.
Please follow the comment to update the backend address to your SkyWalking OAP address.
core: backend: addr: localhost:11800 # please change the backend address to your SkyWalking OAP address enable_TLS: false client_pem_path: "client.pem" client_key_path: "client.key" insecure_skip_verify: false ca_pem_path: "ca.pem" check_period: 5 authentication: "" process_discovery: heartbeat_period: 20s scanner: period: 3s mode: REGEX regex: - match_cmd: sqrt layer: OS_LINUX service_name: sqrt instance_name: {{.Rover.HostIPV4 "en0"}} process_name: {{.Process.ExeName}} labels: "" profiling: active: true check_interval: 10s flush_interval: 5s task: on_cpu: dump_period: 9ms