![]() |
#1 |
Senior Member
Join Date: Nov 2013
Location: Iran
Posts: 343
|
Get a process memory usage by Pid
how can get a process memory usage by pid number?
Is there a plug-in for this job? How to do this using System :: Call? |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,484
|
Memory usage meaning what? Which column in Process Explorer are you interested in?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Nov 2013
Location: Iran
Posts: 343
|
i need to read the column Memory (active private working set) a process by pid number
|
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,484
|
Maybe try searching MSDN?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Nov 2013
Location: Iran
Posts: 343
|
yes i searched msdn and stackoverflow but i did not get the final answer.
also i see your post HTML Code:
https://nsis-dev.github.io/NSIS-Forums/html/t-371381.html i can return private usage but the value is not true! see my test please, the jetaudio.exe memory usage in taskmanager is 12744 kb but the return value by nsis is different: |
![]() |
![]() |
![]() |
#6 |
Senior Member
Join Date: Nov 2013
Location: Iran
Posts: 343
|
For now, I've prepared a plugin for Get Process Private Memory:
http://forums.winamp.com/showthread.php?t=454590 |
![]() |
![]() |
![]() |
#7 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,484
|
Quote:
Run NSIS 3.04 setup and report the memory value you are after when on the welcome page and maybe I would have a chance. But it probably varies by Windows version. My taskmanager does not have a " the column Memory (active private working set)". IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#8 | |
Senior Member
Join Date: Nov 2013
Location: Iran
Posts: 343
|
Quote:
Each program after re-run,Occupies a new usage memory in Ram also yes! This is probably the case in different operating systems this is usage memory in nsis welcome page in first run: this is usage memory in nsis welcome page in Second run: windows Version: |
|
![]() |
![]() |
![]() |
#9 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,484
|
Taskmanager calls NtQuerySystemInformation to get this information. With WMI this is supposedly Win32_PerfRawData_PerfProc_Process:WorkingSetPrivate and as you discovered, the "Working Set - Private" performance counter.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|