How to Enable Core Dumps on SMG

  • 7023546
  • 29-Nov-2018
  • 30-Nov-2018

Environment

GWAVA (Secure Messaging Gateway) 7

Situation

If a module is crashing, what is the procedure for enabling core dumps on the SMG on Ubuntu appliance?

Resolution

To enable core dumps on SMG, do the following:

1) Log into Putty or go to console screen of SMG server. Switch to root user by typing: sudo su
Type the password for the gwava user when prompted.

2) Create a dumps directory by typing: mkdir -p /var/dumps

3) Edit the /etc/rc.local file by typing: vim /etc/rc.local
Add the following lines above the gwava7 start command, see example (hit the insert button or the letter i, once in the file):
ulimit -n 65536
ulimit -c unlimited
sysctl -w kernel.core_pattern=/var/dumps/core.%e.%p.%t 


    Hit escape, then type :wq (this will save and exit the file. If stuck hit esc, then type :q! to exit without saving changes)

4) Stop SMG by typing: /etc/init.d/gwava7 stop

5) Make sure SMG is down by typing: /etc/init.d/gwava7/status

6) If a module is still running, wait a minute and do another status check. If some are still running find the PID for that module and kill it. To find the PID type: ps ax | grep gwava If a module needs to be killed type: kill -9 <PID>

7)  Now type each of the lines added above at the prompt. Otherwise, the server will need to be rebooted in order for the changes to take affect. Type each one separately:
Type: ulimit -c unlimited
Type: ulimit -n 65536
Type: sysctl -w kernel.core_pattern=/var/dumps/core.%e.%p.%t

8) Start SMG back up by typing: /etc/init.d/gwava7 start