javasystem-information

How to get the processor name and registered to informations using java?


How we can get the processor name and registered to informations from PC? How is it possible through Java? I'm using windows OS.

Refer this image.

enter image description here


Solution

  • There is a library called Sigar out there that can do all those fancy things.

    The sigar jar can be called 'standalone' to explore the system:

    $ java -jar sigar.jar
    sigar> free
                 total       used       free
    Mem:       8388608    7940428     448180
    -/+ buffers/cache:    5872060    2516548
    Swap:       262144      95296     166848
    RAM:        8192MB
    

    For this to work, you also need the respective .dll or .so in the classpath

    In RHQ-project we use Sigar for many of those statistics - you can browse the code here.