Jump to: navigation, search

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

Taking a Memory Dump of the Running Pulse Collector Process on Linux

  1. Open Linux terminal.
  2. 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.
    1. Ubuntu: sudo apt-get install gdb
    2. RHEL, CentOS: sudo yum install gdb
  3. Determine the process ID of Pulse Collector: ps -ef | grep collector
  4. Change to the directory where you want to store the dump: cd ~/memory_dumps
  5. Run commands gcore <PID> where <PID> is process ID
  6. You should get file core.<PID> .
  7. If you need to submit this core dump file to Genesys:
    1. Compress it using BZip2 or any method that has a better compression ratio:
      1.  with bzip2: bzip2 -9 core.<PID>
      2. or with gzip: gzip -9 core.<PID>
    2. Submit your compressed file core.<PID>.bz2  (or core.<PID>.gz ) to the location specified by Genesys Customer Care.

Taking a Memory Dump of the Running Pulse Collector Process on Windows

  1. Make sure you have ProcDump utility. If not, complete following steps
    1. Download freeware SysInternals ProcDump utility from this page https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx
    2. Extract procdump.exe from the downloaded archive to C:\Windows
  2. Open Windows Task Manager (by pressing Ctrl+Shift+Esc , or pressing Win+R and typing taskmgr in the Run dialog.)
  3. In the Windows Task Manager, make sure you have column PID. If not:
    1. Choose menu item View->Select Columns...
    2. Check item called PID (process identifier)  in the list
  4. In the Windows Task Manager, press button "Show processes from all users"
  5. In the Windows Task manager, sort processes by process name and find appropriate  collector.exe and notice its PID
  6. Open command prompt
  7. Change current directory to the location where you plan to store the dump. For example: cd /D  D:\MemoryDumps
  8. Type following command: procdump -ma -o <PID> collector.<PID>.dmp  where <PID> is process ID of Collector
  9. You will get memory dump file named as collector.<PID>.dmp .
  10. If you need to submit this memory dump file to Genesys:
    1. Install freeware 7-Zip archiver of you don't already have it. You may download from this web site http://www.7-zip.org 
    2. Open folder where memory dump resides in the Windows Explorer.
    3. Right-click on the dump file and choose menu item  7-Zip->Add to archive...
    4. Adjust following parameters in the Add to Archive dialog: 
      1. Archive format: 7z
      2. Compression level: Ultra
      3. Compression method: LZMA
    5. Press OK and wait for compression to finish.
    6. 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

  1. 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

  2. Adjust file privileges: 
    sudo chmod 0755 /etc/init.d/core_settings
  3. Create link to it in the startup folders:
    sudo ln -s /etc/init.d/core_settings /etc/rc3.d/S01core_settings
  4. Apply settings immediately:
    sudo /etc/init.d/core_settings
  5. Enable core dumps globally: edit file /etc/security/limits.conf, add or uncomment (if already present) the following line
    *  soft  core  unlimited
  6. 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>&1

    In /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

  7. Restart the system
  8. Now core files with names formatted as core.<executable name>.<pid>.<signal #>.<timestamp> will appear in the specified folder.
  9. If you need to submit this core dump file to Genesys:
    1. Compress it (BZip2 is recommended, as long as gives better compression ratio):
      1.  with bzip2:  bzip2 -9  core.<executable name>.<pid>.<signal #>.<timestamp>
      2. or with gzip:  gzip -9  core.<executable name>.<pid>.<signal #>.<timestamp>
    2. 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.

Tuning Windows 2008/2012 Operating System to Generate a Crash Dump for the Pulse Collector in the Case it has Crashed

  1. Open Notepad text editor
  2. 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
  3. Save this file as collector-wer.reg .  
  4. Double click on it in the Windows Explorer and say yes to question of Windows Registry Editor to add data to Registry.
  5. Now, if Collector crashes, full memory dump of Collector will appear in the specified folder.
  6. If you need to submit this memory dump file to Genesys:
    1. Install freeware 7-Zip archiver of you don't already have it. You may download from this web site http://www.7-zip.org 
    2. Open folder where memory dump resides in the Windows Explorer.
    3. Right-click on the dump file and choose menu item  7-Zip->Add to archive...
    4. Adjust following parameters in the Add to Archive dialog: 
      1. Archive format: 7z
      2. Compression level: Ultra
      3. Compression method: LZMA
    5. Press OK and wait for compression to finish.
    6. Submit resulting 7-Zip Archive file to the location specified by the Genesys Technical Support.

Suggested Additional Reading

  1. WER Settings (Windows) https://msdn.microsoft.com/en-us/library/windows/desktop/bb513638(v=vs.85).aspx
  2. core - coredump file http://linux.die.net/man/5/core
  3. limits.conf - configuration file for the pam_limits module http://linux.die.net/man/5/limits.conf
  4. bash ulimit command in the bash man page http://linux.die.net/man/1/bash
This page was last edited on July 15, 2015, at 19:07.
Comments or questions about this documentation? Contact us for support!