Showing posts with label Mac. Show all posts
Showing posts with label Mac. Show all posts

6.10.2009

Mac OSX: Performing Maintenance

In Mac OSX, maintenance are performed regularly to keep your system always at its peak performance. Since these maintenance scripts are usually run at specific time, most of the time these maintenance are missed or skipped which leads to degradation of performance of your system.

To perform the maintenance tasks (all daily, weekly and monthly routine at once) in case you missed some open the Terminal app, and type:

sudo periodic daily weekly monthly

and let the maintenance script run, it may take a while but the performance of your system may increase significantly for some whenever they miss the maintenance schedule.

Below are some explanation of each maintenance script:

(Taken from http://www.thexlab.com/faqs/maintscripts.html)

Each maintenance script — daily, weekly, and monthly — has a specific function. Their functions have varied over different versions of Mac OS X.

  • The daily script removes old log files, "scratch" and "junk" files, backs-up the NetInfo database (Mac OS X 10.4 Tiger® and earlier), reports a variety of system and network statistics, and rotates the system.log file. Under Tiger, the daily script also cleans up scratch fax files and prunes asl.log, the log file for the then-new Apple System Loggingfacility. Under Mac OS X 10.5 Leopard®, the daily script also prunes the asl.db file that replaced the asl.log file for Apple System Logging.
  • The output from the daily script is written to the /var/log/daily.out file, which can be viewed in Console.
  • By default, the daily script is scheduled to run daily at 03:15 hours local time.
  • The weekly script rebuilds the locate and whatis databases. Depending on the version of Mac OS X, it also rotates the following log files: ftp.log, lookupd.log, lpr.log,mail.log, netinfo.log, ipfw.log, ppp.log, and secure.log
  • The output from the weekly script is written to the /var/log/weekly.out file, which can be viewed in Console.
  • By default, the weekly script is scheduled to run every Saturday at a specific time. UnderTiger and later, it runs at 03:15 hours local time. Under Mac OS X 10.3 Panther® and Mac OS X 10.2 Jaguar it runs at 04:30 hours local time.
    • The monthly script reports per-user usage accounting and rotates — depending on the version of Mac OS X — the wtmp, install.log, and cu.modem.log files.
    • The output from the monthly script is written to the /var/log/monthly.out file, which can be viewed in Console.
    • By default, the monthly script is scheduled to run on the first of the month at 05:30 hours local time.

    5.18.2009

    Mac OSX: Leopard 10.5 Enable Root User

    For Mac users especially for UNIX savvy, enabling root user is essential. This will allow better management of your system and have a separate password whenever you run "sudo" in terminal or X11 app.

    To enable root user in Leopard go to Application>Utilities>Directory Utility from there go to Edit>Enable Root User which will then prompt you with a new password to enter. Once completed, now running "sudo" or "su" will work only with the given password. Have fun!

    Mac OSX: Personalize your login window

    I've been a mac user since a very long time. Currently, my main machine is an aged Black MacBook 1st generation. For some, whenever you leave your mac, you will of course leave it to your login window (in Windows, it is known as lock user by pressing Window+L) so that your computer is safe from the wrong hands meaning that nobody can access your computer (your session at least) without your user authentication.

    In mac, the only way to allow this is by enabling fast user switching first, from there you click on your fast user switching icon (usually on the top right) and select "Login Window...".

    If you want to add more personalized message in the login window such as "This computer is mine", go to the terminal and type the following:

    sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "This computer is mine"

    Then try to go to the login window and voila, you will see the text just above the user list. Have fun!