File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes General Computing and the fly likes Windows XP/NT help -- vmstat functionality Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Windows XP/NT help -- vmstat functionality" Watch "Windows XP/NT help -- vmstat functionality" New topic
Author

Windows XP/NT help -- vmstat functionality

Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18840
    
  40

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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
How about Task Manager?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18840
    
  40

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

Joined: Dec 18, 2003
Posts: 328
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
Sheriff

Joined: Sep 28, 2004
Posts: 18840
    
  40

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
Sheriff

Joined: Sep 28, 2004
Posts: 18840
    
  40

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Windows XP/NT help -- vmstat functionality