如何查看/报告 Windows Azure CPU 和内存使用情况?

发布于 2024-12-08 16:39:19 字数 185 浏览 0 评论 0原文

查看和报告 Windows Azure 上托管应用程序的所有服务器实例的 CPU 和内存使用百分比统计信息的最简单方法是什么?

是否有必要编写一个 Worker Role 来监视和记录 CPU 和内存使用情况?或者,Windows Azure 中是否有某些东西可以自动记录此信息,您只需点击即可?如果需要构建自定义的东西,最好的方法是什么?

What's the easiest method of viewing and reporting on the CPU and Memory usage percentage statistics on all the server instances hosting an application on Windows Azure?

Is it necessary to write a Worker Role that monitors and logs the CPU and Memory usage? Or, is there something in Windows Azure that automatically logs this that you can just tap into? If something custom needs to be built, what is the best method to do so?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

淡看悲欢离合 2024-12-15 16:39:19

听起来像是 Windows Azure 诊断的工作。基本思想是 (a) 您在角色代码中启用诊断来管理您希望收集的诊断类型,(b) 此诊断数据由在每个部署的实例上运行的代理代表您收集,以及 (c)代理将每种类型的数据发送到定义的位置,以便所有部署的实例中的数据都位于同一位置(将位于 Azure Blob 存储或 Azure 表存储中,以更合适的为准,具体取决于数据的性质)数据)。

一般文档此处,以及性能计数器的详细信息(针对内存和CPU)是 这里Neil 博客上的一般“操作方法”文章

没有必要为此编写特殊的辅助角色,也不需要自定义代码(除了用于指定您希望收集日志记录的内容的小样板代码之外)。

Sounds like a job for Windows Azure Diagnostics. The basic idea is (a) you enable diagnostics in your role code to govern the types of diagnostics you wish to gather, (b) this diagnostics data is collected on your behalf by an agent that runs on each deployed instance, and (c) the agents send each type of data to a defined location so that the data across all deployed instances is in the same place (which will be in Azure Blob Storage or Azure Tables Storage, whichever is a more natural fit, depending on the nature of the data).

General Documentation here, and specifics on Performance Counters (for memory and CPU) are here. General "how to" writeup on Neil's blog.

It is not necessary to write a special Worker Role for this, and no custom code required (other than the small boilerplate code to specify what it is you wish to gather logging about).

紫﹏色ふ单纯 2024-12-15 16:39:19

是的,有用于将性能计数器注销到表存储的内置功能。有很多文章涵盖了这一点,但是 这似乎是MSDN 上的起点

简短的概述是,当您的角色时,您可以在代码中设置性能计数器启动或者如果您不希望诊断程序一直运行,您可以远程更改您的设置。按照计划,记录的性能计数器将复制到指定的 Azure 存储帐户中的 WADPerformanceCountersTable。从那里您可以 自己查询或者您可以使用商业工具,例如Cerebrata Diagnostics Manager 它将为您绘制图表,就像您习惯在 Windows 中看到的那样(以及与 Azure 中的诊断相关的许多其他内容)

Yes there is built in functionality for logging out performance counters to table storage. There are plenty of articles out there which cover this, but this seems to be the jumping off point on MSDN.

The short overview is that you can set them up performance counters in code when your role starts or if you don't want diagnostics running all the time you can change your settings remotely. On a scheduled basis the logged performance counters get copied to the WADPerformanceCountersTable in the azure storage account you specified. From there you can query it yourself or you can use a commercial tool like Cerebrata Diagnostics Manager which will draw graphs for you like you're used to seeing in Windows (and lots of other things related to diagnostics in Azure)

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