Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Slow Mac, spinning color wheel, every action takes forever? What is going on?

My iMac with Lion 10.7.5 software was fine yesterday and today it is sluggish and slow and every operation takes forever, the spinning color wheel spins and spins and spins before it opens mail or a program or a blank Word document. What gives?

iMac, Mac OS X (10.5.6)

Posted on Jan 5, 2014 6:21 PM

Reply
1 reply

Jan 5, 2014 7:11 PM in response to Martin Place

If you don't already have a current backup, back up all data before doing anything else. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve your problem. The backup is necessary on principle, not because of anything suggested in this comment. There are ways to back up a computer that isn't fully functional. Ask if you need guidance.

Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The procedure will help to identify which such modifications you've installed, as well as some other aspects of the state of the system that may be pertinent.

Here's a brief summary: Copy a line of text from this web page into a window in another application. Wait about a minute. Then paste some other text, which will have been copied automatically, back into a reply on this page. The sequence is: copy, paste, paste again. Details follow.

You may have started the computer in "safe" mode. Preferably, these steps should be taken while booted in “normal” mode. If the system is now running in safe mode and is bootable in normal mode, reboot as usual. If it only boots in safe mode, proceed anyway.

Below are instructions to run a UNIX shell script. It does nothing but produce human-readable output. However, you need to be cautious about running any program at the behest of a stranger on a public message board. If you question the safety of the procedure suggested here — which you should — search this site for other discussions in which it’s been followed without any report of damage. If you can't satisfy yourself that these instructions are safe, don't follow them.

The script will line-wrap or scroll in your browser, but it's really a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it.

If you have more than one user, and the affected user is not an administrator, then please run the script twice: once while logged in as the affected user, and once as an administrator. The results may be different. The administrator is the user that is created automatically on a new computer when you start it for the first time. If you can't log in as an administrator, just run the script as the affected user. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.

Launch the built-in Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.


When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign ($) or a percent sign (%). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign.


Triple-click anywhere in the line of text below on this page to select it:

clear; PB="/usr/libexec/PlistBuddy -c Print"; PR () { [[ "$o" ]] && o=$(sed 's/^/ /' <<< "$o") && printf '\n%s:\n\n%s\n' "$1" "$o"; }; PC () { o=$(egrep -v '^[[:blank:]]*($|#)' "$2"); PR "$1"; }; PF () { o=$($PB "$2" | awk -F'= ' \/$3'/{print $2}'); PR "$1"; }; PN () { [[ $o -eq 0 ]] || printf "\n%s: %s\n" "$1" $o; }; a=$(id | grep -w '80(admin)'); [[ "$a" ]] && sudo true && r=1 || r=; { [[ "$a" ]] || echo $'No admin access\n'; [[ "$a" && ! "$r" ]] && echo $'No root access\n'; system_profiler SPSoftwareDataType | sed '8!d;s/^ *//'; o=$(system_profiler SPDiagnosticsDataType | sed '5,6!d'); fgrep -q P <<< "$o" && o=; PR "POST"; o=$(($(vm_stat | awk '/Pageo/{sub("\\.",""); print $2}')/256)); o=$((o>=1024?o:0)); PN "Pageouts (MiB)"; s=( $(sar -u 1 10 | sed '$!d') ); [[ ${s[4]} -lt 90 ]] && o=$( printf 'User %s%%\t\tSystem %s%%' ${s[1]} ${s[3]} ) || o=; PR "Total CPU usage" && o=$(ps acrx -o comm,ruid,%cpu | sed '2!d'); PR "Max %CPU by process (name, UID, %)"; o=$(kextstat -kl | grep -v com\\.apple | cut -c53- | cut -d\< -f1); PR "Loaded extrinsic kernel extensions"; o=$(launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)|\.[0-9]+$/{print $3}'); PR "Loaded extrinsic user agents"; o=$(launchctl getenv DYLD_INSERT_LIBRARIES); PR "Inserted libraries"; PC "cron configuration" /e*/cron*; o=$(crontab -l | grep [^[:blank:]]); PR "User cron tasks"; PC "Global launchd configuration" /e*/lau*; PC "Per-user launchd configuration" ~/.lau*; PF "Global login items" /L*/P*/loginw* Path; PF "Per-user login items" L*/P*/*loginit* Name; PF "Safari extensions" L*/Saf*/*/E*.plist Bundle | sed 's/\..*$//;s/-[1-9]$//'; o=$(find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) | wc -l); PN "Restricted user files"; cd; o=$(find -L /S*/L*/E* {/,}L*/{A*d,Compon,Ex,In,Keyb,Mail/Bu,P*P,Qu,Scripti,Servi,Spo}* -type d -name Contents -prune | while read d; do ID=$($PB\ :CFBundleIdentifier "$d/Info.plist") || ID=; ID=${ID:-No bundle ID}; egrep -qv "^com\.apple\.[^x]|Accusys|ArcMSR|ATTO|HDPro|HighPoint|driver\.stex|hp-fax|\.hpio|JMicron|microsoft\.MDI|print|SoftRAID" <<< $ID && printf '%s\n\t(%s)\n' "${d%/Contents}" "$ID"; done); PR "Extrinsic loadable bundles"; o=$(find /u*/{,*/}lib -type f -exec sh -c 'file -b "$1" | grep -qw shared && ! codesign -v "$1"' {} {} \; -print); PR "Unsigned shared libraries"; o=$(system_profiler SPFontsDataType | egrep "Valid: N|Duplicate: Y" | wc -l); PN "Font problems"; for d in {/,}L*/{La,Priv,Sta}*; do o=$(ls -A "$d"); PR "$d"; done; [ "$r" ] && { o=$(sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|calendarse|cups|dove|isc|ntp|post[fg]|x)/{print $3}'); PR "Loaded extrinsic daemons"; o=$(sudo defaults read com.apple.loginwindow LoginHook); PR "Login hook"; o=$(sudo crontab -l | grep [^[:blank:]]); PR "Root cron tasks"; }; o=$(syslog -k Sender kernel -k Message CReq 'GPU |hfs: Ru|I/O e|n Cause: -|NVDA\(|pagin|timed? ?o' | tail -n25 | awk '/:/{$4=""; print}'); PR "Log check"; } 2> /dev/null | pbcopy; exit


Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). The text you pasted should vanish immediately. If it doesn't, press the return key.

If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter your password, the script will run anyway, but it will produce less information. In most cases, the difference is not important, so don't worry about it.

The script may take up to a few minutes to run, depending on how many files you have and the speed of the computer. Wait for the line "[Process completed]" to appear in the Terminal window.

You can then quit Terminal. The output of the script will have been copied to the Clipboard automatically. All you have to do is paste into a reply to this message by pressing command-V again. If any personal information, such as your name or email address, appears in the output, anonymize it before posting. Usually that won't be necessary.

Slow Mac, spinning color wheel, every action takes forever? What is going on?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.