通过WMI或T-SQL获取总CPU# [英] Get Total CPU # via WMI or T-SQL

查看:48
本文介绍了通过WMI或T-SQL获取总CPU#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想要所有进程的列表,只想要一个总百分比,就像您在Windows taskmanager中看到的那样.

I don't want the list of all process, just a total percentage like you would see in windows taskmanager.

我将通过ColdFusion使用此信息,但是我在尝试查找当前cpu使用总数时遇到各种问题.

I will be using this information via coldfusion, but i am having all kinds of problems just trying to find a total number of current cpu usage.

我不在乎它是来自wmi还是t-sql,我只想要一个总数,我将使用该总数来填充一个计量表,通过ajax将显示我当前的CPU使用率...

I don't care if it comes from wmi or t-sql, i just want a total number for which i will be using to populate a gauge chart that via ajax will be showing my current cpu usage percentage...

谢谢...

推荐答案

您可以使用 ColdFusion和WMI .作为此文章中的示例vbscirpt代码.

You can use the Win32_PerfRawData_PerfOS_Processor WMI class to get this information. In your query you would use Win32_PerfFormattedData_PerfOS_Processor.Name='_Total'. See the article ColdFusion and WMI for more information on using WMI as well as the sample vbscirpt code in this article.

这篇关于通过WMI或T-SQL获取总CPU#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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