Linux 上有类似 WMI 的东西吗?

发布于 2024-07-23 11:13:50 字数 65 浏览 7 评论 0原文

我喜欢整个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

无名指的心愿 2024-07-30 11:13:50

Windows Management Instrumentation (WMI) 是 Microsoft 对 WBEM(基于 Web 的企业管理)标准的实现,该标准来自分布式管理工作组。 这些标准可用于多种 *nix 系统。 作为示例,下面是一个在 Linux 系统上启用 WBEM 的 SourceForge 项目。 有一个称为 CIM(通用信息模型)的标准,DTMF 描述如下:

CIM 提供了一个通用定义
系统的管理信息,
网络、应用程序和服务,
并允许供应商扩展。
CIM 的通用定义使
供应商交换语义丰富
系统间的管理信息
整个网络。

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:

CIM provides a common definition of
management information for systems,
networks, applications and services,
and allows for vendor extensions.
CIM's common definitions enable
vendors to exchange semantically rich
management information between systems
throughout the network.

毁梦 2024-07-30 11:13:50

并不真地。 您是否使用 WMI 来获取系统参数、查询进程、更改配置或监视系统事件,或者什么?

内核通过 /proc/sys 文件系统公开大量信息和可调旋钮。 没有查询语言,只有目录和文件的有组织的层次结构。 其中一些文件是只读的、读写的或只写的; 其中一些是可以轮询的。

某些服务可能有自定义客户端来动态查询和更新配置 - chronychronyc<我想到了 /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 are pollable.

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 basic init has initctl. Newer services like HAL can be introspected and manipulated over D-Bus.

月下伊人醉 2024-07-30 11:13:50

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.

掩饰不了的爱 2024-07-30 11:13:50

我不敢苟同,但是是的,确实有。
获取 FWTS 并运行

fwts wmi -

,您将看到它是如何实现的以及可以读取/修改什么。

更多信息请参见:https://wiki.ubuntu.com/Kernel/Reference/WMI

I beg to differ, but YES, there is.
Get FWTS and run

fwts wmi -

And you will see how is it implemented and what is possible to read/modify.

More here: https://wiki.ubuntu.com/Kernel/Reference/WMI

初心 2024-07-30 11:13:50

看一下 /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.

时光病人 2024-07-30 11:13:50

也许这对你有帮助。 看看这篇文章: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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文