Memory Usage Getter 2.0 is out!

simX

Unofficial Mac Genius
Go to http://homepage.mac.com/simx/ to download Memory Usage Getter 2.0. Released, and gets the memory usage with a vengeance (even better than OS 9's!)! You should also be able to find it on versiontracker.com soon...

But it's awesome, and registration is only $5.

And it's made by.... yours truly. :)
 
Good work! Very pretty. Two definite problems.
1. Very slow. I just takes a long time to refresh and display :(
2. Takes up an excessive amount of CPU time. When displaying it take up to 90% of the CPU on my TiBook. Bad times!

Other than that, very good job :)
 
SimX, looks great! Nice GUI.

However ...

there are a lot of AppleScript 'popup' errors. I'll log 'em and let you know.

Keep it up!
 
This may be a bit of an advanced feature, but it would be sweet if, when minimized in the dock, the icon would show how much mem is currently free.

But it's freaking awesome dude. Very nice job!
 
ksuther: Thanks for alerting me to the CPU usage problem. That's related to the progress bars. It seems that I guess I'll have to do a 2.0.1 update. I have a build here that at least tells them to stop after it's done updating (after refreshing or looking at the next page), and it takes up absolutely 0% of the CPU usage when not refreshing. For now I'm hoping that will be OK, but I guess I'll have to be finding another way to graphically display the memory usage; maybe I can just use a set of horizontal lines that I can change the bounds of, but that certainly won't be as simple as a progress bar. I wish that Apple included something like the "relevance" bar in Sherlock, but it doesn't look like there's anything like that.

Themacko: I'll see if I can do that with AppleScript, but no guarantees. :)

GadgetLover: Please send me some screenshots (or at least the error messages themselves) of what you're getting. It seems that the intermittent "Can't make 'failure' into an integer." bug is still there, so I'll have to smoke it out. But other than that, I don't know of any bugs.

