3

On Mavericks, is there a way to monitor hard drive use history?

To be clear, I do not only want to know how much space I am using on my hard drive. I would like a history of my hard drive space usage over time.

  • Is there a feature built into Maverick that would allow me to do that? Or any additional app?

  • If there is, will this built-in feature/app be able to recover information from my past use, or will it only start to record my usage once I set it up?

I know that I could record my usage manually, but I'd rather have it done automatically.

EDIT : as far as the frequency of observations is concerned, I'd be satisfied with something ranging from every day to once a week.

  • 1
    At what frequency shall it be. Once per year, per month, week, day, hours, minute second ?...you see the problem ! – Ruskes Feb 13 '14 at 18:28
  • Yes, thanks, I'll make it more precise in the question. – Martin Van der Linden Feb 13 '14 at 19:07
  • That's 365 records per year! And could be very confusing results, since some days it will be up the others, it will be down, pending your email and web usages. So let's tune it further a bit. Than lets see if someone will write you a script to do that, since currently there is no such recording, other than some records in your Console that you can look up. – Ruskes Feb 13 '14 at 19:30
  • Is it a problem computationally or in terms of the script to have a new record no less than every week? If it is not, this is really what I would need. I someone can write a script that would be great. I am also ready to learn and do it myself if it turns out to be an accessible project for someone who has little programming experience and has never written scripts for OSX (I have never done it before). But I would probably need some guidance then... – Martin Van der Linden Feb 13 '14 at 21:49
3

How about something simple in your crontab?

@daily (date; df)>> ~/drive_usage.log

Which will, on a daily basis, append to the file drive_usage.log in your home directory with the date and time the job ran. Change @daily to @hourly or @weekly if you want different sampling rates.

Sample output:

Thu 13 Feb 2014 22:15:22 GMT
Filesystem                                             512-blocks       Used  Available Capacity   iused      ifree %iused  Mounted on
/dev/disk1                                              487900160  332696088  154692072    69%  41651009   19336509   68%   /
devfs                                                         382        382          0   100%       661          0  100%   /dev
map -hosts                                                      0          0          0   100%         0          0  100%   /net
map auto_home                                                   0          0          0   100%         0          0  100%   /home
/dev/disk4                                             1952177496  322984856 1629192640    17%  40373105  203649080   17%   /Volumes/Samsung Time Machine
//paul@calliope._afpovertcp._tcp.local/paul%60s%20home 7689113744 6353779112 1335334632    83% 794222387  166916829   83%   /Volumes/paul's home
//paul@pollux/paul                                      125522808   65564368   59958440    53%         0 18446744073709551615    0%   /Volumes/paul

If you want more information you might want to use something like fs_usage(1) which provides a truly astonishing amount of detail and must be run as root.

  • Thanks, I am not familiar with using crontab, but I will look into it. This seems like the solution I need. – Martin Van der Linden Feb 13 '14 at 23:48
  • 1
    Try man 5 crontab in Terminal as a starter. Also take a look at the pr(1) command if you get into the scripting, you could without too much effort generate a CSV file which you could then put into Numbers / Excel etc. – snakechowder Feb 14 '14 at 22:50
  • I tried to implement the command following maclife.com/article/columns/terminal_101_creating_cron_jobs. I'll let you know how it works out. – Martin Van der Linden Feb 17 '14 at 19:04
  • Good stuff - you can use the shortcuts: @yearly, @monthly, @weekly, @daily, @hourly and @reboot in OS X which can make things a little clearer – snakechowder Feb 18 '14 at 8:54
3

Munin is available for Mac OS X. It is server monitoring software and one of the things it monitors is disk space usage.

Munin Mac install docs here.

(Yes, this is a rather heavyweight solution, but you get graphing! :)

  • yeah seems a little bit using a sledgehammer to crack a nut, but thanks anyways, might come back to it if nothing else works. – Martin Van der Linden Feb 13 '14 at 23:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .