lxk0JNg9Uu Posted March 16, 2013 Share Posted March 16, 2013 (edited) I made an alfred (v1) extension which I ported over to a workflow. It not only purges inactive memory, but also shows the amount purged, e.g. "1024 MB Purged". It's only requirement is python, which I'm pretty sure is pre-installed on macs, so there *should* be no issues in that respect. Important Note - If this workflow is not working for you: This workflow sometimes requires Xcode Command Line Tools to use the purge command. To download the tools, you can do one of the following (and only one as if you do more it can cause issues): Download Xcode from the Mac App Store and go to Preferences -> Downloads -> Components and download Command Line Tools Register for a free account at http://developer.apple.com and go to https://developer.apple.com/downloads/index.action, search for command line and download the latest version of Command Line Tools for your version of OS X If you are running OS X Snow Leopard, you can either do 1 or download the command line tools from https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.6.pkg, as Apple does not provide a version of Command Line Tools for OS X 10.6 on developer.apple.com You can download it at http://db.tt/mdQCdaT5 I would be really grateful for any feedback Edited October 24, 2013 by robbrazier Southgirl, thec13, arsenty and 2 others 5 Link to comment
JuhaT Posted March 20, 2013 Share Posted March 20, 2013 I like it works great! Thank you! Link to comment
mdmurayama Posted March 20, 2013 Share Posted March 20, 2013 I just tried this and it works for me. Domenic 1 Link to comment
Southgirl Posted April 5, 2013 Share Posted April 5, 2013 Thank you! I still use this one in my old Mac, and I was looking for the v2! Works great so far. Link to comment
Southgirl Posted May 4, 2013 Share Posted May 4, 2013 *bump* I have finally installed this workflow on my desktop that's running on Snow Leopard. Most of the times I get this: while others I get "-1 MB purged." Any ideas if this a compatibility issue? Link to comment
lxk0JNg9Uu Posted May 6, 2013 Author Share Posted May 6, 2013 I am honestly not sure, could you type "python --version" into terminal and post the results, it may be a python version difference, as the workflow was made on mountain lion. Link to comment
Southgirl Posted May 7, 2013 Share Posted May 7, 2013 I am honestly not sure, could you type "python --version" into terminal and post the results, it may be a python version difference, as the workflow was made on mountain lion. Python version's 2.6.1 Link to comment
Southgirl Posted May 27, 2013 Share Posted May 27, 2013 *Last bump before uninstalling* Anyone else having trouble with this on Snow Leopard? Link to comment
lxk0JNg9Uu Posted May 27, 2013 Author Share Posted May 27, 2013 Sorry, I'm not a python programmer by trade, so I'm pretty stumped by this. I will try a complete refactoring late tomorrow (I'm not at home atm, so can't really do much on it). Hopefully it will be working within the next couple of days if you can wait Link to comment
Southgirl Posted May 27, 2013 Share Posted May 27, 2013 Sorry, I'm not a python programmer by trade, so I'm pretty stumped by this. I will try a complete refactoring late tomorrow (I'm not at home atm, so can't really do much on it). Hopefully it will be working within the next couple of days if you can wait Sure, I can wait. Thanks! Link to comment
lxk0JNg9Uu Posted May 28, 2013 Author Share Posted May 28, 2013 okay, can you try redownloading from the same link in the first post (http://db.tt/mdQCdaT5), hopefully that will work now Link to comment
Southgirl Posted May 28, 2013 Share Posted May 28, 2013 Thanks! Downloaded the new version , but I still get "0 MB purged" Link to comment
lxk0JNg9Uu Posted May 28, 2013 Author Share Posted May 28, 2013 could you try opening terminal and typing "vm_stat", as this is the command used to find the inactive memory. I'm starting to wonder that it is not in snow leopard, and that is what is causing the problems Link to comment
Southgirl Posted May 28, 2013 Share Posted May 28, 2013 (edited) could you try opening terminal and typing "vm_stat", as this is the command used to find the inactive memory. I'm starting to wonder that it is not in snow leopard, and that is what is causing the problems I went and typed what you asked for, and this info appeared: Mach Virtual Memory Statistics: (page size of 4096 bytes) Pages free: 1951. Pages active: 444920. Pages inactive: 216685. Pages speculative: 20735. Pages wired down: 298320. "Translation faults": 427055234. Pages copy-on-write: 10410650. Pages zero filled: 290062742. Pages reactivated: 10168293. Pageins: 10613166. Pageouts: 3808810. Object cache: 2149 hits of 951031 lookups (0% hit rate) Does this help? Edited May 28, 2013 by Southgirl Link to comment
lxk0JNg9Uu Posted May 28, 2013 Author Share Posted May 28, 2013 (edited) that's weird, it does work, so that isn't the problem. It looks exactly the same as mine, however I think I've figured out what it is. Just doing some reading, it seems that Xcode command line tools may be needed for the "purge" command to function, so I think you'll need to install the command line tools (sorry). As you are running Snow Leopard, there is no official direct download for the command line tools, and I don't particularly want to link you to an unofficial one which may not work (it's here anyway though if you want to try). Depending on your version of Snow Leopard (if it has the Mac App Store or not), you could download it from there, or use the aforementioned link that I don't particularly want to recommend as I haven't tried it, and don't want to muck up your mac if it doesn't work :/ P.S. It appears that apple are actually using the installer linked above now as the official one (https://medium.com/kr-projects/6e54e8c50dc8 (scroll down to the heading "Apple's Interest")) Apologies for the slight rambly nature as I have just been writing this and researching at the same time Edited May 28, 2013 by robbrazier Link to comment
Southgirl Posted May 28, 2013 Share Posted May 28, 2013 I'll try to install this. I was reading on that page that Xcode needs to be uninstalled first. I just hope I don't screw anything up. I'll let you know how goes! Link to comment
lxk0JNg9Uu Posted June 1, 2013 Author Share Posted June 1, 2013 I'll try to install this. I was reading on that page that Xcode needs to be uninstalled first. I just hope I don't screw anything up. I'll let you know how goes! Any further details on how the installation went? Did it work and does the workflow work now? Link to comment
Southgirl Posted June 2, 2013 Share Posted June 2, 2013 Any further details on how the installation went? Did it work and does the workflow work now? Well, I finally got the time to get to this after a very hectic week at work. I followed the instructions posted here to uninstall Xcode, and got a "command not found" from Terminal. Not sure if it's safe to install the command line tools now. And this is how far I went with this Link to comment
lxk0JNg9Uu Posted June 2, 2013 Author Share Posted June 2, 2013 (edited) ah, sorry to hear that well, if it said "command not found", that shows Xcode isn't installed, so it should be safe to install the command line tools (from here [Option 1] rather than the link on that post) Edited June 2, 2013 by robbrazier Link to comment
Southgirl Posted June 2, 2013 Share Posted June 2, 2013 Well, I just installed it. I still get the "-1 MB purged" & "0 MB purged" notifications. *sigh* Link to comment
lxk0JNg9Uu Posted June 3, 2013 Author Share Posted June 3, 2013 okay, as a last try, can you try typing "purge" into terminal, just to confirm that it has been installed. If it does do something, then things have become quite confusing as it should work, however if it doesn't, things are also confusing, as it mustn't have installed the purge command when you installed the command line utilities :/ Link to comment
Southgirl Posted June 3, 2013 Share Posted June 3, 2013 I got the "command not found" from Terminal as well. Link to comment
gniting Posted October 23, 2013 Share Posted October 23, 2013 Does not work on Mavericks. Always comes back with 0MB purged. Is there a fix? Link to comment
lxk0JNg9Uu Posted October 23, 2013 Author Share Posted October 23, 2013 Does not work on Mavericks. Always comes back with 0MB purged. Is there a fix?Ooh, I'm getting -1 MB Purged as well as 0, I'll try to figure out what's broken tomorrow Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now