Site BLOG PAGE🔎   UP ONE LEVEL
 OJB's Web Site. V 2.1.entry198 blog owen2 
Blog

Add a Comment   Up to OJB's Blog List

Terminal 101

Entry 198, on 2005-07-22 at 16:38:59 (Rating 1, Computers)

I thought I might share some of my favourite geeky tricks for trouble-shooting the Mac here for a change. Before you use these tips you will need to get used to the idea of using the Terminal program. This is a program in the Utilities folder of all Macs running any version of Mac OS X. You launch it like any other program, but once its running you do things by typing commands - really retro for a Mac user! You will also need to be logged in to your Mac as an admin user (by default users have admin abilities) to do most of what follows.

There are easier ways to do many of these tips (including using the Activity Monitor program), but I prefer to use the more geeky, and more flexible, method. Also, remember that to impress most Mac users all you need to do is to use Terminal to dive into the Mac's Unix command line and type away! Another advantage is you can diagnose a Mac by remote control this way by connecting through SSH.

Please note! Warning! Caution! You can use terminal commands to really mess up your machine, even if you follow some of what I say below. Please be careful what you type, and take note of all cautions. Also, I can't take responsibility for any damage you might cause!

Sometimes you might find your Mac is running a bit slow. Often this is due to a program (or a Unix process) getting really busy and using up most of the computer's resources: such as CPU, hard disk, or network. So run Terminal and type the following command: "top -u" (don't type the quotes, just what's between them).

You will see a screen of obscure looking numbers which re-displays itself every 1 second. Look at the top of the list and see which programs are using most of the CPU (the percent CPU used by a program is shown in the third column). If you see a really busy program (one using over 90% consistently over several seconds) make a note of its process ID (first column). Type "q" to stop the display refreshing.

If the process name (second column) is one you recognise (eg Safari) just quit from this program using the usual Quit command and try running it again. Then have another look at its activity using top. If the process isn't something obvious, and is something apparently obscure (for example cupsd) there might be something weird happening.

What to do next is tricky. If you know what the process does (for example, cupsd handles printing) you might be able to diagnose what's wrong (maybe your printer has hung up). A list of Mac OS X processes, and what they do, is on my web site at the address shown with this entry.

If you feel confident you know what the process does, and that its not critical to your machine's normal operation, you can stop it running using "sudo kill pid" where pid is the process ID you noted earlier. The "sudo" command gives you privileges to kill the process, and you will need to type the admin password first.

But note! Killing processes can be dangerous. Some processes are critical to the system. If you aren't sure, contact a Mac expert and tell them which process is hogging the CPU. That will give them a good idea of what might be wrong.

That's my first geeky Mac terminal trick. Stay tuned for more in future.

Link at: http://owen2.otago.ac.nz/owen/XuMacTips/MacOSXProcesses.html


There are no comments for this entry.


You can leave comments about this using this form.

Enter your name (optional):


Enter your email address (optional):


Enter the number shown here:
number

Enter the comment:

Enter name, email (optional), enter number, comment, click Add.
You can leave the name blank if you want to remain anonymous.
Enter your email address to receive notifications of replies.
Comment should appear immediately (authorisation is inactive).

My latest podcast: OJB's Podcast 2024-08-22 Stirring Up Trouble.
 ©2024 by OJBRSS FeedMS Free ZoneMac Made
T: 12. H: 46,658,003
Features: RSS Feeds Feedback LogMod: 04 Nov 2024