Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 09, 2016, 07:14:20 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Free Task Manager total resources for multiple instances?  (Read 3927 times)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Free Task Manager total resources for multiple instances?
« on: June 12, 2015, 07:55:19 AM »
I'm looking for a free Task Manager replacement in Windows 8 that will display total resource usage for multiple instances of a process.  As example google chrome.  If I use Windows Task Manager or the one built into chrome it still makes me do the math for total memory usage etc..  I am on a computer.  It should be able to sum that stuff up for me.

Anyone know a good freebie with the feature?

kunkel321

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 464
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #1 on: June 12, 2015, 09:52:22 AM »
I'd be surprised if good old Process Explorer from
http://www.sysinternals.com/
can't do it...   8)

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,100
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #2 on: June 12, 2015, 01:03:11 PM »
To my knowledge Process Explorer only shows the usage of resources per process. It doesn't sum the resource usage of linked processes. At least I didn't see such an option in version 15.22 (or previous ones) of Process Explorer.

Process Hacker is an excellent alternative to Process Explorer, but it doesn't sum resource usage of linked processes either.

NirSoft also doesn't appear to have a tool that sums up resource usage.

All your other requests are managed very well by either Process Explorer or Process Hacker.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #3 on: June 12, 2015, 02:14:22 PM »
(Never mind.  I thought SystemExplorer did it.  But I think it was just that the memory used by the parent process looked close to the total for the child processes.  Still no joy.)  :)
« Last Edit: June 12, 2015, 02:19:57 PM by MilesAhead »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,476
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #4 on: June 12, 2015, 10:54:36 PM »
What if you show the Process Memory->Virtual Size column in Process Explorer?

eg.

2015-06-13 13_52_20.pngFree Task Manager total resources for multiple instances?

Actually, while that figure for Dragon seemed reasonable, some of the figures reported by other processes are a bit large.
« Last Edit: June 12, 2015, 11:03:07 PM by 4wd »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #5 on: June 13, 2015, 07:23:17 AM »
What if you show the Process Memory->Virtual Size column in Process Explorer?

eg.
 (see attachment in previous post)
Actually, while that figure for Dragon seemed reasonable, some of the figures reported by other processes are a bit large.

With chrome the parent process virtual memory is less than even the largest single child, not to mention the sum of the children.  I guess nobody feels a need for it.  Or multi-instance is new enough it hasn't trickled into features.  I guess right now mostly browsers are doing it.  But I think soon many programs will run multiple instances.  At least for desktop programs.

DK2IT

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 14
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #6 on: June 30, 2015, 02:19:49 PM »
To get the total memory of a multi-process you can use a little PowerShell script (taken from here)
$chrome = get-process chrome -ErrorAction SilentlyContinue
if ($chrome -ne $null)
{
$m = ps chrome | measure PM -Sum ; ("chrome Physical Memory {0:N2}MB " -f ($m.sum / 1mb))
$m = ps chrome | measure WS -Sum ; ("chrome Working Set {0:N0}MB " -f ($m.sum / 1mb))
}
I've found that Working Set seem to give a better indication of real memory occupation.
Of course you can change process name and obtain memory usage for others multi-process applications, like opera, iexplore etc.
(with this system you can also sum several process like Firefox + plugin-container + FlashPlayerPlugin)

Or, you can use Process Hacker, the latest release (v2.36) include a tray popup window (can be sticky) that show the memory / cpu usage of most active processes,
and for multi-process app show the sum of all process (also for cpu!).

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #7 on: June 30, 2015, 02:34:27 PM »
To get the total memory of a multi-process you can use a little PowerShell script


Thanks for the script and the tip.    :Thmbsup:

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #8 on: June 30, 2015, 03:33:36 PM »
I could write a program by the time I can figure out how to turn this thing on.  I guess that's why I've never used Powershell.  The enable command line never does.

Edit: got it to stop giving an error.  But when I run the script it just comes back to the prompt.  No busy cursor, no output no nothing.

« Last Edit: June 30, 2015, 04:07:39 PM by MilesAhead »

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,115
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #9 on: July 01, 2015, 02:49:07 AM »
But when I run the script it just comes back to the prompt.  No busy cursor, no output no nothing.

Works for me (execution and a kind of result).

Just copy the whole code into a PoSh console and press enter twice.


