Welcome Guest.   Make a donation to an author on the site November 01, 2014, 02:48:06 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the Practical Guide to DonationCoder.com Forum Search Features
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE - Memory utilization  (Read 24897 times)
kfitting
Charter Member
***
Posts: 574


View Profile Give some DonationCredits to this forum member
« on: August 22, 2005, 06:16:36 AM »

Got a quick request for an app I could use at work.  Basically I need to keep track of an apps memory usage.  I was going to write something in AutoIt, but couldnt find any way to determine the memory usage of a specific process.  I turned to AutoHotKey, but that had nothing as well.  Asked in the AutoIt forums, but couldnt get an answer.  What I would love is for someone to give instructions for how to find a process' memory usage so I could write my own script.... but, if that is impossible, if someone could code a quick app for me that would be great. 

Requirements:
- Choose ONE executable to track
- Set an alarm so if the exe goes above a certain threshold a tooltip or messagebox or tray balloon would pop up with userdefinable text (including the amount of memory)


I dont want a bunch of features.... just a quick and dirty app!  THanks,

Kevin
« Last Edit: September 19, 2005, 08:54:31 PM by mouser » Logged
skywalka
Member
**
Posts: 253


View Profile Give some DonationCredits to this forum member
« Reply #1 on: August 23, 2005, 03:22:15 AM »

Windows Task Manager lists a processes memory usage.
Logged
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,958



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: August 23, 2005, 05:02:59 AM »

WinTasks Pro 5 might do what you want.

It now includes a script language so you could possibly produce a script to raise an alarm when CPU usages goes above a certain level.

Not sure how easy the script language is to use though.

See: Sample Scripts for WinTasks at http://www.liutilities.co...kspro/whitepapers/paper9/
The built-in scripting language in WinTasks 5 Professional can be a very powerful tool. On this page, you can find a collection of sample scripts.

Sample Script #1
This script will decrease the priority of Internet Explorer if it uses more than 30% of the CPU.
 
  if process_file = "iexplore.exe" and process_cpu_usage > 30 then
dec
endif

Logged

kfitting
Charter Member
***
Posts: 574


View Profile Give some DonationCredits to this forum member
« Reply #3 on: August 23, 2005, 05:43:18 AM »

Thanks for the suggestions.  Unfortunately it's not a big enough priority here at work to spend $50 for!  The problem with Windows task manager is that you have to watch it.  The mechanical engineers here at work want to monitor their CAD program for memory usage... you'd think 2 gig of memory would be enough, but it's not.  It's a very specific task, which is why I wanted to write an AutoIt script. Then I found out that there is no easy way to do this!  Any other suggestions?  Freeware might work, but it's more of a convienience tool if anything.  Thanks,

Kevin
Logged
skywalka
Member
**
Posts: 253


View Profile Give some DonationCredits to this forum member
« Reply #4 on: August 23, 2005, 05:47:20 AM »

Try doing a search here:
http://shellcity.net/
Logged
AbteriX
Charter Honorary Member
***
Posts: 1,050


Member #520

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: August 23, 2005, 07:46:56 AM »

...
Requirements:
- Choose ONE executable to track
- Set an alarm so if the exe goes above a certain threshold a tooltip
or messagebox or tray balloon would pop up with userdefinable text (including the amount of memory)

I didn't tested this but,
iam imaging you could use
- Sysinternals ProcessExplorer (Column => CPU-History)
- AutoHotKeys ">PixelSearch<" (Searches a region of the screen for a pixel of the specified color(s).)
- IF "red color is found" => MsgBox

=======================
Joke of the day:
I'm not into working out. My philosophy: No pain. No pain.
Carol Leifer

Logged

Greetings, Stefan.
Veign
Charter Honorary Member
***
Posts: 993



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: September 07, 2005, 05:21:13 PM »

Is this Idea open for development.  If so, I would happily create an application per the OP specs.

Let me know and I can knock something up...
Logged

kfitting
Charter Member
***
Posts: 574


View Profile Give some DonationCredits to this forum member
« Reply #7 on: September 07, 2005, 06:42:41 PM »

Yeah, still open as far as I'm concerned... I haven't talked to the guys who requested it about it recently, but it could be handy to have around while testing new software.  Could I add one requirement?  If at all possible, no installer and no registry changes.  IT people at work have gone a rampage recently and this would allow it to remain "under the wire" so to speak.  Thanks,

Kevin
Logged
Veign
Charter Honorary Member
***
Posts: 993



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: September 07, 2005, 06:45:19 PM »

I would not be able to adhere to the no installation part as software I write requires components to be installed.  I can work with the no registry changes, at least from the application is concerned.  The installer would make entries in the registry...

Sorry about that and let me know if that is a show stopper.
Logged

kfitting
Charter Member
***
Posts: 574


View Profile Give some DonationCredits to this forum member
« Reply #9 on: September 07, 2005, 06:53:03 PM »

Well, not a showstopper, I still think the app could be useful to me here at home and also to other people.  We can still install stuff at work, it's just not looked down on very well (silly rules!  They want to secure a network that has NO internet access!  ... and they still force us to use M$ products like IE... seems kind of backwards!).  So go ahead and code away!

