Monday, October 11, 2004
Housekeeping
Disk space
I was down to 10 Gigabytes on my Macintosh today, so I thought I'd see if I could find some space from somewhere. As it's a Unix box, there is an easy way to find out what is using all the space and that is the
du
command. You change directory to the root and do a du -ks
as shown below. Note that the below example hasn't completed traversing the file system - Users and System are missing and some other minor stuff.
jeremyp@titania:/$ sudo du -ks *
Password:
4515532 Applications
440264 Applications (Mac OS 9)
0 Cleanup At Startup
8 CyberViewX Installer Log File
4 Desktop (Mac OS 9)
900 Desktop DB
1944 Desktop DF
24 Desktop Folder
957128 Developer
47796 Documents
31260 IBM
1649684 Library
16 MAU 1.1.1 Update Log
60 Macintosh HD
7 Network
8 Office X 10.1.2 Update Log
4 Office X 10.1.3 Update Log
8 Office X 10.1.4 Update Log
4 Office X 10.1.5 Update Log
8 Previous Systems
188 Requirements checklist.doc
0 Shutdown Check
and then you repeat for the biggest directories until you find some large useless files. Using this method I found a folder called "Previous Systems" which I had totally forgotten about. When you reinstall the OS the old one is saved in a special folder under this directory. I had two "previous systems", one from an occasion when I accidentally made my OS non bootable and one from the upgrade to 10.3. Deleting both of these gave me 7 Gigabytes back.
Memory
I've been a bit concerned recently about the amount of memory the Mac is using. I have 512 Megabytes and quite often I'm close to the limit. This doesn't usually cause problems, just swapping to disk which obviously slows stuff down.
Last night I was right on the limit even though I didn't have more than my normal quota of applications open. I was wondering if something I run regularly had a memory leak, so I closed everything and it made no difference. Hmmmm... it was late, so I didn't bother with a reboot.
This morning, I had the idea of moving the dock to the side of the screen. My Mac has a widescreen, so I thought it'd be better use of screen real estate. Soon after moving the dock to the side, the memory usage fell to less than 250 Megabytes. Even now, with Safari running, my memory is still more than half empty. Does the dock grab loads of RAM? I'll have to monitor it and find out.