Or, if the code is in a *.ps1 text file, add a PoSh-kind of PAUSE statement, one way is this:
Code: C++ [Select]
  1. $myProcess = "TOTALCMD"
  2. $ProcessData = get-process $myProcess -ErrorAction SilentlyContinue
  3. if ($ProcessData -ne $null)
  4. {
  5.         $m = ps $myProcess | measure PM -Sum ; ("$myProcess Physical Memory {0:N2}MB " -f ($m.sum / 1mb))
  6.         $m = ps $myProcess | measure WS -Sum ; ("$myProcess Working Set {0:N0}MB " -f ($m.sum / 1mb))
  7. }
  8. read-host Done! Press Enter to exit...

Quote from: Result
TOTALCMD Physical Memory 16,13MB
TOTALCMD Working Set 30MB
Done! Press Enter to exit...:


Or is it smtg other?

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,476
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #10 on: July 01, 2015, 03:31:48 AM »
Edit: got it to stop giving an error.  But when I run the script it just comes back to the prompt.  No busy cursor, no output no nothing.

Given what @Cocoa has just gone through with my Powershell script here, it may pay to check what version you're running and update if necessary.

To check the version, open a Powershell and enter: $PSVersionTable.PSVersion

You should get 4.0 if you're running the latest.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #11 on: July 01, 2015, 05:41:20 AM »
Edit: got it to stop giving an error.  But when I run the script it just comes back to the prompt.  No busy cursor, no output no nothing.

Given what @Cocoa has just gone through with my Powershell script here, it may pay to check what version you're running and update if necessary.

To check the version, open a Powershell and enter: $PSVersionTable.PSVersion

You should get 4.0 if you're running the latest.

I get 3.0.-1.-1

First time I ever saw negative build numbers?

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #12 on: July 01, 2015, 05:45:49 AM »
It says on Technet I have to get W 8.1 to install PS 4.0 :down:

This Laptop often will not complete a restore point.  Never mind doing updates.  I'll use some other method.  I never like PS anyway.  :)

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,476
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #13 on: July 01, 2015, 06:17:00 AM »
It says on Technet I have to get W 8.1 to install PS 4.0 :down:

Not according to this Technet page.

Quote
Windows PowerShell 4.0 runs on the following versions of Windows.
  • Windows 8.1, installed by default
  • Windows Server 2012 R2, installed by default
  • Windows® 7 with Service Pack 1, install Windows Management Framework 4.0 to run Windows PowerShell 4.0
  • Windows Server® 2008 R2 with Service Pack 1, install Windows Management Framework 4.0 to run Windows PowerShell 4.0

Quote
I never like PS anyway.  :)

That's just the age old fear of the new and unknown talking  ;)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #14 on: July 01, 2015, 06:51:15 AM »
It says on Technet I have to get W 8.1 to install PS 4.0 :down:

Not according to this Technet page.

Quote
Windows PowerShell 4.0 runs on the following versions of Windows.
  • Windows 8.1, installed by default
  • Windows Server 2012 R2, installed by default
  • Windows® 7 with Service Pack 1, install Windows Management Framework 4.0 to run Windows PowerShell 4.0
  • Windows Server® 2008 R2 with Service Pack 1, install Windows Management Framework 4.0 to run Windows PowerShell 4.0

Nowhere in the list do I see Windows 8.0


Quote
Quote
I never like PS anyway.  :)

That's just the age old fear of the new and unknown talking  ;)

I don't think so.  I did bash sh and zsh scripting on Linux where there was some rhyme and reason involved.  :)

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,115
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #15 on: July 01, 2015, 07:03:48 AM »
 
But no need for PSv4, the above script even works in PSv2 and v3

One can test in launching PS as: powershell -version 2.0

And you can force a script to run a specific PS version

(Both above mentioned ways if required PS and .NET version is installed)



Code: C++ [Select]
  1. #Requires -version 2.0
  2. $host.version
  3. $myProcess = "TOTALCMD"
  4. $ProcessData = get-process $myProcess -ErrorAction SilentlyContinue
  5. if ($ProcessData -ne $null)
  6. {
  7.         $m = ps $myProcess | measure PM -Sum ; ("$myProcess Physical Memory {0:N2}MB " -f ($m.sum / 1mb))
  8.         $m = ps $myProcess | measure WS -Sum ; ("$myProcess Working Set {0:N0}MB " -f ($m.sum / 1mb))
  9. }
  10. read-host Done! Press Enter to exit...


Quote from: Output
 Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1
TOTALCMD Physical Memory 20,09MB
TOTALCMD Working Set 37MB
Done! Press Enter to exit...:

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1
TOTALCMD Physical Memory 20,15MB
TOTALCMD Working Set 37MB
Done! Press Enter to exit...:



 

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #16 on: July 01, 2015, 07:32:04 AM »
And how are you running this script?  I don't think I've seen a powershell I've tried that ran as advertised.  There's always some gotcha'


 
But no need for PSv4, the above script even works in PSv2 and v3

