Notify users when their disk space is running low

Hi all,
I'm an administrator of about 100 Apple macs and an OS X server and generally speaking, problems are pretty easy to fix. There is just one major problem I'm always having and its simple to fix, which is that when Users run out of home disk space (only 600MB each) applications start crashing (understandably). The problem is that users don't actively watch their free disk space and when things start going wrong, I'll come along and point out that they need to delete some things and it'll start working again.
What I'm having trouble with (because I'm an absolute beginner) is making an AppleScript (or whatever would be best) to watch for when their home space is getting full (with 20MB free space) it'll pop up and say "don't trouble the technician, delete some files!" (or something along those lines)
So, here's what I have (pretty pathetic)
tell application "Finder"
set freeSpace to (free space of (get startup disk)) div 1024 div 1024
end tell
Is their a way of finding disk space of a Home Drive (which is on a network drive on the server)
What I'd like is to say
tell application "Finder"
set freeSpace to (free space of (get home)) div 1024 div 1024
end tell
It tells me "can't get free space of folder "stephenl"" (my home folder)
Could anyone please help

--I'm sure there are several ways to do what you want; here's one that works on an individual computer. If necessary, suitable changes should be possible for server situations, but someone else will have to jump in on that. Copy this to Script Editor, make suitable modifications, then save it as an application; be certain "Startup Screen" isn't checked. Either have the user start it when the computer is started up, or place it in the log-in items (System Peferences) so that happens automatically.
set message_ to "Stephen! Don't trouble the technician, delete some files!" -- modify to suit
set MinAllowFS to 20 -- set this to the available disk space you want to trigger one or more of the responses. MB doesn't have to be specified if everything is in MB (max. possible space, etc.), otherwise some adjustments will have to made to the script. To TEST the script, set the number above what you know the available space could be.
repeat --(However often you want to check free space)
delay 5 --that's 5 seconds; if you think every 10 minutes is often enough to check, make that 600; or make it 0 and the script will repeat essentially in the time it takes to run, which is about 2.5 seconds on my machine
try
set bootDiskInfo to do shell script "diskutil list | grep 'stephen'" -- this gets information for all disks, and then finds the line pertaining to disk 'stephen' (change as necessary)
set bootDiskID to last word of bootDiskInfo -- that last word is the identifier for the disk you're after
set FSinfo to do shell script "diskutil info " & bootDiskID & " | grep 'Free Space'" -- similar to the above command, getting the free space for the boot disk.
set ActFS to word 3 of FSinfo -- word 3 is the numerical value of the free space, irrespective of the multiplier (KB, MB, GB etc.); as stated previously, there will have to changes to the script if the spaces range amongst multipliers.
--Pick one or more of the following responses by removing the comment ("--")
if ActFS < MinAllowFS then beep 3
--if ActFS < MinAllowFS then display dialog message_
--if ActFS < MinAllowFS then say "[[rate 180]]" & message_--[here's a link on using speech: http://www.blankreb.com/studioarticles.php?ID=3
end try
end repeat

Similar Messages

  • My imac keeps telling me my start up disk space is running low, how do i fix this?

    I purchased an Imac in Sept 2009 and pretty much use it for the iphoto and internet. Other than that, we have no movies and a small itunes catalog. My computer has recently started telling us that our start up disk or disk space is running low. I can't imagine that we are anywhere near filling up the internal memory so I am wondering if something else is the culprit.

    Also, See this Video... For Freeing up Disc Space
    http://macmost.com/what-to-do-when-your-hard-drive-is-full.html

  • Exchange 2013 - Client Access Servers - Disk Space C:\ Running Low Space

    Currently having an issue with both of our client access servers with exchange 2013.
    The issue is that the C:\ drive will run low on disk space on one of the cas server and the other one will be fine.  We have cleaned up all the logs etc to free space on the cas server that is running low on space but its not sufficient enough
    as it keeps on running low on space, then what we do the free up the space is to reboot the cas server that runs low on space, and it free the space up after it has been restarted, then the other cas server starts running low on space.
    has anyone seen this before?

    Hi,
    If it is possible, I suggest re-installing Exchange Server on another path instead of C:\.
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • Notify User When Student Discount Is Near 1 Year Expiration

    I think it would be fair to notify users when their 50% off student discount is about to expire. I was recently suprised when my bill jumped to $10 with no notice. Could be notififed through application or by e-mail. I just think it's a fair thing to do. Keep up the great work though.

    Updated: 2015-08-07Marked as new idea.

  • How do I clean my mid 2007 iMac? The disk space is running VERY low and I would love an idea. I make videos and upload them to youtube and I need space to do that. Thanks for your time!

    How do I clean my mid 2007 iMac?
         The disk space is running VERY low and I would love an idea. I make videos and upload them to youtube and I need space to do that. Thanks for your time!                              
                                       If you have an idea please respond!

    You should never, EVER let a conputer hard drive get completely full, EVER!
    With Macs and OS X, you shouldn't let the hard drive get below 15 GBs or less of free data space.
    If it does, it's time for some hard drive housecleaning.
    Follow some of my tips for cleaning out, deleting and archiving data from your Mac's internal hard drive.
    Have you emptied your iMac's Trash icon in the Dock?
    If you use iPhoto, iPhoto has its own trash that needs to be emptied, also.
    If you store images in other locations other than iPhoto, then you will have to weed through these to determine what to archive and what to delete.
    If you use Apple Mail app, Apple Mail also has its own trash area that needs to be emptied, too!
    Look though other Apple Mail folders like the junk mail and delete the mail that is in there. Look through your sent items folders and see there is any mail in there that can be deieted.
    Delete any old or no longer needed emails and/or archive to disc, flash drives or external hard drive, older emails you want to save.
    Other things you can do to gain space.
    Once you have around 15 GBs regained, do a search, download and install OmniDisk Sweeper.
    This app will help you locate files that you can move/archive and/or delete from your system.
    STAY AWAY FROM DELETING ANY FILES FROM OS X SYSTEM FOLDER!
    Look through your Documents folder and delete any type of old useless type files like "Read Me" type files.
    Again, archive to disc, flash drives, ext. hard drives or delete any old documents you no longer use or immediately need.
    Look in your Applications folder, if you have applications you haven't used in a long time, if the app doesn't have a dedicated uninstaller, then you can simply drag it into the OS X Trash icon. IF the application has an uninstaller app, then use it to completely delete the app from your Mac.
    Download an app called OnyX for your version of OS X.
    When you install and launch it, let it do its initial automatic tests, then go to the cleaning and maintenance tabs and run the maintenance tabs that let OnyX clean out all web browser cache files, web browser histories, system cache files, delete old error log files.
    Typically, iTunes and iPhoto libraries are the biggest users of HD space.
    move these files/data off of your internal drive to the external hard drive and deleted off of the internal hard drive.
    If you have any other large folders of personal data or projects, these should be archived or moved, also, to the optical discs, flash drives or external hard drive and then either archived to disc and/or deleted off your internal hard drive.
    Good Luck!

  • Lightroom 5.7 just installed with 864GB free disk space.  Receive error message saying disk space is critically low.  ??

    Lightroom 5.7 just installed with 864GB free disk space.  Receive error message saying disk space is critically low.  ??

    I have the same issue with 1.7TB free. This seems to have been an ongoing problem in earlier versions.
    Is there a solution?

  • Server logical address space is running low

    Hi, I have server with NetWare 6.5 SP08.
    I get the message:
    Server logical address space is running low. Increase the available logical space by restarting the Server with the-u788197376 switch.
    What I can do?
    Thank you.

    Jjfbravo,
    > Server logical address space is running low. Increase the available
    > logical space by restarting the Server with the-u788197376 switch.
    > What I can do?
    That switch should not normally be needed. What are you running on this
    server? Please run
    load config /jumba1se
    Post results here
    - Anders Gustafsson (NKP)
    The Aaland Islands (N60 E20)
    Novell has a new enhancement request system,
    or what is now known as the requirement portal.
    If customers would like to give input in the upcoming
    releases of Novell products then they should go to
    http://www.novell.com/rms

  • IOException when no disk space left

    Good time of day, everyone!
    In my program, I have to copy files of a quite substantial size from one media onto another. Since the free space is limited, I need to catch the case when it gets no longer available. The total size of files is unknown and cannot be computed beforehand (random element), so checking availability before copying each file would barely make sense.
    What I need is to catch the case when it ultimately runs out of free disk space while copying. What exception is that? The program throws some unreadable gibberish (likely because of my locale):
    java.io.IOException: &#9552;&#1093;&#1092;&#1102;&#1105;&#1028;&#1088;&#1028;&#1102;&#1118;&#1101;&#1102; &#1100;&#1093;&#1105;&#1028;&#1088; &#1101;&#1088; &#1092;&#1096;&#1105;&#1098;&#1093;
    Another thing that worries me is that it takes quite a long time before this exception is thrown. Maybe there's a better solution?
    Googling gave nothing so far :(
    Thanks in advance!

    SqueezyMo wrote:
    Good time of day, everyone!
    In my program, I have to copy files of a quite substantial size from one media onto another. Since the free space is limited, I need to catch the case when it gets no longer available. The total size of files is unknown and cannot be computed beforehand (random element), so checking availability before copying each file would barely make sense. You're burning CDR's or DVDR's, right? The common approach to "making stuff fit" is to pre-build a file collection... to burned when the user "commits" the selection (by pressing a burn button). This allows the user to organise the content to "best fit" accross multiple media... most burners now automatically workout "best fit" based purely on size (I guess using some sort of [backpack algorithm|http://encyclopedia2.thefreedictionary.com/Backpack+problem]).
    Overall the trick is remove the "randomness" by delaying the burn process.
    This doesn't really apply to (reliably) rewritable media... Note that DVD-RW's are notoriously NOT reliably rewritable... the probability of corruption seems to nearly-double on each overwrite after the first dozen (or so)... I gave up using them for backups, and went back to DVD-R's... (now I use an external HDD).
    What I need is to catch the case when it ultimately runs out of free disk space while copying. What exception is that? The program throws some unreadable gibberish (likely because of my locale):
    java.io.IOException: &#9552;&#1093;&#1092;&#1102;&#1105;&#1028;&#1088;&#1028;&#1102;&#1118;&#1101;&#1102; &#1100;&#1093;&#1105;&#1028;&#1088; &#1101;&#1088; &#1092;&#1096;&#1105;&#1098;&#1093;Try changing your locale to English (temporarily), so you can read that error message... and also try writing it (the exceotion) to a UTF-8 encoded file... I suspect the console is responsible for scrambling the high-order UTF characters.
    Another thing that worries me is that it takes quite a long time before this exception is thrown. Yes... it would, it would take time to fill the destination media, wouldn't it... so do your size check before you start copying anything. Also worth noting that most users prefer an "upfront, all or nothing" paradigm most of the time... giving them confidence that when they hit the "go" button it will eventually work... nothing worse than a slow kettle that needs watching.
    Maybe there's a better solution? Yes, several... It's just time to bight the bullet and get serious about this, or just use one of the plethora of libraries ;-)
    Googling gave nothing so far :( Thanks in advance!Yep, google is excellent for "named problems" of all sorts (from aircraft maintenance scheduling to fish recipes)... not so good for problems such as this which have (AFAIK) yet to be ascribed a common name.
    Cheers. Keith.
    PS: Listen to Chicon... I should have read his post before writing this... Que sera sera.

  • Deleted files not relinquishing their disk space

    My system has recently developed an issue that I've never encountered before, and having come to the limits of my own knowledge of OSX I am now hoping somebody on here is able to help me with the problem.
    I have a CD 2.16ghz MBP running Leopard 10.5.5. Connected to the FW400 port on the Machine is a 500GB WD Mybook external drive, evenly split into 2 partitions -one of which I am using as my Time Machine backup drive, and the other partition which I've labelled Storage. The Storage partition has started to cause me some headaches. The partition is about 230 GB in size and contains a number of large DMG files (SuperDuper backups of my home directory and the like), and currently only has about 30GB of free space. When I now delete anything off this drive, instead of being moved to the trash it is instantly deleted. I have seen this behaviour once or twice in the past, but this time round I wasn't presented with the standard warning that deleting my files would be effectively instant. On top of this - and this is the real problem - the disk space used by that file is not relinquished back to the disk upon deletion. I have recently deleted about 70GB of files from the partition and whilst they have gone, I have not seen any more drive space made available to me in the Finder info bar or Get Info.
    So far I've used a 3rd party util called Disk Inventory X to see how the partitions space is allocated, and I can't see anything untoward in there (such as a large hidden folder containing my trashes), I've inspected the .Trash folder on the partition and confirmed it is empty, and I've unplugged and re-mounted the drive, all to no avail. I've doulble checked I have ownership of my .Trahs files, and that all seems to be in order, and that's about the extent of my expertise - I can't think of anything else to do to get to the bottom of this issue short of backing up all the files onto another volume and re-formatting the partition. Given the amount of time this will take I really want to leave this as a last resort.
    If anybody can help shed any light on this issue for me I would be incredibly grateful.
    Thanks in advance

    Update: I was previously unable to try "Secure Empty Trash" because Finder showed my Trash as empty. However, after deleting a file from my Home folder (so that the Trash icon now shows there's stuff there to be emptied), I have tried Secure Empty Trash again and it looks like Finder has begun the slow process of wiping about 70GB from my external partition.
    While this may have solved the issue for the time being, I am concerned that this behaviour will continue, so if anybody has encountered this issue before and knows how to deal with it, I'd still very much welcome your input.

  • Formatting a HDD with the Solaris 8 install when the disk space is locked.

    I added memory, a printer, and a CD Writer to my PC, and then I reinstalled solaris 8. At the point where it asks which drive to use, the only available drive, which is my C: drive, shows up with a negative disk space value. However, when I look at the partition size, it is 20 GB, and if I change it, it has no effect on the negative value. This is a reinstall of Solaris 8 onto the same drive. Is there a way to fdisk the drive. Solaris 8 won't do it, and Partition Magic seems to only work with linux, which does not seem compatible with Solaris?

    I added memory, a printer, and a CD Writer to my PC, and then I reinstalled solaris 8. At the point where it asks which drive to use, the only available drive, which is my C: drive, shows up with a negative disk space value. However, when I look at the partition size, it is 20 GB, and if I change it, it has no effect on the negative value. This is a reinstall of Solaris 8 onto the same drive. Is there a way to fdisk the drive. Solaris 8 won't do it, and Partition Magic seems to only work with linux, which does not seem compatible with Solaris?

  • Not enough disk space to run app

    A game I play regularly will not open. It's says I don't have enough disk space even though I have a 64G iPhone with 30G still free. I have tried closing other apps, deleting some and freeing up more space and un-syncing my iTunes and closing auto updates and refreshing but nothing seems to work and my app still won't open..... Has anyone else experienced this or know of a resolution?

    I have reported it to the developer although it's at the most within 6 days until they get back to me. Never had this happen before. The app is Racing Rivals

  • How to notify users when they are timed out?

    So I am a developer for fortune 500 company and the network infrastructure team came to me with an odd request for an application that taps into Anyconnect. I find it hard to believe that this functionality doesn't exist.
    So here is the scenario. We have Anyconnect set up to not have an idle timeout. However we have it set up to disconnect after 12 hours.
    Here is the problem. When the end user meets that 12 hours, it just disconnects on them. There are no warning messages, no messages they have been disconnected. Just the connection is terminated.
    So my question is there any way to set this up to notify the user they have been disconnected and need to reconnect. Is there a way to notify them in advance that they will be disconnected in say 30 minutes?
    They want me to create an application that periodically checks the connection time by executing
    C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client>vpncli stats traffic
    Getting the time connected then if they are nearing the timeout time then start presenting the user with a warning.
    So that's basically my question. Is there no way to set this up in Anyconnect? If we are supposed to see these messages is it something our team might have disabled?
    We are using Anyconnect 3.1.01065 on Windows XP and Windows 7

    >> You don't have an idle timeout but will force disconnect after 12 hours? Does this really makes sense?
    Actually yes, at least in our environment. Using Citrix applications and VT Terminal applicaitons they need a constant connection. If the user disconnected say via an Idle Timeout then their sessions into these applications can and will hang. Not only that the older VT terminal sessions if hung durring a process that locks records or tables then it is locked for everyone. They have to call our helpdesk and have them kill the user. Citrix gets a little wacky as well if the user just blinly disconnects. So idle timeouts are actually a bad thing. Also a user might through a terminal session or though a citrix connection start a long run transaction. For example a blueprint sent off to a render farm could take 3-4 hours to render some have even take 10 hours. So a user may start a process and then go away especially on the weekend.
    So while there are issues with the internet in general that can cause disconnects most of this software will try reconnecitng from the server to the client everal times before finally giving up. So a quick break in internet connectivity is not an issue, a idle timeout where it doesn't reconnect until the user returns doesn't work.
    Thanks for the link though, that will help

  • How to notify users that their account is lockout

    Hi,
    We have an implementation of Cisco Secure for Windows. To log into the cisco devices the cisco device use tacacs and the cisco secure server checks against windows AD to validate user+password credntials. Now if the users fail three times in a row their account in AD gets locked for 2 minutes. Their tacacs accounts get locked after 7 attemps. However the user does not get a warning from the cisco device when the windows account is locked out so some users keep on trying so also their tacacs account gets locked out. I see in the logging on the acs server that the windows AD is telling it that the account is locked. Is it possible to send this message to the user prompt to notify them? Otherwise is it possible to also lock the tacacs account for two minutes?

    Yes it is possible... but wasnt implemented.
    If you use the ACS internal database, password aging messages get passed back via T+ that allows for forcing admins to change passwords and the like.
    Its actually not that hard for ACS to do the same for Windows/AD but it was never done - which is a shame.
    I guess if enough people shouted at Marketing they might add it.
    Darran

  • Notifying users when a request is made

    Hello Friends,
    I have a problem when launching notifications when sending response to a request.
    Here the scene in detail:
    1. The user user01 (who makes the request) with mail account: [email protected] makes a resource request through the administration console of Oracle Identity Manager.
    2. He gets a notice via email to the user's account approv (who approved the request) to account mail: [email protected]
    3. The sender of the email the user approver in this case is correct:
    From: [email protected]
    To: [email protected]
    4. When the user approver approves or rejects the request he receives a message notifying the requesting user
    From: [email protected]
    To: [email protected]
    5. According to point No.4 the requesting user should receive notification of the user in this case: From: [email protected]
    The stage is on an environment of Oracle Identity Manager 9.1.0.2
    Any recommendation to correct this notification process. thanks

    Friend,
    What is required is notified through the e-mail to each applicant (this part if configured correctly) when making the request and notify the approver with your email address to the requesting users the status of the application when approved or rejected (in this part the notification has been done with the requesting user's account. See example in the previous thread)
    In addition the accounts you have created with the duly completed Mail field.
    Thanks..

  • Upgrade to Win 7 (64bit) from Vista 32 - Not enough H Disk space after running Windows easy transfer

    Hello all!
    I upgraded from Vista 32 to Windows 7(64bit) using the custom install as per instruction found on Lenovo and the upgrade has gone well.  My machine is running much better and faster now.  However, I tried to transfer my files with easy transfer and I have run out of room on the HD.  After the install, my C drive had about 35 Gigs with no other programs installed except for Win 7.  This seems to be too much memory used for win 7 OS.  I am thinking that other data like past restore data may be taking up a lot of room?  Also my Easy transfer file is 79 gigs which also appears to large of a file.  I have not been able to use Easy Transfer because of lack of drive space.  Can I reformat my HD and run a new win 7 install from the Win 7 upgrade software CD?
    Thanks in advance?

    Problem Solved!!!
    This problem was related to the NVIDIA chip defect on the mother board. Please see:
    http://forums.lenovo.com/t5/T61-and-prior-T-series-ThinkPad/T61-Nvidia-Quadro-NVS-140M-garbled-displ...
    Thanks!

Maybe you are looking for