‘Shutdown’ versus ‘poweroff’ versus ‘halt’ on Ubuntu server

There seems to be a lot of confusion around how to properly restart or shut down your server under Ubuntu. The are several commands out there: halt, shutdown, poweroff and reboot. Which are the right ones to use and what are the differences?

Historically, halt, poweroff and reboot were fairly low-level commands that would do exactly what their command name implies. However, they would not gracefully take down your server – it was presumed that the server administrator would do that him- or herself before invoking these commands. Many newer Linux users were not familiar with the right usage scenarios and, as a result, the commands were changed to invoke shutdown, a gentler command that gracefully terminates any open processes by giving them an opportunity to complete tasks before exiting.

Since these commands now invoke shutdown, the following are equivalent:

Restarting your server
reboot is the same as
shutdown -r 0

Turning off your server
halt is the same as
poweroff is the same as
shutdown -P 0

Note that these commands need to be invoked as root or via the sudo command, e.g.
sudo halt.

The original usage of these commands is also available via the -f switch. So to invoke halt directly without going through shutdown, use sudo halt -f. This is not recommended unless you are sure all other processes have finished their work. Similarly, sudo shutdown 0 by itself is not very useful – in Ubuntu it drops the server into the Recovery Menu since all processes are terminated but the server is not asked to power down or restart. It can certainly be manually powered down or restarted from there, though. Also, instead of the 0 after shutdown you can use now or specify some other time (either in minutes from now or absolute time) for the server to shut down.

  • Share/Bookmark

Augmented reality away from the iPhone or computer

Augmented reality has been a popular topic for the iPhone as well as computers or game consoles. Now it appears that next year we are going to see more compelling products from the AR field outside of just iPhone applications, sales materials, and PC/console games:

Recon Instruments is getting ready to launch ski googles with build-in heads-up display. Utilizing various sensors to display real-time information on speed, slope angle, weather, altitude, and more, the googles also use a GPS to show you your friends’ locations on the slope! All this technology takes up space but since ski goggles are naturally pretty bulky, it’s not as intrusive. I can’t wait for similar technology to make it into sunglasses in the next decade.

Augmented Reality Ski Googles

Augmented Reality Ski Googles

  • Share/Bookmark

Google adds ‘Site Performance’ to Webmaster Tools – ready for Caffeine?

Google just added a new performance feature to the Labs section of its Google Webmaster tools. The ‘Site Performance’ feature displays a historical overview of your site performance (see picture below) as well as Page Speed suggestions for your slowest pages underneath.

Webmaster Tools - Site performance

 
The suggestions take the form of some stats on the page as well as suggestions to improve performance:

  • [Link to the page]
  • Details: Save up to [xxx] KB, [xxx] requests, [xxx] DNS lookups
  • Enable gzip compression
  • Combine external JavaScript
  • Minimize DNS lookups
  • Combine external CSS

Much has been blogged about Google’s new Caffeine engine and its effect on SEO and SERPS rankings. Google certainly seem to be pushing for faster page loading. I doubt Google will take this to the extreme though. If a feature doesn’t improve the quality of their search results, it won’t improve the user experience and it won’t make them more money. I wonder how much of it is posturing to get Webmasters to make faster sites. Sure, if your site is very slow, they may penalize you. But I doubt it will make a big difference on your SERPS ranking whether your site loads in 0.5 seconds or 1 second.

What it probably will affect is crawl rate. Google only has a certain amount of time available to crawl for each site. If your pages load slower, less of them will be re-indexed before Google moves on to the next stie. So your results may not be as fresh and that’s where I think the biggest penalty will kick in both currently and maybe more so under Caffeine.

  • Share/Bookmark

Has your mail server has been blacklisted for spam?

We used a shared host for one of our projects and recently noticed a lot of emails not making it to their intended destinations. It turns out that someone else on our shared host was using it to send spam and, as a result, everyone’s email from that IP address was marked as spam as well.

How can you find out if your mail server has been blacklisted for spamming? Use these tools below:

Spamhaus SBL Blacklist
MX Toolbox Spam Blacklist lookups

Also, if you have your own dedicated server (or rather dedicated IP address, which is a good thing), make sure you get a reverse DNS entry for your IP address from your provider – this helps a lot in avoiding overly aggressive spam filtering since it creates a bit more trust in your IP address and mail server.

Not sure if you have a reverse DNS entry? Use a lookup tool such as this:

Reverse DNS lookup

Happy emailing! Just make sure you follow local and international laws on spamming.

  • Share/Bookmark

ChromeOS and the “Cloud” – where did my desktop go?

Google recently showed off their upcoming ChromeOS and released parts of the project into open source.

ArsTechnica published a very good overview of what the OS does and does not offer. I certainly don’t even want to attempt to replicate their effort. The most interesting part about the ChromeOS is what it doesn’t do: to achieve its advantages in (startup) performance and security, it basically does away with your local file system. Like workstations running off servers of an era past, ChromeOS basically is said to be a thin-client for the “Cloud” and the Internet.

Now, the “Cloud” is a much abused term lately. Some good explanations of the concept can be found in There’s Grid in them thar Clouds and also another Ars article on clouds. For purposes of the ChromeOS discussion, it doesn’t really have much to do with the cloud. Unlike the cloud, which refers to a virtualized concept of computing and storage resources, ChromeOS really only needs your data to live in online services – whether they use any sort of cloud or not. It needs your data to live online because it doesn’t have a concept of ‘local’ files beyond some minimal requirements of the operating system itself.

Think of your desktop on your computer. Well, that’s a thing of the past in ChromeOS. Want to look at photos from your camera? You need to upload them to Flickr or Picassa first. Want to write a text document? Sure, in GoogleDocs or Microsoft Office online. You lose your Internet connection or are traveling on a plane? Your ChromeOS computer is pretty much useless. In this sense, the ChromeOS is pretty revolutionary. It anticipates a future approach to computing we have not become accustomed to yet. It also anticipates a future where we are plugged into broadband Internet 24/7. Like Apple removing the floppy from the iMac, this has drawn a lot of criticism. This is partially misplaced. ChromeOS is not meant for power-users. It’s not even meant for most casual users. It is conceived as a better way to browse the Internet on a secondary machine. I think it will fail in its initial proposition. It’s added value will come from forcing service providers to rethink the structure of data – making it more abstract, capable of living not just on the desktop but forcing the move to decentralized storage. The comfort with such a system isn’t here yet and the facilitating technologies have not yet been invented. But I think it will create more services like Dropbox and ultimately clear the way to a future where people will no longer miss the local desktop.

For now, ChromeOS trades a faster startup time and fewer local security issues for slower performance over the network (applications and data need to be loaded from the Internet, causing overall performance that is probably worse than today’s desktops) and security concerns about the ultimate storage of your data. But in a few years these issues will have been resolved and rendered moot when our access to the Internet is so fast that it approximates the speed of today’s local storage media. Then we won’t have to worry about whether we left a file on your laptop or work desktop. Wherever we access the Internet, our data will just be there. Where did your desktop go? It’s going to be everywhere!

  • Share/Bookmark