Version 2.0 seems to be pretty solid if I may say so myself, but I have plenty more in store for updates. I'm hoping to add a simple help file to explain memory usage in OS X (like wired, active, and inactive memory usage -- if you haven't clicked on the overall memory usage progress bar yet, do so). Other things I think I can do is have MUG quit/relaunch a selected application, allow the user to choose what goes into the "Other User Processes" tab, allow a window for viewing all of the processes in one big page (hopefully if I can't do this graphically, I can do it textually), and maybe even refresh the memory usage of a single process (although that would be kind of pointless because I might as well update the whole thing).

About the slowness issues: I don't know if I can remedy those; I can try to make my code more efficient and optimize it, but I don't know if it will make that much of a difference. MUG seems to really be sluggish when you have tons of apps open, so keep this in mind. I hope maybe it's just that because AppleScript Studio is early in its age, so maybe Apple will make it faster -- but I'll certainly try and keep my code as small as possible.
 
It seemed very solid to me. The final and all your betas. I didn't ever see any errors. Does it work while giving the errors, or does it not work at all?
 
I got only one pop-up AppleScript error. I clicked on the 3 tabs and didn't let any of them load, then I clicked on the "refresh" button again. That gave me an error ;) BUT.... I couldn't reproduce it even by clicking like crazy once again.

I couldn't believe how little ram I had free! I need to invest in some more.
 
Very hand app - I've always wanted something like this. One thing though: if I have IE open I get an "unexpectedly quit" message when I try to start Memory Usage Getter. Sometimes happens w/ OmniWeb too. If I quit them, start Memory Usage Getter and then restart IE/OmniWeb it works.
 
Hmm.... I've been having that same "unexpectedly quit" error too, but I didn't realize it was because OW/IE is open. I'll try and see what I can do...

Jadey: Hehe, it took my app to get you to notice? At least it's doing its job. :)

And the registration is up by the way. :p http://homepage.mac.com/simx/ .
 
Originally posted by googolplex
It seemed very solid to me. The final and all your betas. I didn't ever see any errors. Does it work while giving the errors, or does it not work at all?

It seems to work after I click past the error window "OK".

I am using 10.1.3 and AppleScript 1.8.2b1 (Apple's latest version).
 
GadgetLover: That's the problem, I believe. There was a thread about AppleScript 1.8.2b1, that it caused problems with numerous AppleScript's and UNIX shell scripts because of carriage returns in the output. I believe that this is causing the output to be interpreted as a line with the correct information, a blank line, another line with information, and then another blank line, etc.

Strange that it works after the original errors.

GadgetLover: I sent you a message -- can you send me a sample output of what you get in the Terminal when you input the commands ps -aux -m -w -w and ps -aux -m -w -w | tr -s ' '. Make sure to tell me which lines correspond to which commands. This will allow me to put something in there that detect's AppleScript's version and adjusts accordingly.
 
I am happy to do the test for ya but I need to know exactly what the output is. It appears to be a list of running processes but before I turn over this info I obviously need to make sure that it doesn't include confidential info that could result in the destruction of the universe (if ya know what I mean). :)

Also, we can try another test: if someone can send me an installer for version 1.8.1 (otherwise I'd have to reinstall 10.1.3) of AppleScript I can try regressing and confirm if it is in fact a problem with version 1.8.2.

Either way Im happy to help.
 
GadgetLover: Actually, thinking about it, I don't think it's going to be the output itself that's causing the problem, it's AppleScript, so I actually don't need you to send me that stuff (by the way, the only sensitive info that you can give out by sending me the output is your username).

I think I'm going to install AppleScript 1.8.2b1 (I don't think there's a 1.8.1 installer) and try to fix it like that. I think one simple line will fix it, but I need to test it myself.

I will seed it to my beta testers so that they can make sure it works with AppleScript 1.8.1.

Thanks for alerting me to this fact, though -- any other things that you people want in 2.0.1? :D
 
So SimX, what is the memory that is not represented used for? Core stuff? Wondering whats eating so much memory.....
 
Great. Just great. I download and install AppleScript 1.8.2b1, and now my script doesn't work. And the reason is because when I try to parse a paragraph using the "text item" reference like this:

set AppleScript's text item delimiters to {"/"}
get text item 5 of "hello/hi/hello again/howdy/how are y'all/hey there"

The correct result of the second command should be "how are y'all", but AppleScript 1.8.2b1 sets the whole line to text item 1 (no matter WHAT the delimiters are), and gives an error on any text item above text item 1.

So, GadgetLover -- you'll have to revert to 1.8.1 if you want the script to work, and I will too... here's to hoping I can find the resources somewhere..

Matrix Agent: What memory that is not being represented? You can see the memory usage of every single process.
 
The items listed add up to about 110 in RAM usage. The app reports that 225.01 is being used. this after quiting all user operations, oncludin the finder, just to make sure that there was as few empty blocks as possible. So, am I missing something here?
 
Ahhhh... I can explain, but it's UNIXy.

With OS X and its very efficient memory management, OS X seeks to keep as much of the RAM used as possible so as to minimize latency when paging things in to memory (paging in = brining things from disk to memory).

Basically there are four types of memory -- wired, active, inactive, and free (you can see the stats for all 4 kinds if you keep clicking on the overall progress bar). Wired memory is data that MUST be kept in physical memory and under no circumstances paged out (paged out = data from memory being written to disk; an example of something that is wired is the function to page things into memory -- if it was paged out, then nothing could ever be paged in again because that function is never in memory, and you couldn't page it in because you don't have the function to page in data in physical memory -- OK that sounds funny). Active memory is memory that CAN be paged out, but is currently being used. Inactive memory is memory that can be paged out, but remains in memory in case you need that data again. Free memory is memory that is not being used at all.

It's this inactive memory that is causing the discrepancy, I believe. When you quit an application, it no longer shows up in the list of processes that my memory application gets its memory from, but some of the data is kept in memory if you have lots of free memory. For example, right now, I have 442.11 MB of my 896 MB of memory free. Because of this, OS X decides to leave some data that was used by previously-open applications in memory, in case I want to open that application again. So when quitting an application, it might purge some of the data from memory (like data from websites and stuff in the case of a web browser), but OS X might decide to leave some stuff (like the resources required to open the application itself). This is mainly why it takes less bounces to open an application the second and third times after a restart than it does the first launch after a restart.

Understand?

GadgetLover:

I successfully downgraded to AppleScript 1.8.1, but you'll need to redownload the stand-alone OS X 10.1.2 update (not combo -- the normal one should work fine) again. Once you do that, use Pacifist (a utility available at www.versiontracker.com) to extract only the AppleScript components. Here are the directories for all the resources you need from that package to a downgrade (it's very easy via Pacifist):

/System/Library/Components/AppleScript.com

/System/Library/Frameworks/AppleScriptKit.fr

/System/Library/PrivateFrameworks/AppleScript.fra

/System/Library/ScriptingAdditions/Standard Additions

Note that some of these paths may be truncated, but you want to just select the whole directory in Pacifist and tell it to extract it (don't say Extract to...; just use the default extract directory, and say "Replace All" when the dialog comes up). This should successfully downgrade you to AppleScript 1.8.1 so my application can work.

I'm still wondering why it works for you after the first errors. It never did on mine.
 
Back
Top