views:

277

answers:

4

I'm looking for a library that will provide this type of information:

RAM
Swap space
Number of CPUs
speed (CPU MHz)
Number of cores
Chip type

Ultimately I'll be calling into it from Java, but a C library would be fine, which I can wrap with JNI.

Platforms of interest include, but not limited to, AIX, HP-UX, Solaris, Windows.

Thanks!

A: 

Are you looking to query these systems remotely? If so, your best bet will probably be to use an SNMP library.

CaffeineFueled
We already have a process running on the box. Plan was to have that process perform discovery, and pipe the results back to an existing client application.
Ben
A: 

You may want to check out the following documentation site: http://en.wikipedia.org/wiki/Hardware_abstraction_layer

Also check out the Open Audit computer auditing and inventory tracking system http://www.open-audit.org source code and there script for auditing linux machines for examples of querying a hal database.

Norman H
A: 

Like you I was looking for a cross platform system info library and found this:

http://code.google.com/p/geekinfo/

I didn't test it yet but it might suit your needs.

good luck !

A: 

You can take a look at Sigar which supports the metrics and platforms that you want and has both C and Java APIs. It is GPL, which may or may not suit your needs.

Daniel Lopez