Such a thing as 'Too Much Maintenance'?

Discussion in 'macOS' started by stevietheb, Aug 23, 2005.

  1. stevietheb macrumors 6502a

    stevietheb

    Joined:
    Jan 15, 2004
    Location:
    Houston
    #1
    I occasionally use MainMenu to do a bunch of maintenance tasks. Now there is a "batch task" option that allows you to perform any combination of the following tasks with just one click:

    Repair Disk Permissions
    Run All Cron Scripts
    Update Prebindings
    Clean User Cache
    Force Empty Trash
    Clean Archived Logs
    Clear All Browser History
    Empty All Browser Cache

    Currently, I have it set up to do all of these except "Clear All Browser History."

    So, I was thinking to myself, "How nice, I could just set this up to run every night when I go to bed..."

    My question then, is this, is there such a thing as too much maintenance? Could there be any unforeseen problems with running this on a nightly or bi-nightly basis?

    Thanks...
     
  2. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
    #2
    I don't think you'll do any damage. But it's not really necessary all the same. :)
     
  3. stridey macrumors 65816

    stridey

    Joined:
    Jan 21, 2005
    Location:
    Massachusetts, Connecticut
    #3
    It'll slow down your web browsing (to empty the cache every night). But if you have a fast connection, it's not really an issue.
     
  4. stevietheb thread starter macrumors 6502a

    stevietheb

    Joined:
    Jan 15, 2004
    Location:
    Houston
    #4
    Yes...I realize it's not necessary...I'm just a freak.

    Perhaps weekly is more appropriate?
     
  5. terriyaki macrumors 6502a

    Joined:
    Aug 4, 2005
    Location:
    Vancouver
    #5
    Sorry for bumping an old thread but I have a relevant question..

    Are there any free maintenance programs for Tiger?
     
  6. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
  7. Voidness macrumors 6502a

    Voidness

    Joined:
    Aug 2, 2005
    Location:
    Null
    #7
    Yes, OnyX is a free maintenance program. You can get it right here:
    http://www.apple.com/downloads/macosx/system_disk_utilities/onyx.html

    It's great, I've been using it for a few days.

    Edit: mad jew beat me :p
     
  8. stevietheb thread starter macrumors 6502a

    stevietheb

    Joined:
    Jan 15, 2004
    Location:
    Houston
    #8
    MainMenu, the impetus for this thread, is very free.
     
  9. terriyaki macrumors 6502a

    Joined:
    Aug 4, 2005
    Location:
    Vancouver
    #9
    D'oh! I saw the purchase link and assumed it was shareware. :eek:

    Thanks, guys.
     
  10. risc macrumors 68030

    risc

    Joined:
    Jul 23, 2004
    Location:
    Melbourne, Australia
    #10
    Why do people keep recommending apps to run the nightly, weekly, and monthly cron jobs by hand? This is pointless on a UNIX box, do what every other UNIX does and install Anacron for Tiger.

    If you need it for Jaguar or Panther get it here.
     
  11. terriyaki macrumors 6502a

    Joined:
    Aug 4, 2005
    Location:
    Vancouver
    #11
    Can Anacron do all the tasks MainMenu performs? I noticed it says that Anacron logs it's activities in a .log file... is that .log file ever cleaned/purged?

    What exactly are the daily tasks? Weekly? Monthly?
     
  12. iGary Guest

    iGary

    Joined:
    May 26, 2004
    Location:
    Randy's House
    #13
    I like Onyx, and run all the scripts about three times a week.

    This machine gets wickedly heavy use, and it's finicky.

    Don't need browser cache myself and web pages change so often anymore...
     
  13. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #14
    Why don't you just download and test the utlities that interest you? Or, am I missing something?
     
  14. terriyaki macrumors 6502a

    Joined:
    Aug 4, 2005
    Location:
    Vancouver
    #15
    Well I've googled about Anacron and haven't really figured out what exactly it does. I know it does maintenance tasks but I'd like to know what the tasks are specifically and how often they run.

    The link for Anacron above doesn't really mention anything other than something along the lines of, "install Anacron and it will do all of this stuff for you and you won't even know it's there!"

    I'm already using MainMenu and I like it... but Anacron sounds really cool. I just wanted some info about it before trying it since it sounds like I won't even be able to know and see what it does when it does it.
     
  15. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #16
    OS X like most other Unix variants has a mechanism for automatically running tasks at specified times. This mechanism is called "cron".

    The main maintenance tasks necessary on OS X are set up as cron jobs during an install of OS X. In addition to other things, these default cron jobs compress and archive the most recent 8 versions of the system log files as compressed files.

    Since laptops (and many desktops) are generally not powered up 24/7 then the cron jobs scheduled to run when the machine is powered down or asleep will not be run. Many periodic cron jobs are scheduled to happen at 2am or 3am since the assumption is that the computer is less likely to be busy at that time.

    Manually running the command "periodic monthly", "periodic weekly", and "periodic daily" is a way of manually triggering some of the scheduled cron jobs. What Anacron does is it monitors the scheduled cron jobs and ensures that any cron jobs that are not executed due to the computer being shutdown are run the next time the machine is powered up.

    In comparison to MainMenu, Anacron would eliminate the need to perform the "Run All Cron Scripts" and "Clean Archived Logs" tasks in MainMenu. I would advise against "Clean Archived Logs" if that task is really deleting the archived logs since the archived logs can be extremely helpful in troubleshooting problems. And since the default cron jobs archive and rotate the logs it is unlikely that the system logs will consume more than say 1MB of your disk space.

    In terms of the other things MainMenu does (at least according to the list above), it isn't necessary to clear your cache's regularly and in fact doing this will reduce performance in certain areas. Force emptying the trash can bite you from time to time.

    Updating prebindings/repairing disk permissions are operations that should generally only be done as required. They are unlikely to hurt anything if you do them often but you are running something as root and the general rule is that you should avoid running anything with root access unless you really need to. In this case, by updating the prebindings regularly you are assuming that the prebinding specification is always correct on your system. If a bad apple update (as happened earlier this year), or maybe some malicious code changed the prebinding specification then by running prebinding regularly you are introducing problems as a side effect of rebuilding the bindings. A similar issue could arise with repairing disk permissions.

    Just some information, I'm not associated with anacron in any way. But I have used it for ages on various Unix machines without any problems.

    Edit: More details on what Anacron does can be found on the original OS X Anacron page: http://www.alastairs-place.net/anacron.html
     
  16. terriyaki macrumors 6502a

    Joined:
    Aug 4, 2005
    Location:
    Vancouver
    #17
    What do you mean by archive and rotate the logs? Does that mean the log files are "pruned" (so to speak) from time to time... like deleting events that have happened more than 30 days ago?

    I agree with you, though.. in the event of an unknown problem or problems logs would be very useful.

    Thanks for your help, mrichmon. :)
     
  17. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #18
    Rotating and archiving the logs means that periodically the current log is compressed and moved with only a set number of previous logs being stored. This is easier to explain with an example.

    Say you have the log file "system.log".

    Code:
    system.log
    
    When the periodic log rotation is run, the current "system.log" file is renamed to "system.log.0" and compressed using gzip which results in a file named "system.log.0.gz".

    Code:
    system.log.0.gz
    Then your system runs for a while producing more information in the system.log file so you end up with two files:

    Code:
    system.log
    system.log.0.gz
    
    The next time the rotation runs, "system.log.0.gz" is renamed to "system.log.1.gz", then the current system.log is renamed and compressed as described above. The result will be two compressed log files then after the system runs for a little and produces some log data you will have three files: (The system.log file is only recreated when there is log data to record.)

    Code:
    system.log
    system.log.0.gz
    system.log.1.gz
    
    Eventually you will get to the point where you have 'n' logs... for the system.log file n=9, for other log files such as secure.log and install.log n=5. So, you have the following files:

    Code:
    system.log
    system.log.0.gz
    system.log.1.gz
    system.log.2.gz
    system.log.3.gz
    system.log.4.gz
    system.log.5.gz
    system.log.6.gz
    system.log.7.gz
    system.log.8.gz
    
    Where system.log is the current system log file and system.log.8.gz is oldest system.log file still on the system. system.log.8.gz is the log file that was archived 8 log rotations ago.

    So at this point when the logs are rotated, system.log.8.gz is deleted. system.log.7.gz is renamed to system.log.8.gz, system.log.6.gz is renamed to system.log.7.gz and so on until system.log.0.gz is renamed to system.log.1.gz and then the system.log file is renamed to system.log.0 and compressed to system.log.0.gz.

    The net result is that you always have the current log, and the last n backup logs. You can see these files on your system by opening a terminal and entering the command: (pay attention to the modification dates on the files to get an idea of what is going on with the files.)

    Code:
    ls -la /var/log
    
    So, yes they are pruned, but it is not pruning based on so many days but rather on when the cron tasks are run. The system.log file is rotated daily by the default cron jobs in 10.4. secure.log is rotated every couple of days install.log looks like the rotation schedule is determined by the a period of time or the size of the current log file.

    Hope this helps.
     

Share This Page