Java obtains virtual machine memory, operating system memory and their threads

Why get virtual machine memory and operating system memory?

Virtual machine memory, which mainly refers to JVM. In order to prevent server downtime caused by JVM memory problems, it is necessary to monitor JVM memory. When a certain value is reached, timely notify by email to prevent greater losses caused by online downtime. The same is true here for monitoring the memory of the operating system. Because on a server, Tomcat, mysql, redis, mongodb, ZABBIX, nexus, Jenkins, maven, etc. all occupy the memory of the operating system.

Especially tomcat, MySQL and so on, a large number of logs are generated online every day, and these logs cannot be deleted. Of course, these can be backed up regularly through shell scripts. But take my last company for example. A server usually runs 5 to 6 applications. Although these five to six applications mainly focus on CRM and ERP, although they do not have high requirements for website performance and thread concurrency, they will also have a large number of log output online. These logs are usually very helpful to solve some hidden bugs, and they will also occupy the memory of the system.

For mail monitoring, please refer to my article: use of spring scheduled tasks and how to use mail monitoring server

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>