Systems idle process

Can someone help me out in finding the System's Idle Process time or System's Idle Process's memory usage for windows.

(Depending on this i need to do some computation)

I dont think any ready methods available and i am also new to JNI programmining.

Kindly help me out,

Thanks,

Muthu

[324 byte] By [free-side-disha] at [2007-10-3 3:20:01]
# 1
see this example: http://codeguru.earthweb.com/java/articles/310.shtml
horsona at 2007-7-14 21:12:06 > top of Java-index,Java Essentials,Java Programming...
# 2
Sorry. I guess this is only for NT and I need for XP.Also I dont have nmake with me.Thanks for ur reply.
free-side-disha at 2007-7-14 21:12:06 > top of Java-index,Java Essentials,Java Programming...
# 3
try this topic: http://forum.java.sun.com/thread.jspa?threadID=234962and specially this project: http://sourceforge.net/projects/jnative
lfschucka at 2007-7-14 21:12:06 > top of Java-index,Java Essentials,Java Programming...
# 4
probably you don't have jdk 1.2 too ... I show you how to do itNow do your homework
horsona at 2007-7-14 21:12:06 > top of Java-index,Java Essentials,Java Programming...
# 5
Thanks.But before doing i cannot go up. My leader will screw me up.I have J2Sdk 1.4. What else i need. I dont have any C++ compiler with me.Can you help me out plz...?Thanks
free-side-disha at 2007-7-14 21:12:06 > top of Java-index,Java Essentials,Java Programming...
# 6

Put in your java code:

native long getIdleProcessCPU();

native long getIdleProcessMemory();

static {

System.loadLibrary("idle_lib");

}

Generate header file for your class with javah tool.

Write C functions which read idle process info (WINAPI).

Compile and link C functions to idle_lib.dll library with one of free distributed compilers !

That's all.

horsona at 2007-7-14 21:12:06 > top of Java-index,Java Essentials,Java Programming...
# 7
Thanks.I will try it out.
free-side-disha at 2007-7-14 21:12:06 > top of Java-index,Java Essentials,Java Programming...