How do I capture Pulse Collector memory dumps?
This information will be useful when you need to:
- Take memory dump from a running Collector process
- Configure operating system for automatically generating crash dumps so that when Collector crashes you get a crash dump
Contents
- 1 How do I capture Pulse Collector memory dumps?
- 1.1 Taking a Memory Dump of the Running Pulse Collector Process on Linux
- 1.2 Taking a Memory Dump of the Running Pulse Collector Process on Windows
- 1.3 Tuning Linux Operating System to Generate a Core Dump for the Pulse Collector in the Case it has Crashed
- 1.4 Tuning Windows 2008/2012 Operating System to Generate a Crash Dump for the Pulse Collector in the Case it has Crashed
Taking a Memory Dump of the Running Pulse Collector Process on Linux
- Open Linux terminal.
- Type gcore in the terminal window to confirm you have the GCore utility installed. If it is missing, you must install it. GCore is part of the gdb package.
- Ubuntu: sudo apt-get install gdb
- RHEL, CentOS: sudo yum install gdb
- Determine the process ID of Pulse Collector: ps -ef | grep collector
- Change to the directory where you want to store the dump: cd ~/memory_dumps
- Run commands gcore <PID> where <PID> is process ID
- You should get file core.<PID> .
- If you need to submit this core dump file to Genesys:
- Compress it using BZip2 or any method that has a better compression ratio:
- with bzip2: bzip2 -9 core.<PID>
- or with gzip: gzip -9 core.<PID>
- Submit your compressed file core.<PID>.bz2 (or core.<PID>.gz ) to the location specified by Genesys Customer Care.
- Compress it using BZip2 or any method that has a better compression ratio:
Taking a Memory Dump of the Running Pulse Collector Process on Windows
- Make sure you have ProcDump utility. If not, complete following steps
- Download freeware SysInternals ProcDump utility from this page https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx
- Extract procdump.exe from the downloaded archive to C:\Windows
- Open Windows Task Manager (by pressing Ctrl+Shift+Esc , or pressing Win+R and typing taskmgr in the Run dialog.)
-
In the Windows Task Manager, make sure you have column PID. If not:
- Choose menu item View->Select Columns...
- Check item called PID (process identifier) in the list
- In the Windows Task Manager, press button "Show processes from all users"
- In the Windows Task manager, sort processes by process name and find appropriate collector.exe and notice its PID
- Open command prompt
- Change current directory to the location where you plan to store the dump. For example: cd /D D:\MemoryDumps
- Type following command: procdump -ma -o <PID> collector.<PID>.dmp where <PID> is process ID of Collector
- You will get memory dump file named as collector.<PID>.dmp .
- If you need to submit this memory dump file to Genesys:
- Install freeware 7-Zip archiver of you don't already have it. You may download from this web site http://www.7-zip.org
- Open folder where memory dump resides in the Windows Explorer.
- Right-click on the dump file and choose menu item 7-Zip->Add to archive...
- Adjust following parameters in the Add to Archive dialog:
- Archive format: 7z
- Compression level: Ultra
- Compression method: LZMA
- Press OK and wait for compression to finish.
- Submit resulting file collector.<PID>.7z to the location specified by the Genesys Technical Support.
Tuning Linux Operating System to Generate a Core Dump for the Pulse Collector in the Case it has Crashed
-
Create new startup script /etc/init.d/core_settings with following contents (replace path to real path where you want to store core files).
#!/bin/bash echo /path/to/core/files/storage>/core.%e.%p.%s.%t > /proc/sys/kernel/core_pattern
You can use command like this to do that:
sudo vim /etc/init.d/core_settings
or
sudo nano /etc/init.d/core_settings
- Adjust file privileges:
sudo chmod 0755 /etc/init.d/core_settings - Create link to it in the startup folders:
sudo ln -s /etc/init.d/core_settings /etc/rc3.d/S01core_settings - Apply settings immediately:
sudo /etc/init.d/core_settings - Enable core dumps globally: edit file /etc/security/limits.conf, add or uncomment (if already present) the following line
* soft core unlimited - Edit /etc/profile and /etc/init.d/functions - add or uncomment following lines:
In /etc/profile (Redhat)
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1In /etc/init.d/functions (Redhat)
# make sure it doesn't core dump anywhere unless requested
ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>&1 - Restart the system
- Now core files with names formatted as core.<executable name>.<pid>.<signal #>.<timestamp> will appear in the specified folder.
- If you need to submit this core dump file to Genesys:
- Compress it (BZip2 is recommended, as long as gives better compression ratio):
- with bzip2: bzip2 -9 core.<executable name>.<pid>.<signal #>.<timestamp>
- or with gzip: gzip -9 core.<executable name>.<pid>.<signal #>.<timestamp>
- Submit resulting file core.<executable name>.<pid>.<signal #>.<timestamp> .bz2 (or core.<executable name>.<pid>.<signal #>.<timestamp> .gz ) to the location specified by the Genesys Technical Support.
- Compress it (BZip2 is recommended, as long as gives better compression ratio):
Tuning Windows 2008/2012 Operating System to Generate a Crash Dump for the Pulse Collector in the Case it has Crashed
- Open Notepad text editor
-
Enter there following text, replacing value of the DumpFolder parameter with real path where you want to store Collector crash dumps:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting] Disabled=dword:0 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\collector.exe] DumpFolder="<path to folder where you store collector dumps>" DumpCount=dword:10 DumpType=dword:2
- Save this file as collector-wer.reg .
- Double click on it in the Windows Explorer and say yes to question of Windows Registry Editor to add data to Registry.
- Now, if Collector crashes, full memory dump of Collector will appear in the specified folder.
- If you need to submit this memory dump file to Genesys:
- Install freeware 7-Zip archiver of you don't already have it. You may download from this web site http://www.7-zip.org
- Open folder where memory dump resides in the Windows Explorer.
- Right-click on the dump file and choose menu item 7-Zip->Add to archive...
- Adjust following parameters in the Add to Archive dialog:
- Archive format: 7z
- Compression level: Ultra
- Compression method: LZMA
- Press OK and wait for compression to finish.
- Submit resulting 7-Zip Archive file to the location specified by the Genesys Technical Support.
Suggested Additional Reading
- WER Settings (Windows) https://msdn.microsoft.com/en-us/library/windows/desktop/bb513638(v=vs.85).aspx
- core - coredump file http://linux.die.net/man/5/core
- limits.conf - configuration file for the pam_limits module http://linux.die.net/man/5/limits.conf
- bash ulimit command in the bash man page http://linux.die.net/man/1/bash