Get-process command giving a negative value during the monitoring process on a remote computer

I execute this command on my system

get-process $Processname -computername $Computername 

but in the output it gives me a negative working set and the value Paged memory size Output:

 Name ID VM PeakVM WS PeakWS Thread Handle ---- -- -- ------ -- ------ ------ ------ FusionA 10724 -1282 -988 -1777 -1697 232 2085 FusionA 10724 -1281 -988 -1746 -1697 232 2091 FusionA 10724 -1280 -988 -1713 -1697 232 2099 FusionA 10724 -1279 -988 -1707 -1697 232 2108 FusionA 10724 -1277 -988 -1702 -1697 232 2118 

Plz will tell me how to find this problem. For those who do not understand what I mean, there is no need to tear apart, as I explain this more. At first I do something like this:

 if($env:Processor_Architecture -eq "x86") { write "`nrunning on 32bit" $a = @{Expression={$_.Name.SubString(0,7)};Label="Name";width=7}, ` @{Expression={$_.ID};Label="ID";width=6}, ` @{Expression={$_.PagedMemorySize/1024};Label="VirtualMemory";width=10}, @{Expression={$_.PeakPagedMemorySize/1024};Label="PeakVirtualMemory";width=8}, @{Expression={$_.WS/1024};Label="WorkingSet";width=11}, @{Expression={$_.PeakWorkingSet/1024};Label="PeakWorkingSet";width=14}, @{Expression={$_.threads.count};Label="Threads";width=6}, @{Expression={$_.Handles};Label="Handles";width=10} } else { write "`nrunning on 64bit" $a = @{Expression={$_.Name.SubString(0,7)};Label="Name";width=7}, ` @{Expression={$_.ID};Label="ID";width=6}, ` @{Expression={$_.PagedMemorySize64/1024};Label="VirtualMemory";width=10}, @{Expression={$_.PeakPagedMemorySize64/1024};Label="PeakVirtualMemory";width=10}, @{Expression={$_.WorkingSet64/1024};Label="WorkingSet";width=11}, @{Expression={$_.PeakWorkingSet64/1024};Label="PeakWorkingSet";width=14}, @{Expression={$_.threads.count};Label="Threads";width=6}, @{Expression={$_.Handles};Label="Handles";width=10} } 

After that, I run the following command:

 get-process $Processname -computername $Computername | format-table $a -wrap 
+6
source share
1 answer

Try the following:

 get-process $Processname -computername $Computername | ft Name,ID,VirtualMemorySize64,PeakVirtualMemorySize64,WorkingSet64,PeakWorkingSet64 

Your bit check should be removed, and you should use only 64-bit properties. Old properties are deceiving. A source

+7
source

Source: https://habr.com/ru/post/917531/


All Articles