-ve value in powershell with command ps- for attributes PM(K) VM(M)

-ve value in powershell with command ps- for attributes PM(K) VM(M)
what does that -ve value mean? how should I interpret it.

If we ignore tomcat process  for sometime, my question is why we will get a -ve value and how should I understand it/2017-11-02-12_53_45-Document1---Word.png
porambokuAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

oBdACommented:
That's just an overflowing 32bit counter, and it means you're using an old version of Powershell (use $PSVersionTable to find out).
The negative ones you see are actually aliases for the real properties:
Run the following command to see the aliases:
ps | select -first 1 | gm -MemberType AliasProperty

Open in new window

You'll probably get something like this:
   TypeName: System.Diagnostics.Process

Name    MemberType    Definition
----    ----------    ----------
Handles AliasProperty Handles = Handlecount
Name    AliasProperty Name = ProcessName
NPM     AliasProperty NPM = NonpagedSystemMemorySize
PM      AliasProperty PM = PagedMemorySize
SI      AliasProperty SI = SessionId
VM      AliasProperty VM = PagedMemorySize
WS      AliasProperty WS = WorkingSet

Open in new window

What you should get is something like this (note the 64 at the end of some of the properties):
   TypeName: System.Diagnostics.Process

Name    MemberType    Definition
----    ----------    ----------
Handles AliasProperty Handles = Handlecount
Name    AliasProperty Name = ProcessName
NPM     AliasProperty NPM = NonpagedSystemMemorySize64
PM      AliasProperty PM = PagedMemorySize64
SI      AliasProperty SI = SessionId
VM      AliasProperty VM = PagedMemorySize64
WS      AliasProperty WS = WorkingSet64

Open in new window

The object's definition is documented here:
Process Properties
https://msdn.microsoft.com/en-us/library/system.diagnostics.process_properties.aspx
Note that NonpagedSystemMemorySize, PagedMemorySize, PagedMemorySize, WorkingSet are all marked "Obsolete", because they're 32bit values and can (and will, like in your case) overflow on a 64bit system. They've been replaced with the respective ...64 values.

For further processing of the values, use the ...64 properties.
For console output compatible to the default one, use this:
Get-Process | Format-Table -AutoSize -Property `
	Handles,
	@{n='NPM(K)';	e={[math]::Round($_.NonpagedSystemMemorySize64 / 1KB)}},
	@{n='PM(K)';	e={[math]::Round($_.PagedMemorySize64 / 1KB)}},
	@{n='WS(K)';	e={[math]::Round($_.WorkingSet64 / 1KB)}},
	@{n='CPU(s)';	e={[math]::Round($_.CPU, 2)}},
	Id,
	SI,
	ProcessName

Open in new window

Edit:Made the (K) entries actually "K"s, rounded CPU to two decimals like the original.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.