Add java dump on memory error parameters

To create a java dump file on java if the app fails.

Add the below to the java startup configuration

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/logs/dumpfile"

Increase swap size via file

If you find you need to increase the swapsize on linux, simply run the below.

Create a swap file – example below creates 2GB file (1024 x 2072 = 2097152 blocksize) to change the size simply times the swap you need by 1024 and append the number to the count option.

dd if=/dev/zero of=/swapfile1 bs=1024 count=2097152
mkswap /swapfile1 ; chmod 600 /swapfile1

Then enable the swap by running the below

swapon /swapfile1

To confirm the swap has been added use free -m to check.

total used free shared buffers cached
Mem: 5963 4371 1592 0 23 2140
-/+ buffers/cache: 2207 3755
Swap: 3071 0 3071

Esxi – Add historical stats to go over the 1 hour limit

The free version of esxi only allows you to view 1 hour of data through the vsphere tool.

To enable further historical stats simply amend the configuration file located within /etc/vmware/hostd directory. Amend the historical stats figure from false to true.

vi /etc/vmware/hostd/config.xml
<!-- Enable historical stats collection -->
<historicalStatsEnabled> true </historicalStatsEnabled>