如何使用java获取处理器名称并注册到信息? [英] How to get the processor name and registered to informations using java?

查看:106
本文介绍了如何使用java获取处理器名称并注册到信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何从PC获取处理器名称并注册到信息?如何通过Java实现?我正在使用Windows操作系统。

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

请参阅此图片。

推荐答案

有一个名为 Sigar 的图书馆可以做所有那些花哨的事情。

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

sigar jar可以称为'standalone'来探索系统:

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

为此,您还需要在类路径中使用相应的.dll或.so

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

RHQ-project 中,我们使用Sigar获取其中许多统计信息 - 您可以浏览代码这里

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

这篇关于如何使用java获取处理器名称并注册到信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