Posts tagged osx

Purge OS X inactive Memory

0

The memory in OSX is divided in four important categories such as shown below :

 

Those « types » of memory combined together are the full size of your ram, in my case 8Gb. Each type as a specific function in OS X those are described below :

Free:

This is RAM that’s not being used.

Inactive:

This information in memory is not actively being used, but was recently used.

For example, if you’ve been using Mail and then quit it, the RAM that Mail was using is marked as Inactive memory. This Inactive memory is available for use by another application, just like Free memory.  However, if you open Mail before its Inactive memory is used by a different application, Mail will open quicker because its Inactive memory is converted to Active memory, instead of loading Mail from the slower hard disk

 

Wired:

Information in this memory can’t be moved to the hard disk, so it must stay in RAM. The amount of Wired memory depends on the applications you are using.

Active:

This information is currently in memory, and has been recently used.

 

As you can see, the inactive memory is used for fast access to an application, and sometimes if happened that the memory is not released by OSX or not shared.  This can make the mac really slow and buggy. As I got the problem I searched for a solution I found that one :

 

  • If you do not have the developers tools installed, install them.
  • open a shell and type in the following command :
$/usr/bin/purge
This command will purge the inactive memory and set this memory as free. This command should help you if your free memory decreased to less than a GB and that you inactive memory increased or wasn’t allowed to be used by other softwares.
And That’s it.

Forensic Bookmark.plist from Safari

0

I was reading some documents on Mac Os X forensic, and I was searching
how to get back the Bookmark.plist from safari to parse it and read it easily …

I knew that this file is located in the following folder :

~Library/Safary/Bookmarks.plist

I was thinking that plist files where always XML documents and tried with python to read the file, I opened python and typed the following commands.

>>>  import plistlib
>>> plist.readPlist('Bookmarks.plist)

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plistlib.py", line 78, in readPlist
rootObject = p.parse(pathOrFile)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plistlib.py", line 405, in parse
parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 9

Yeah ! Error …

I got back to my shell and tried to read it with

$ cat Bookmarsk.plist

[...] it was not an XML output at all !

I directly decide to go to  developer.apple.com/ , to find the plist use, and find out that some plist files are in

BINARY FORMAT PROPERTY LISTS

WTF ??

hopefully the command was given to translate it to XML

plutil -convert xml1 -o - Bookmarks.plist

I tried it, and it gave me a cool XML format.

I could then put the output of this command in an XML file and use it.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
Go to Top