New-MemoryDump
This PowerShell Cmdlet enables the user to take a new memory dump of the cache or the NCache Service/NCache Management Center. For NCache Service/NCache Management Center, you need to specify the Process Id of the Service/NCache Management Center when using the PowerShell Cmdlet. New Memory Dump is asynchronous by default - it will not wait for the memory dump to complete, unless explicitly specified when using the PowerShell Cmdlet.
Note
This feature is also available in NCache Professional.
New-MemoryDump [-Server] [-CacheName] [-ProcessId] [-WaitForCompletion] [-Port] [-Credentials] [-NoLogo]
Examples of New-MemoryDump
- This command initiates dump generation on server 20.200.20.11 for the cache named demoCache.
New-MemoryDump -Server 20.200.20.11 -CacheName demoCache
- This command initiates dump generation on server 20.200.20.11 for ProcessId 1234.
New-MemoryDump -Server 20.200.20.11 -ProcessId 1234
- This command initiates dump generation on server 20.200.20.11 for ProcessId 1234 and waits for the dump generation to complete.
New-MemoryDump -Server 20.200.20.11 -ProcessId 1234 -WaitForCompletion
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
Parameters |
Data Types |
Description |
Default Value |
-Server* |
<String> |
Specifies the NCache server name where NCache Service is running. |
- |
-CacheName* |
<String> |
Specifies cache name for which the dump needs to be created on the server specified. |
- |
-ProcessID |
<Integer> |
Specifies the Process Id for which dump needs to be created on the server specified. |
- |
-WaitForCompletion |
<SwitchParameter> |
If specified, does not exit until the memory dump is captured. |
False |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. |
False |
-Port |
<Integer> |
Specifies the server port where the NCache Service is listening. |
8250 |
-Credentials |
<pscredential> |
Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user with the appropriate permissions at the node. |
- |
new-memorydump -server [-cachename] [-processid] [-waitforcompletion] [-port] [-userid] [-password] [-nologo]
Examples of New-MemoryDump
Important
Please note that you need to enable the ptrace
flag for the creation of memory dumps in Linux else you will get the error: "Permission Denied: Failed to take memory dump. This is due to restricted memory access". Set the value of ptrace_scope
to 0
to resolve the error. Please note that this change occurs through the combination of echo, the pipe symbol (|), and the tee command, which altogether writes the new value into the system file with the necessary permissions.
- This command initiates dump generation on server 20.200.20.11 for the cache named demoCache.
new-memorydump -server 20.200.20.11 -cachename demoCache
- This command initiates dump generation on server 20.200.20.11 for ProcessId 1234.
new-memorydump -server 20.200.20.11 -processid 1234
- This command initiates dump generation on server 20.200.20.11 for ProcessId 1234 and waits for the dump generation to complete.
new-memorydump -server 20.200.20.11 -processid 1234 -waitforcompletion
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
Parameters |
Data Types |
Description |
Default Value |
-server* |
<String> |
Specifies the NCache server name where NCache Service is running. |
- |
-cachename* |
<String> |
Specifies cache name for which the dump needs to be created on the server specified. |
- |
-processid |
<Integer> |
Specifies the Process Id for which dump needs to be created on the server specified. |
- |
-waitforcompletion |
<SwitchParameter> |
If specified, does not exit until the memory dump is captured. |
False |
-nologo |
<SwitchParameter> |
Suppresses display of the logo banner. |
False |
-port |
<Integer> |
Specifies the server port where the NCache Service is listening. |
8250 |
-userid |
<String> |
Specifies the user id used to authorize the user for this operation. It is required in case security is enabled on Cache Server. This user id must be the active directory user id. |
- |
-password |
<String> |
Specifies the password of the user that is used to authorize the user for this operation. It is required in case security is enabled on Cache Server. This password must be the same as the active directory user password. |
- |