windows – 用于监视App池内存使用情况的免费应用程序或脚本
发布时间:2020-12-14 00:20:29 所属栏目:Windows 来源:网络整理
导读:我想要一个显示以下内容的应用程序或脚本: 工作进程,应用程序池名称,内存使用情况以及可选的cpu使用情况. 我熟悉使用 %windir%system32inetsrvappcmd.exe list wp 但这只是获取了workerproces id和app pool名称.然后我接受并交叉引用任务管理器.这是有效
我想要一个显示以下内容的应用程序或脚本:
工作进程,应用程序池名称,内存使用情况以及可选的cpu使用情况. 我熟悉使用
但这只是获取了workerproces id和app pool名称.然后我接受并交叉引用任务管理器.这是有效的,但我想要一个更快 – 几乎仪表板显示信息.我想必须有某种解决方案来显示信息,而不需要像过程浏览器那样点击.有人特别喜欢他们使用的东西吗?在PowerShell中这是可能的吗?
如果您没有IIS 7和提供程序,则可以使用WMI.附加脚本适用于大多数需求,CPU使用率除外.将以下脚本保存为get-webserverapppoolstats.ps1(或任何您想要的).
您可以使用以下命令运行脚本: ./Get-WebServerAppPoolStats.ps1’Server1′,’Server2′,’Server3′-IntegratedAuthentication param ( $webserver = $null,$username,$password,[switch]$IntegratedAuthentication) BEGIN { $path = $MyInvocation.MyCommand.Path if ($webserver -ne $null) { if ($IntegratedAuthentication) { $webserver | &$path -IntegratedAuthentication } else { $webserver | &$path -username $username -password $password } } $OFS = ',' $Fields = 'CommandLine','Name','CreationDate','ProcessID','WorkingSetSize','ThreadCount','PageFileUsage','PageFaults' $query = @" Select $fields From Win32_Process Where name = 'w3wp.exe' "@ $AppPool = @{Name='Application Pool';Expression={($_.commandline).split(' ')[-1]}} $Process = @{Name='Process';Expression={$_.name}} $RunningSince = @{Name='Running since';Expression={[System.Management.ManagementDateTimeconverter]::ToDateTime($_.creationdate)}} $Memory = @{Name='Memory Used';Expression={'{0:#,#}' -f $_.WorkingSetSize}} $Threads = @{Name='Thread Count';Expression={$_.threadcount}} $PageFile = @{Name='Page File Size';Expression={'{0:#,#}' -f $_.pagefileusage}} $PageFaults = @{Name='Page Faults';Expression={'{0:#,#}' -f $_.pagefaults}} } PROCESS { $server = $_ if ($server -ne $null) { if ($IntegratedAuthentication) { $result = Get-WmiObject -Query $query -ComputerName $server } else { $securepassword = ConvertTo-SecureString $password -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential -ArgumentList $username,$securepassword $result = Get-WmiObject -Query $query -ComputerName $server -Credential $cred } $Server = @{Name='Server';Expression={$server}} $result | Select-Object $Server,$AppPool,$Process,$RunningSince,$Memory,$Threads,$PageFile,$pageFaults } } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 如何在Windows操作系统中配置或安装GEARMAN?
- api – 还有可能让Skype的用户在线状态?
- reporting-services – ColdFusion报告选项
- Win2008 Server配置PHP环境 Win2008 Server配置
- Windows的哈希
- windows – 执行`VBoxManage`时出错(Vagrant / Virtualbox)
- Windows上的最大进程ID是多少?
- 如何使用Windows命令行查找文件中字符串的出现次数?
- 在Windows XP下安装Apache+MySQL+PHP环境
- Windows/Linux命令查看文件MD5,SHA1,SHA256 文件校验
推荐文章
站长推荐
热点阅读