Windows-Server-2008
如何監控基於 Windows 的 JVM 的記憶體使用情況並在它過高時觸發警報?
我有一個在 Windows 2008 中作為 JVM 執行的應用程序。我想監控它的記憶體使用情況,並在記憶體使用量達到特定門檻值時發送電子郵件。是否有免費的實用程序或方法可以做到這一點?
Win2008 作業系統可以針對性能計數器門檻值條件發送警報。
Part 1 # Perfmon Launch Performance Monitor (perfmon.msc) Create a new User Defined Data Collector Set Choose to create manually after naming Select Performance Counter Alert Click Add - choose the Object, Counter and Instance to monitor. Process/Java.exe/Working Set Specify the alert threshold Choose "open properties for this data collector set" Specify a start schedule if the server is on a reboot schedule Change the sample interval. Alert repeats at this interval when value it above threshold Under Alert task, give it a name (like sendMail) Start the Data Collector Set Part 2 # Schedule Tasks Open up scheduled tasks (compmgmt.msc/configuration/task scheduler) Create a task, not a basic task Name it the exact same name you did in the above section (like sendMail) Check "user is logged in or not" so that it runs all the time. Change username if necessary. Create a new email action under the Action tab Enter all the info for from, to, subject, etc. Enter the SMTP server. You will be prompt for the password to run the task when you are not logged on.