How to perform automated or scheduled timeline(daily basis) profiling based on different conditions(like incresae/decrease of memory consumption etc.) in Console Profiler

Hi,
I want to profile my application which is currently running in the production server using dotMemory Console profiler. Can you please help me with the below querie?

1. How to schedule the Console profiler to take the snapshot automatically based on memory consumption  and timeline (like the snapshot will be taken automatically on the daily basis at defined time)?
2. How to setup console profiler in production server ?
3. How to set all the conditions to take the snapshot automatically on daily basis or hourly basis without manual intervention in production server?
5. How to manage or operate the console profiler which is in production server from our local system or machine?

0
2 comments

Hello,

 1. How to schedule the Console profiler to take the snapshot automatically based on memory consumption and timeline (like the snapshot will be taken automatically on the daily basis at defined time)?

dotMemory allows you to set different triggers by time interval, memory increasing or certain memory limit. The full list of options is available in console help dotMemory help <command>, e.g. dotMemory help start. Here are several arguments related to your question:

<trigger-timer>: --trigger-timer|-T[=<period>]
Get snapshot periodically by timer.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--trigger-timer|-T[=<period>] Get snapshots periodically: <hh:mm:ss> or <int>{s|m|h|d}. Default: 0:01:00

<trigger-mem-inc>: --trigger-mem-inc|-I[=<value>] [--trigger-baseline|-B=<value>]
Get snapshot when memory consumption increases by the specified value.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--trigger-mem-inc|-I[=<value>] Get snapshot when memory consumption increases by the specified value:
<int>{kb|mb|gb|%}. Default: 10%
[--trigger-baseline|-B=<value>] Trigger baseline: <int>{kb|mb|gb}

<trigger-mem-limit>: --trigger-mem-limit|-L[=<value>]
Get snapshot when memory consumption exceeds the specified limit.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--trigger-mem-limit|-L[=<value>]
Get snapshot when memory consumption exceeds the specified limit: <int>{kb|mb
|gb}. Default: 2gb

 

 2. How to setup console profiler in production server ?

We don't recommend to run your application under memory profiler on production server constantly because it'll significantly slow it down, but if you want to investigate any issue which isn't reproduced on local machine and want to check memory consumption under heavy load, you can do it for a moderate period of time. There is a two basic commands:

1. dotMemory start - allows to start standalone .NET application under profiling. This mode allows to enable full mode of collecting memory allocations data to get creation stack trace data for each allocated object, but it'll slow down the application the most. Besides, "start" mode doesn't support detach. Your application will be stopped if you finish profiling session.

2. dotMemory attach - attach profiler to already running application. This mode supports detach. Allocations data will be collected in sampling mode. This mode is more convenient for production server.

 3. How to set all the conditions to take the snapshot automatically on daily basis or hourly basis without manual intervention in production server?

You can use .bat or .cmd file to run it on remote server. Anyway, you need to access the server command line to do this. 

5. How to manage or operate the console profiler which is in production server from our local system or machine?

The answer is the same, dotMemory clt requires command line access to control it. You can use other tools to gain remote access to the server console.

0

Thanks Anna Guseva for the clarification.

 

0

Please sign in to leave a comment.