One can test in launching PS as: powershell -version 2.0

And you can force a script to run a specific PS version

(Both above mentioned ways if required PS and .NET version is installed)



Code: C++ [Select]
  1. #Requires -version 2.0
  2. $host.version
  3. $myProcess = "TOTALCMD"
  4. $ProcessData = get-process $myProcess -ErrorAction SilentlyContinue
  5. if ($ProcessData -ne $null)
  6. {
  7.         $m = ps $myProcess | measure PM -Sum ; ("$myProcess Physical Memory {0:N2}MB " -f ($m.sum / 1mb))
  8.         $m = ps $myProcess | measure WS -Sum ; ("$myProcess Working Set {0:N0}MB " -f ($m.sum / 1mb))
  9. }
  10. read-host Done! Press Enter to exit...


Quote from: Output
 Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1
TOTALCMD Physical Memory 20,09MB
TOTALCMD Working Set 37MB
Done! Press Enter to exit...:

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1
TOTALCMD Physical Memory 20,15MB
TOTALCMD Working Set 37MB
Done! Press Enter to exit...:



 

DK2IT

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 14
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #17 on: July 01, 2015, 08:38:45 AM »
First time also I have got several error with PowerShell and this script  >:(
If I remember well, you must enable some authorization, and when you launch by commandline you must enter the FULL path of the script.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #18 on: July 01, 2015, 08:55:12 AM »
First time also I have got several error with PowerShell and this script  >:(
If I remember well, you must enable some authorization, and when you launch by commandline you must enter the FULL path of the script.

I changed the setting to unrestricted.  But as I mentioned before, running the script the cursor just goes back to the prompt. No error no nothing.  I have no intention of doing stuff with Powershell so it is not really worth delving into it. In fact I should probably change the setting back to block scripts.

I am just surprised no task manager clone I tried does this.  I wonder if Linux top command does.  Most likely it did a decade ago.  :)

DK2IT

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 14
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #19 on: July 01, 2015, 09:01:41 AM »
Well, you can try to get something similar with tasklist and an AWK for windows or similar (like advanced calculation using FOR command).
For task manager, try Process Hacker, work quite well.

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,115
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #20 on: July 01, 2015, 09:05:16 AM »
If you get an error from running a posh script, just read the given message to solved that issue.
If you ask for help, give details what and how you do things and which error you get, best, copy there & paste here.
I just found my crystal bowl broken, sorry  :P



 

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #21 on: July 01, 2015, 09:07:52 AM »
Well, you can try to get something similar with tasklist and an AWK for windows or similar (like advanced calculation using FOR command).
For task manager, try Process Hacker, work quite well.

I have the latest process hacker. I don't see any utility to total the memory usage for process instances.

shot.png

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #22 on: July 01, 2015, 09:09:20 AM »
If you get an error from running a posh script, just read the given message to solved that issue.
If you ask for help, give details what and how you do things and which error you get, best, copy there & paste here.
I just found my crystal bowl broken, sorry  :P



 

I already mentioned twice there was no error message.  This is not worth spending more time on.  Thanks for the input.

DK2IT

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 14
    • View Profile
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #23 on: July 01, 2015, 09:23:39 AM »
Here a quick normal windows script
@echo off
set /a total=0
for /f "tokens=5 delims=," %%a in ('tasklist /FI "IMAGENAME eq chrome*" /FO CSV /NH') do set /a total+=%%a
echo %total%MB
set total=
Of course instead a fix name like "chrome" you can use %1 to use argument on commandline.

For Process Hacker, you must hover the mouse pointer on the systray icon of the program for some seconds, and that's show up the window, unfortunately only in this windows the process are grouped.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Free Task Manager total resources for multiple instances?
« Reply #24 on: July 01, 2015, 09:30:16 AM »

For Process Hacker, you must hover the mouse pointer on the systray icon of the program for some seconds, and that's show up the window, unfortunately only in this windows the process are grouped.

Thanks.  I see it now.  :)

Edit:  btw your script works.  :)

@echo off
set /a total=0
for /f "tokens=5 delims=," %%a in ('tasklist /FI "IMAGENAME eq %1*" /FO CSV /NH') do set /a total+=%%a
echo %total%MB
set total=
« Last Edit: July 01, 2015, 09:37:07 AM by MilesAhead »