Kevin
Logged
Veign
Charter Honorary Member
***
Posts: 993



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #10 on: September 07, 2005, 07:02:54 PM »

I already have some stuff thrown together and just need to tie the code together.  The process enumerator, timer, system tray, and alarm / popup system.  I should have first release by this weekend - just need to finish some projects and pay the bills.

To recap the features:
- Display all running processes on the system showing the memory usage
- Ability to set usage alarms
- Tooltip or popup is displayed when an alarm is tripped
- Minimizes to the notification area during use

Application will be simple and specific to the task at hand.
Logged

kfitting
Charter Member
***
Posts: 574


View Profile Give some DonationCredits to this forum member
« Reply #11 on: September 07, 2005, 07:04:09 PM »

Sounds fine to me... have to see how it works!  Thanks for doing this,

Kevin
Logged
Veign
Charter Honorary Member
***
Posts: 993



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: September 09, 2005, 10:05:19 AM »

Working on it now and coming together nicely.
Logged

Veign
Charter Honorary Member
***
Posts: 993



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: September 12, 2005, 12:42:06 AM »

Update: The application is done and just doing some final testing and getting the graphics, pad file, and website updated.  Should be online tomorrow..

Screenshot:
http://veign.com/images/sw_ss_umon.gif

In the screenshot the numbers following the | enclosed in parenthesis is the watched limit value...
Logged

Veign
Charter Honorary Member
***
Posts: 993



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: September 12, 2005, 01:18:42 AM »

Ok.  I released the first version of a new application called Usage Monitor that should cover this request.

Link:
http://www.veign.com/download_app.asp?app=110

There are a few new things I want to do with the application but wanted to get it out to get some feedback.  Enjoy and let me know if this is what you had been looking for...

(not sure if I have responded properly to a fullfilled request - not sure if I should ahve started a new thread with the proper DONE title.  Oh well, Im sure mouser will set me straight)
« Last Edit: September 12, 2005, 01:22:09 AM by Veign » Logged

kfitting
Charter Member
***
Posts: 574


View Profile Give some DonationCredits to this forum member
« Reply #15 on: September 12, 2005, 07:05:44 AM »

Gave the program a try this morning and took it over to the guys who had requested it... it does the job!  A few suggestions (you may already be working on these I dont know):

- The GUI is a little obtuse.  I didnt realize at first that you had to have UsageMon "running."  maybe putting a toolbar button or something so this is more apparent would help.  What are the other "set" commands (GDI, etc)?  Do they monitor other resources for each process?
- Could you make two alarms available?  One (a warning) at some limit, and then another one if the memory continues to climb past a second limit (less of a warning, more of an alarm... maybe center of the screen)?  See below for the reason why.
- Could you make UsageMon remember it's settings?  This way you could set it to monitor an exe and when you exited and restarted, UsageMon would be already configured to watch for the desired program.
- What is the refresh rate for updating the watched process?  It seems to be a little slow for when the process first goes above the threshold, after that, it's fine.  Could this maybe be an option? (Like from 1 to 30 seconds or something)
- Can the text of the alarm be customizable?  This is a very unimportant request... one of the guys at work just thought it would be funny to have a message like "You idiot, what are you doing?" 

