我想找到单个进程的性能,例如SqlServer"
I want to find performance of single process, as example "SqlServer"
我应该写哪些命令来找出两件事:
Which commands I should write to find out 2 things:
我找到了很多列出所有进程的解决方案,但我只想得到 1 个,即 SqlServer.
I found lot of solutions listing all processes, but I want to get only 1 i.e. SqlServer.
推荐答案获取SQL server进程信息的命令:
The command to get SQL server process information:
Get-Process SQLSERVR获取任何以 S 开头的进程的信息的命令:
The command to get information for any process that starts with S:
Get-Process S*获取 SQLServer 进程正在使用的虚拟内存量:
To get the amount of virtual memory that the SQLServer process is using:
Get-Process SQLSERVR | Select-Object VM获取进程工作集的大小,以千字节为单位:
To get the size of the working set of the process, in kilobytes:
Get-Process SQLSERVR | Select-Object WS要获取进程正在使用的可分页内存量,以千字节为单位:
To get the amount of pageable memory that the process is using, in kilobytes:
Get-Process SQLSERVR - Select-Object PM要获取进程正在使用的不可分页内存量,以千字节为单位:
To get the amount of non-pageable memory that the process is using, in kilobytes:
Get-Process SQLSERVR - Select-Object NPM获取 CPU(进程在所有处理器上使用的处理器时间量,以秒为单位):
To get CPU (The amount of processor time that the process has used on all processors, in seconds):
Get-process SQLSERVR | Select-Object CPU要更好地理解 Get-Process cmdlet,请在此处查看 technet 上的文档.
To better understand the Get-Process cmdlet, check out the documentation on technet here.
更多推荐
如何获取 CPU 使用率 &PowerShell脚本中特定进程消耗的内存
发布评论