|view in plain text or web browser|
#840: Terminal and SSH, Waking From Sleep, Mdworker
It has been cooling off last couple of weeks, but as usual, I forget what it actually feels like to be cold! It’s in the 40s at night now — we will likely see frost down here near the lake by the weekend and there are people skiing in the mountains already. So it’s not really cold, but just enough to remind me of what is coming (or not, if we get a repeat of last “winter”).
Business is brisk in service, with upgrades to Mountain Lion currently being one of our most-requested jobs. Upgrading from 10.5 is a chore that requires erasing the hard drive, installing, and restoring data. Upgrading from 10.4 is all that and more — the newest OS will not migrate data from Tiger; it must be manually copied.
We are getting lots of requests for upgrades from people who would rather have an experienced tech take care of their machines and data during this process. Please let us know if we can help any of you out there as well. But of course as Tech Tails readers, you can handle it I’m sure! Hope you are all having a good fall.
Thanks for reading.
|Why Did It Wake Up?||By Carl Grasso|
Have you ever been fast asleep only to be woken up by your computer waking itself from sleep? Ever wonder exactly why it woke up? I found a tip on the web recently that gave a great and easy way to try to determine what woke the computer up.
You’ll have to dive into Terminal a bit to get this information, and you may not necessarily get an answer. After your machine wakes up launch Terminal and type the following in:
syslog |grep -i “Wake reason”
You’ll then get a report from your OS that will give a code that tells you why the machine woke up. The article I found give some common error codes:
OHC (Open Host Controller): This likely means an external device like a USB keyboard or mouse woke the machine. It could also be an external FireWire device like a hard drive. To my knowledge, this should also include Thunderbolt devices as well.
EHS (Enhanced Host Controller): Similar to OHC except it’s usually wireless or Bluetooth devices.
USB (Universal Serial Bus): A USB device woke the computer.
LID0: This literally refers to the lid of your laptop. You shouldn’t see this code if you’re on a desktop.
PWRB: This refers to the Power Button of the computer.
RTC (Real Time Clock): This refers to wake-on-demand services like scheduling your computer with sleep and wake times in the Energy Saver settings.
As always, mess with Terminal at your own risk. Before you all start emailing me with other ways to do this, the article does point out that that there are other ways you can monitor this in the Console application, but this way you don’t need to wade through extensive logs filled with gobbledygook.
|Mdworker and Your Mac||By Jon Spaulding|
When discussing system CPU usage on a Mac, you cannot exit the conversation without discussing mdworker and mds. In Activity Monitor, this process will not appear unless you select all processes, and then, these processes seem to be ubiquitous and resource hogs. So, what are they?
Mdworker is short for Meta Data worker. This is a background process on your Mac that spends time indexing your files for Spotlight. Without mdworker, your Spotlight searches would be less than accurate at times. Mdworker returns its results to mds which builds your Spotlight database.
Why is it that it can be processor intensive? As it indexes your files, it must first read all of them. As it reads them, it then exchanges the information with mds to create the database.
So, how do you minimize mdworker and mds? You don’t. You could choose in System Preferences to stop indexing of all volumes in Spotlight and that would prevent these processes from being active. Often, you just have to let the processes run. Certainly, if you plug in a large external HD and do not want it indexed, or connect to a Time Capsule infrequently, you could disable the process from searching these volumes — reducing their workload when those volumes are preset.
Ultimately though, you would not be able to use Spotlight for searching those external devices effectively in the future also. While mdworker and mds can seem to be processor-intensive processes, their benefits far outweigh their costs in the long term.
|SSH in OS X Terminal||By Liam Flynn|
Secure Shell (commonly known as SSH) is a secure way to connect two computers over a network, even though the network itself might not be secure. Most often used for remote administration, SSH provides an encrypted data link between the two machines, so the connection is secure even over an inherently insecure network like the internet. (Wow…that sounds pretty boring — even to me.)
Basically, SSH lets you log into another machine somewhere with full access to a Terminal window (also called a shell) on that machine. Many people have probably seen some kind of remote login, either using Microsoft’s Remote Desktop, Apple Remote Desktop, or even just via having another computer in the Finder window. SSH is basically the same, with some differences (as follows).
Firstly, with SSH, you get into the command line, not the GUI. Anything you can do in Terminal you can make another machine do remotely. SysAdmins love it — many are serious Terminal users and being able to have secure remote access from anywhere to the command line on servers and client machines is a huge benefit for them. SSH can be a useful troubleshooting tool. On machines with no video output, SSH can tell you a lot about what is happening inside the machine. If a process has frozen the GUI, many times accessing the machine via SSH will let you identify the problem process and kill it if desired.
The other main feature of SSH is security — the connection is encrypted. Data going between the machines is secure. Well, mostly anyway — there is a vulnerability that would allow a small bit of data to be read by someone who knows what they are doing. But really it’s pretty solid. Anyone looking at the data stream will not be able to read it.
Let’s SSH in and see what’s up! This assumes you have two Macs on your local network you can play with:
1) On one of the machines, go into the Sharing preferences in System Preferences and enable Remote Login. You will see an indicator that Remote Login is active, and text that reads:
“To log into this computer remotely, type ssh yourname@yourIPaddress”
2) On the second machine, open Terminal, type ssh yourname@yourIPaddress and hit enter.
After a bit you will see the following: In this case, it’s fine that the host can’t be authenticated — you can be pretty sure you are connecting to the right place! (Always check to make sure you typed the right address in though.)
If all goes well, you will be presented with a command line prompt that shows you as logged onto the other computer. Let’s test it with the say command. In your Terminal window type say hello. If the volume is up on the other machine, it should say “hello” to you. Silly, but very satisfying!
Soo, we have a way to log into another machine’s command line via a secure connection, but what now? Besides some dorky system stuff, it’s hard to see what it might be useful for. It certainly was for me! There are a ton of things you can do with SSH, but one of the most useful is when you browse the web via a secure SSH connection no matter where you are (such as a coffee shop, bookstore, or airport) — it’s kind of a poor man’s VPN!
More on that next week, and other SSH stuff coming soon. Feel free to email me any specific questions or feedback you have.
|SPECIAL | Protect Your Mac||By Small Dog Sales|
The first scratch on your Mac is like the first scratch on your car. Keep your Mac looking new with a Hammerhead Neoprene Sleeve made to perfectly fit your newly refurbished 17-inch MacBook Pro.
MacBook Pro 17in 2.66GHz i5 4GB/500GB/Antiglare with a FREE Hammerhead Sleeve - Green/Beige
MacBook Pro 17in 2.66GHz i5 4GB/500GB/Antiglare with a FREE Hammerhead Sleeve - Black/Red
|SPECIAL | Save $10: G-Technology G-Connect 500GB Wireless Hard Drive||By Small Dog Sales|
Tired of cables getting in the way? Purchase a G-Technology G-Connect 500GB Wireless Hard Drive and save $10.
Then you’ll never have to plug a hard drive into your Mac again for those TimeMachine backups. You are backing up your Mac…right?
|SPECIAL | Only $99.99: Microsoft Windows 7 Home Premium 32-Bit OEM w/Service Pk 1||By Small Dog Sales|
Sometimes there is no way around it — you need Windows on your Mac. It’s ok, others do it, too. However, this sale should ease your pain. While supplies last, you can grab a copy of Windows 7 for just $99.99!
Warning: There are no open box returns on this product.
|Manage Your Account Preferences or Unsubscribe||Contact Us|
|Join our networks on the web: FaceBook Twitter Flickr YouTube|
©2008-2018. Kibbles & Bytes, Small Dog, Small Dog Electronics, and Always By Your Side are registered trademarks of Small Dog Electronics, Inc. Small Dog Electronics, Inc., 1673 Main Street, Waitsfield, Vermont, USA. All Rights Reserved.