> Hello all,
>
[quoted text clipped - 4 lines]
> Thanks,
> Todd
On Unix, you can get a bunch of information by looking at files in the
/proc folder. Note that different Unix flavors have different files, and
the format of the individual files is very different between Linux &
Solaris.
For Windows, there are NtQueryInformationProcess &
NtQuerySystemInformation, but those functions are pretty specific to Task
Manager. On Vista / Win 2008, you can use PSAPI, but there are some
lower-level APIs that will give you the same information on some earlier
versions of Windows. Don't expect much for Win 95/98/Me though (they don't
even have task manager - and for a reason).
On the Java end, there is the Java Attach API that will give you
information about Java processes on the local machine. As process
managment is pretty intimate with the OS kernel, there aren't many Java
APIs that I can think of that offer platform independant access.
HTH,
-Zig
Arne Vajhøj - 08 Mar 2008 00:01 GMT
> For Windows, there are NtQueryInformationProcess &
> NtQuerySystemInformation, but those functions are pretty specific to
> Task Manager. On Vista / Win 2008, you can use PSAPI, but there are some
> lower-level APIs that will give you the same information on some earlier
> versions of Windows. Don't expect much for Win 95/98/Me though (they
> don't even have task manager - and for a reason).
I think PSAPI is in 2000 and newer.
Arne
Zig - 08 Mar 2008 00:21 GMT
>> For Windows, there are NtQueryInformationProcess &
>> NtQuerySystemInformation, but those functions are pretty specific to
[quoted text clipped - 4 lines]
>
> I think PSAPI is in 2000 and newer.
Ooops, you're right. I glanced and spotted the Vista only functions :/
Looks MS even provides a DLL if you need to run PSAPI on NT 4.
-Zig
> I want to create a task tracking utility that has insights into system
> information much like the Windows Task Manager does. I do not know
> which API(s) to start researching for appropriate methods. Any hints?
I don't think Java is a good choice of language for that.
You can do:
Java GUI---(JNI call)---C code that get the info
but unless that program are doing something else where
Java is needed, then it seems unnecessary complex.
Arne