使用PowerShell获取Web Apps磁盘使用情况 [英] Get the Web Apps disk usage by use PowerShell
问题描述
我需要一些帮助.如何使用PowerShell获得Azure Web App或Azure Web App Plan的磁盘使用情况?我尝试了这些变体:
I need some help. How I can get Disk usage for Azure Web App or for Azure Web App Plan by use PowerShell? I tried these variants:
1.获取Web App的指标
1. Get metrics for Web App
> (Get-AzureRmMetricDefinition -ResourceId $WebApp.Id).Name
Value LocalizedValue
----- --------------
CpuTime CPU Time
Requests Requests
BytesReceived Data In
BytesSent Data Out
Http101 Http 101
Http2xx Http 2xx
Http3xx Http 3xx
Http401 Http 401
Http403 Http 403
Http404 Http 404
Http406 Http 406
Http4xx Http 4xx
Http5xx Http Server Errors
MemoryWorkingSet Memory working set
AverageMemoryWorkingSet Average memory working set
AverageResponseTime Average Response Time
AppConnections Connections
Handles Handle Count
Threads Thread Count
PrivateBytes Private Bytes
IoReadBytesPerSecond IO Read Bytes Per Second
IoWriteBytesPerSecond IO Write Bytes Per Second
IoOtherBytesPerSecond IO Other Bytes Per Second
IoReadOperationsPerSecond IO Read Operations Per Second
IoWriteOperationsPerSecond IO Write Operations Per Second
IoOtherOperationsPerSecond IO Other Operations Per Second
RequestsInApplicationQueue Requests In Application Queue
CurrentAssemblies Current Assemblies
TotalAppDomains Total App Domains
TotalAppDomainsUnloaded Total App Domains Unloaded
Gen0Collections Gen 0 Garbage Collections
Gen1Collections Gen 1 Garbage Collections
Gen2Collections Gen 2 Garbage Collections
2.获取Web应用计划的指标:
2. Get metrics for Web App Plan:
> (Get-AzureRmMetricDefinition -ResourceId $WebAppPlan.Id).Name
Value LocalizedValue
----- --------------
CpuPercentage CPU Percentage
MemoryPercentage Memory Percentage
DiskQueueLength Disk Queue Length
HttpQueueLength Http Queue Length
BytesReceived Data In
BytesSent Data Out
3. Get-AzureRmResource
3. Get-AzureRmResource
4. Get-AzureRmAppServicePlanMetrics(不幸的是,我们没有关于该小命令的文档)
4. Get-AzureRmAppServicePlanMetrics (unfortunately, we have bad documentation for this comandlet)
我真的找不到使用powershell来获得磁盘使用率的方法.
I really don't find ways to get disk usage by use powershell.
推荐答案
使用PowerShell在App Service Plan中的网站磁盘使用情况. 此外,建议您检查一下以下文档说明了有关 Azure Webapp磁盘使用量扩展 (针对Webapp). Azure Web应用程序 磁盘使用情况是基于Web的文件资源管理器,其中列出了网站大小的所有文件夹.它提供有关文件和文件夹名称,大小,文件数量,最后修改日期和磁盘使用百分比的详细信息.这个工具提供了像 文件夹视图,以便于解析.看看是否有帮助.
Suggest you to check the link for getting Disk Usage for Websites in App Service Plan using PowerShell. Also, I recommend you to check the following document which explains about the Azure Webapp Disk Usage extension for Webapp . The Azure Web Apps Disk Usage is a web based File Explorer which lists all folders for your website with size. It provides detailed information about files and folders name, size, number of files, last date modified and percentage of disk usage. This tool provides a tree like folder view for easier parsing. See if this helps.
您可以在powershell命令下面尝试以下操作以获取 Appservice计划中托管的网站的磁盘使用情况.
You may try these below powershell commands to get the disk usage of Websites hosted in Appservice plan.
Get-AzureRmResource -ResourceGroupName YourResourceGroupName -ResourceType Microsoft.Web/sites/usages -ResourceName YourAppServiceName -ApiVersion 2016-03-01
Get-AzureRmResource -ResourceGroupName YourResourceGroupName -ResourceType Microsoft.Web/serverfarms/usages -ResourceName YourAppServiceName -ApiVersion 2016-03-01
免责声明:此回复包含对第三方万维网的引用地点. Microsoft为方便您而提供此信息.微软不控制 这些网站,尚未测试在这些网站上找到的任何软件或信息;因此,Microsoft无法对在此找到的任何软件或信息的质量,安全性或适用性做出任何陈述.存在着内在的危险 使用Internet上发现的任何软件,Microsoft提醒您在从Internet检索任何软件之前,请确保您完全了解风险.
Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
--------------- -------------------------------------------------- -----------------------------
如果此答案有帮助,请单击标记为答案"或投票.要提供有关您的论坛体验的其他反馈,请单击
If this answer was helpful, click "Mark as Answer" or Up-Vote. To provide additional feedback on your forum experience, click here.
这篇关于使用PowerShell获取Web Apps磁盘使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!