Main Content

mps-profile

Log profile information for server instance from command line on Windows, Linux, and macOS systems

Syntax

mps-profile [-C [path/]server_name] [state] [object...]

Description

mps-profile starts or stops the logging of server profile information in the main log based on state. object specifies the information to log. You can specify multiple objects. You can log information about server requests, such as the IP address of the client, the archives requested by the client, and the worker pool.

To set up or update the profiling options for an already running server without restarting the server, use the mps-profile command. To set up profiling options when you configure a server, specify the profile property. Running mps-profile overrides any profiling options set using the profile property.

Note

Activating profiling has a negative impact on performance.

Input Arguments

path

Path to server instance. If you omit this option, the current working folder and its parents are searched to find the server instance.

server_name

Name of the server instance to profile.

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 server requests and workers.

  • server.request — Information about server requests, which includes information about 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 workers

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 profile messages for all objects.

Examples

  • Log profile information for server requests and the worker pool.

    Type either of the following at the system command prompt:

    mps-profile on

    Or:

    mps-profile on server
  • Log profile information for server requests without turning on worker pool profiling.

    Type the following at the system command prompt:

    mps-profile on server.request
  • Log profile information about archives in the server requests and worker pool.

    Type the following at the system command prompt:

    mps-profile on server.request.archives server.worker.pool
  • Stop the logging of all profile information.

    mps-profile off
  • Stop the logging of worker pool information only.

    mps-profile off server.worker.pool

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

Introduced in R2015b

expand all

See Also

Topics