Main Content

profile

Log server profile information

Syntax

--profile state object

Description

profile logs server profile information in the main log for an object when the state is on. The default state is off, where the server does not log any profile information. You can log profile information for multiple objects by specifying multiple profile properties.

To set up profiling options when you configure a server, specify the profile property. If you update the profile property for a server that is already running, you must restart the server for the update to take effect. To set or update the profiling options for an already running server without having to restart the server, use the mps-profile command. Running mps-profile overrides any profiling options set using the profile property.

Note

Activating profiling has a negative impact on performance.

Parameters

state

Flag to control whether the server writes profile information to the main log. Valid states are:

  • on — Log profile information.

  • off — Do not log profile information.

object

Information to log. Valid objects are:

  • server — Information about requests that the server receives and worker pool

  • server.request — Information about server requests, which includes information about the requested archives and clients that make the requests

  • server.request.archive — Information about archives in the request

  • server.request.client — Information about clients that make the request

  • server.worker and server.worker.pool — Information about the worker pool

The objects are hierarchical. For example, specifying server.request implies specifying server.request.archive and server.request.client.

If you do not specify an object, the server logs information for all the objects.

Examples

Log profile information for all the objects.

--profile on

Log profile information for all server requests only.

--profile on server.request

Log profile information for the clients in a request and workers.

--profile on server.request.client
--profile on server.worker

The following is an excerpt of the main log that contains profiling information for all objects.

93 [2020.03.19 13:05:56.554236] [profile] [client:[::1]:62736] [component:mymagic] [connection_id:2] 
[function:magic] [mode:sync] [request_id:0:1:1][service:http-connection] [type:request_arrive] 
Request arrived and was placed in the queue.
94 [2020.03.19 13:05:56.554236] [profile] 
Request to allocate next available worker
95 [2020.03.19 13:05:56.555240] [profile] 
Lease created for worker-1
96 [2020.03.19 13:05:56.555240] [profile] [client:[::1]:62736] [request_id:0:1:1] [type:request_start] [worker_id:1] 
Request started executing on worker 1
...
99 [2020.03.19 13:05:56.558233] [profile] [client:[::1]:62736] [request_id:0:1:1] [type:request_finish] [worker_id:1] 
Request completed with HTTP status 200
100 [2020.03.19 13:05:56.558233] [profile] 
Lease terminated for worker-1
101 [2020.03.19 13:05:56.558233] [profile] 
worker-1 PASSED health check; returning to the pool

Version History

expand all