Talking with our CAD admin (he's the one who came up with the request), what he would like to be able to do is put usagemonitor on someone's computer and have a script run it whenever our CAD software starts.  That's the reason for making UsageMonitor remember settings, or even be able to be programmed for certain settings.  Basically, he wants to make user interaction not necessary.  You start the CAD program and UsageMonitor goes to work.

The reason an alarm is needed is because some of our drawings use over 2 gigs of memory.  Unfortunately, the CAD program doesnt quietly tell you it's about to crap out on you because of a memory problem, it just exits!  That's the reason for the two alarms, one to say "hey, you're getting high," and a second to say, "you're about to blow." 


But, overall, the program works for what I had requested.  THanks a lot for giving your time to coding it!

Kevin
Logged
Veign
Charter Honorary Member
***
Posts: 993



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: September 12, 2005, 10:02:14 AM »

- The GUI is a little obtuse.  I didnt realize at first that you had to have UsageMon "running."  maybe putting a toolbar button or something so this is more apparent would help.  What are the other "set" commands (GDI, etc)?  Do they monitor other resources for each process?

I already know this.  First release (should have been beta) and I didn't include a help file or do much on ToolTips. This will get better for future releases.  The interface was based on the WinXP Task Manager and will get better with each release. 

Good idea with the toolbar.

You can set alarms forany or all of the objects: Memory Usage, GDI Objects and User Objects.

 GDI Objects are what gets used when applications use graphics type command.  I had a memory leak in my Jeweled Button ActiveX and this tool would have help me monitor the GDI Objects.

- Could you make two alarms available?  One (a warning) at some limit, and then another one if the memory continues to climb past a second limit (less of a warning, more of an alarm... maybe center of the screen)?  See below for the reason why.

This is something I was unsure about.  How to set the alarms.  Should there be a single limit or upper / lower limit.  I can easily make the alarm trigger at the limit with a warning and another alarm when it goes X% above with a critical warning.

I would really like to flesh this one out as its something I was unsure on how to handle.  Lets discuss this topic further.  Two limits set by the user? or based on a percentage of increase? Should they be different names like: Warning Limit / Critical Limit?

Also, the alarm was done quickly and will be re-evaluated in future releases.

- Could you make UsageMon remember it's settings?  This way you could set it to monitor an exe and when you exited and restarted, UsageMon would be already configured to watch for the desired program.

This is not something that really could be done.  The key to a process is its ID.  You can see from Usage Monitor that process can share names but not ID's.  Process ID's are not based on the application and therefore are issued new ID's each time the application starts.  There would be no way to start monitoring a process on Start and be sure that it is the exact same process as before.

Let me think on this one as I understand your need. 

- What is the refresh rate for updating the watched process?  It seems to be a little slow for when the process first goes above the threshold, after that, it's fine.  Could this maybe be an option? (Like from 1 to 30 seconds or something)

Refresh rate is set at 15 seconds.  Options screen maybe be added in future releases.   I just need to think of how many options I could have - ideas of what else you would want as an option?

- Can the text of the alarm be customizable?  This is a very unimportant request... one of the guys at work just thought it would be funny to have a message like "You idiot, what are you doing?" 

This is something I would probably not do right now as most users would not need and the amount of work would be too much.  Maybe in a future, later release...

Thanx for the feedback.  Please keep it coming.  I will have a new release coming out in a couple of days to resolve some minor issues (like you can type letters in the limit input box - had the code to prevent but forgot to wire in).
Logged

kfitting
Charter Member
***
Posts: 574


View Profile Give some DonationCredits to this forum member
« Reply #17 on: September 12, 2005, 10:52:29 AM »

Yeah, the GUI I understand... far better to get the core working before concentrating on looks! 

Regarding:

- Remembering settings: this is a highly important feature (though I understand the complexity involved!)  Could you maybe have an option to go off of a process name?  In many cases this would be enough (though, as you mentioned there are some that use the same name... but something would be better than nothing).  Or, is there a way you could work around it?  Like, being able to script UM so that it automatically grabs the next process that starts with a certain name.  This way, you could start UM and then start your program and it would automatically grab it.  Just some ideas.

- Alarms...  A two limit alarm sounds good to me.  The critical level is more for "hey, you're almost out of memory here!" or if you know a program crashes at a certain memory limit.  I dont know if you meant this, but another type would be one that changed based on some increment over a given time (like 10 meg/20 min).  This type of alarm isnt necessary for the CAD app, but it would probably come in handy for developers.  Would you be able to have both types working at the same time?  One other thing, could the position of the alarms be made customizable?  Once again, not a very important request, but it would be kind of nice to have some alarms come up in the center of the screen (like critical alarms).

- Customizable Alarms:  I agree entirely... as I said is was more of a joke type thing!

Any other questions on my questions/comments, let me know.

Kevin
Logged
Veign
Charter Honorary Member
***
Posts: 993



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #18 on: September 12, 2005, 07:09:09 PM »

kfitting,
Not sure if you have to change the topic title to DONE..
Logged

kfitting
Charter Member
***
Posts: 574


View Profile Give some DonationCredits to this forum member
« Reply #19 on: September 12, 2005, 07:18:59 PM »

Ok.... I think I did it.  Not real sure though...

Kevin
Logged
Veign
Charter Honorary Member
***
Posts: 993



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #20 on: September 12, 2005, 07:57:16 PM »

I wasn't sure how to do it either but that did it.  May want to change the icon to a simley face per mousers instructions.

Also, I will have a new release coming out in a day or so to fix some minor issues...
Logged

skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #21 on: September 13, 2005, 07:01:24 PM »

 smiley Here's a 1 hour solution!

ProcessGurd - Watch processes' memory usage, cpu usage and many more, and get a warning, close them, change their priority, hide/show them, or minimize/maximize them!

Features:
- Edit the ini-file to change the settings.
- Watch all processes by using *
- Doubleclick the tray icon to change settings.



You'll find the downloads and more info at Skrommel Software.

This really isn't a production style product like the one above, but it works for me!

It uses TaskManager since AutoHotkey lacks a process manager, locks it and reads the values from the second tab, so don't change the settings if you want it to work. If you do by accident, just close TaskManager, and it will restart with the proper settings.

Every second it compares the values to the ones defined in the ini file. If exceeded for the set time, the user defined message and action is triggered. Maybe I should add an option to run external programs?

Add as many alarms as you like, or use the * to watch all processes.

Skrommel
« Last Edit: September 13, 2005, 07:47:39 PM by skrommel » Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
Scott
Resident Googler
Charter Member
***
Posts: 377


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #22 on: January 07, 2006, 03:37:23 PM »

 
Just FYI:  There was already in (long) existence an application using the name "ProcessGuard".  I don't give a shit, of course, but I don't know if the authors would or could raise a stink about it.
 
Logged

« Next Edit: Tomorrow at 12:13:47 AM by Scott »
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.043s | Server load: 0 ]