Sunday, 10 August 2014

What to do when your java virtual machine is out if memory, when you java virtual machine has a memory leak? How to get alarm that java virtual machine has this issue? When user calls you up that java application do not work, you will easily find java heap: out of memory message in java log. But how to get alarm when memory leak starts and out of memory java message starts to show in you log? I you use zabbix as you monitoring system then this is easy.Write a simples script that will loo for "out of memory" pattern in last 10 or t 20 lines of java virtual machine log file. When this pattern starts to show in last 10 or 20 lines,this will trigger alarm on zabbix server and that will send mail or sms to you!