Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Windows XP/NT help -- vmstat functionality

 
Henry Wong
author
Marshal
Pie
Posts: 21379
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too many years doing Solaris -- feel like a newbie in the Windows environment.

I need something similar to "vmstat" and/or "ps", but for windows. It could be a library that I can access from the JVM, or a process that I can call from the JVM. My main requirement is that it is core to XP or NT (I don't have to install it), as this application may be running on many machines that I don't control.

I will be grateful for any suggestions.

Thanks,
Henry
 
Dmitry Melnik
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about Task Manager?
 
Henry Wong
author
Marshal
Pie
Posts: 21379
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dmitry Melnik:
How about Task Manager?


The data presented in task manager is exactly what I need. But how do I get to it?

If there is a command line version that I can call from Java, to get the output, that would be great. Heck, I am even willing to go through JNI to some native DLL -- that the task manager is using.

This can't be that hard. Have someone done anything similar to this?

Henry
 
Dmitry Melnik
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heck, I am even willing to go through JNI to some native DLL -- that the task manager is using.

If so, get familiar with this set of functions. It's a part of Win32 API
[ March 23, 2005: Message edited by: Dmitry Melnik ]
 
Henry Wong
author
Marshal
Pie
Posts: 21379
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dmitry Melnik:
Heck, I am even willing to go through JNI to some native DLL -- that the task manager is using.

If so, get familiar with this set of functions. It's a part of Win32 API


Hoping to avoid jumping in that deep, but I guess it can't be avoided. Guess it it time to bone up on C/C++ again.

Many thanks,
Henry
 
Henry Wong
author
Marshal
Pie
Posts: 21379
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, it turns out that going through JNI was not necessary. "ps" can be simulated through "tasklist" and "vmstat" can be simulated through "logman" and "typeperf". All built-in programs in Windows.

Thanks for all the help,
Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic