I need to know how much memory my app is using (it is a long running service). I see that some people have asked about how to measue memory use. Robert McIntyre asked, "get the total memory used by a data structure?" Some of the answers imply that it is easy to get the total memory use of the app (much easier than getting the memory used by a particular data structure?). I am ignorant of the JVM. How can I find the total memory used at any given moment by my app?
Goal: I wrote a small app that uses Ring and Moustache and Enlive. It lives on my server and runs perpetually. I worry about it crashing, or becoming overloaded. I am setting up some ping services (not sure which yet, Nagios, or Puppet or something) to ask the app "Are you still alive?" I've established a special Moustache route just for the ping. It occurred to me that the ping could get some useful info, like memory, and save that to a file. That would give me the a good time series about the real world memory use, maybe every 5 minutes. I established the app with this JVM setting: :jvm-opts ["-Xmx4000m"] Within that limit, I'd like to know what is going on. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en