• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Get memory usage of a pid....

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an application, called BASE, running on a Unix machine. I have second application, called TESTER, running on a Windows machine. TESTER provides load testing for BASE.

Is there a way, from within TESTER, to use Java to get the CPU Usage and memory footprint of BASE from UNIX remotely?

Thank you for your advice and response in advance!

JD
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmmm. I suppose it depends on what you're doing and how you're doing it. I've done load testing using HttpUnit or one of its friends, but the actual statistics were in terms of how many responses/second it could get. Which was the ultimate metric, but obviously isn't fine-grained enough to pinpoint backend bottlenecks.

For general /proc information reading on a remote machine, you'd pretty much have to have a server process that read the stats localy and presented them to a network requester (client app). Some possibilities on this might range from simple SNMP up to the expensive commercial tools such as CA or IBM.
 
J.D. Thompson
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim,

Thank you very much for the well thought out response!!!

I was afraid that might be the case. My boss does not want me to run a server-app to collect the info as she does not want anything that would potentially affect the testing results from BASE.

I am afraid that I will have to use something like JConsole on the same machine as the TESTER program is running and manually record the values. I was hoping for something more elegant.

SNMP would work just fine but BASE is not SNMP compliant right now.

Again, thank you so very, very much for taking time out of your day to provide a quality response!!!

Take care!

JD
 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JConsole can measure on a remote machine. I'd forgotten about it, but as of Java 5, the JVM has extensive built-in JMX support, which is what JConsole uses.

I'd been thinking more along the lines of raw machine resource consumption, not just what's going on inside the JVM. JConsole can measure the JVM's processes quite well.
reply
    Bookmark Topic Watch Topic
  • New Topic