Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Taking Memory Usage Periodically

 
Arka Sharma
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi,

I want to take memory usage within two hours time interval of an enterprise application ?

Regards,
Arka
 
Sudheer Bhat
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to do that in Java?
you can monitor a process via a cron job scheduled to run periodically at 2 hour intervals.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presumably you are familiar with the java.lang.Runtime methods related to memory, right?

Is that the kind of information you want to record?

Bill
 
Arka Sharma
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually the scenario is that the application is deployed in JBoss.JBoss will be up and running.Now I want to check the nenory usage details within two hour time interval.Now in linux what I do to take the memory usage is view the content of /proc/meminfo.Once before running the application once after running the application.Now since there are no other application will be running it almost give me a rough estimate of the memory usage of the application.In my local machine I also use VisualVM to do the same.But what I want this process to be automated and run within two hour interval both in Window and Linux environment.
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can look at -Xloggc option. It will log garbage collection information to seperate file & does not have much overhead. You can use tools like gc viewer to view the file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic