Linux 上有类似 WMI 的东西吗?
我喜欢整个 WMI 概念,并且我确实可以在 Linux 下使用它(在某些脚本中)。 Linux系统有类似的东西吗?
I like the whole WMI concept, and I could really make use of it under Linux (in some scripts). Is there something like that for Linux systems?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
Windows Management Instrumentation (WMI) 是 Microsoft 对 WBEM(基于 Web 的企业管理)标准的实现,该标准来自分布式管理工作组。 这些标准可用于多种 *nix 系统。 作为示例,下面是一个在 Linux 系统上启用 WBEM 的 SourceForge 项目。 有一个称为 CIM(通用信息模型)的标准,DTMF 描述如下:
Windows Management Instrumentation (WMI) is Microsoft's implementation of the WBEM (Web Based Enterprise Management) standard from the Distributed Management Task Force. These standards are available and used in several flavors of *nix systems. Just as an example, here is a SourceForge project that enables WBEM on Linux systems. There is a standard called CIM (Common Information Model) which is described by the DTMF as follows:
并不真地。 您是否使用 WMI 来获取系统参数、查询进程、更改配置或监视系统事件,或者什么?
内核通过
/proc
和/sys
文件系统公开大量信息和可调旋钮。 没有查询语言,只有目录和文件的有组织的层次结构。 其中一些文件是只读的、读写的或只写的; 其中一些是可以轮询的。某些服务可能有自定义客户端来动态查询和更新配置 - chrony 的
chronyc<我想到了 /code>,但即使是最基本的
init
也有initctl
。 像 HAL 这样的新服务可以通过 D-Bus。Not really. Are you using WMI to get system parameters, or to query processes, or to change configuration, or monitor for system events, or what?
The kernel exposes a lot of information and tunable knobs via the
/proc
and/sys
filesystems. No query language, just a organized hierarchy of directories and files. Some of these files are read-only, read-write, or write-only; some of them arepoll
able.Some services may have custom clients to query and update configuration on the fly -- chrony's
chronyc
comes to mind, but even the very most basicinit
hasinitctl
. Newer services like HAL can be introspected and manipulated over D-Bus.OpenLMI 似乎就是为了这个目的而设计的......它提供了监视和控制基于 Linux 的服务器的工具。
还有用于 GNU/Linux 的 WBEM 代理(例如 OpenPegasus)。
实际上 OpenLMI 似乎使用 Pegasus 作为外部接口。
OpenLMI seems to be designed for exactly that purpose... It provides instrumentation to monitor and control Linux-based servers.
There is also WBEM agents for GNU/Linux (like OpenPegasus).
It actually seems that OpenLMI uses Pegasus as the external interface.
我不敢苟同,但是是的,确实有。
获取 FWTS 并运行
,您将看到它是如何实现的以及可以读取/修改什么。
更多信息请参见:https://wiki.ubuntu.com/Kernel/Reference/WMI
I beg to differ, but YES, there is.
Get FWTS and run
And you will see how is it implemented and what is possible to read/modify.
More here: https://wiki.ubuntu.com/Kernel/Reference/WMI
看一下 /proc 接口。 您可以在那里获得很多系统信息。 还有许多优秀的实用程序用于收集系统信息。 sysstat 软件包始终是我这些天首先安装的东西之一。
编辑:您也可以随时查询 SNMP。 默认情况下会暴露很多信息。
Take a look at the /proc interfaces. You can get a lot of system information there. There are also many excellent utilities for gathering system information. The sysstat packages are always one of the first things I install these days.
Edit: You can always query SNMP as well. There is a lot of information exposed by default.
也许这对你有帮助。 看看这篇文章:http://www.aldeid.com/wiki/Wmic-linux< /a>
Maybe it could be helpful for you. Have a look at this post: http://www.aldeid.com/wiki/Wmic-linux