HP announces Envy X2 tablet-laptop hybrid with Windows 8

HP announces Envy X2 tablet-laptop hybrid with Windows 8
HP announces Envy X2 tablet-laptop hybrid with Windows 8

Hewlett-Packard on Thursday announced an Envy X2 tablet-laptop hybrid device with the Windows 8 OS, signaling the company's re-entry into the tablet market, which it abandoned after the highly publicized failure of its TouchPad product.
At first glance, the HP Envy X2 resembles a netbook, with a keyboard base and an 11.6-inch touch display. But the device turns into a tablet once the screen is detached from the base.

The benefit of a hybrid device is it offers the best of both worlds for Windows 8, which doubles as a tablet and PC operating system. The tablet is 8.5 millimeters thick and 680 grams, and the display shows images at a 1,366-by-768-pixel resolution.
The Envy X2 runs on Intel's low-power Atom processor code-named Clover Trail. The device will be sold with the keyboard base and 64GB of solid-state drive storage, and the configuration cannot be customized. The device will become available during the latter part of the holiday season this year and will compete with hybrid devices that have been announced by PC makers like Asus, Acer, Lenovo and Samsung. Windows 8 will start shipping commercially on Oct. 26.
Though the device can operate independently as a tablet, HP views it as a laptop first and people have to buy the keyboard base. The dock has an SD card slot, USB ports and a high-definition multimedia interface (HDMI) port. The device has two batteries -- one in the base and the other in the tablet. The device offers more than eight hours of battery life in laptop mode. It has NFC capabilities, a high-definition webcam on the front and an 8.0-megapixel camera on the back. An optional stylus is available.
With this hybrid device, HP re-enters the consumer tablet market after it discontinued sales of webOS devices including the TouchPad. HP has reset its tablet strategy around Windows 8 OS.
HP also announced touchscreen ultrabooks with Windows 8 including the Spectre XT Touchsmart ultrabook, which is the company's first laptop with a Thunderbolt port. Thunderbolt is a high-speed interconnect technology developed by Intel to shuttle data between host PCs and external peripherals.
The ultrabook has a 15.6-inch, high-definition touchscreen and a choice of Intel's third-generation Core processor. It is 17.9 millimeters thick and weighs 2.16 kilograms. The laptop also features USB 3.0, Ethernet and HDMI ports.
The laptop will become available in the U.S. in December starting at $1,399. HP did not immediately provide information on worldwide availability.
HP's Envy Touchsmart Ultrabook 4 has a 14-inch touchscreen and a choice of Intel's latest Core processors. The ultrabook weighs 2.16 kilograms and offers up to eight hours of battery life. An optional Advanced Micro Devices graphics card can be added to the ultrabook to boost graphics capabilities. The company did not immediately provide availability and pricing for the product.

Apple targets 8 Samsung phones for sales ban

Apple targets 8 Samsung phones for sales ban

Following last week's court ruling in the trial between it and Samsung, Apple this morning laid out which Samsung devices it wants banned from sale in the U.S.
There are eight in total out of the 28 that were included in the case. Those include:
• Galaxy S 4G (T-Mobile)
• Galaxy S II (AT&T)
• Galaxy S II Skyrocket (AT&T)
• Galaxy S II (T-Mobile)
• Galaxy S II Epic 4G (Sprint)
• Droid Charge (Verizon)
• Galaxy Prevail (Boost Mobile)
• Galaxy S Showcase (C-Spire, Cellular South)

In its filing, Apple outlined the specific patents the devices were found to infringe in the trial, which went on for a month and wrapped up last week. The device with the most infringements is the Galaxy S 4G. It was found to infringe two of Apple's design patents, three utility patents, and two claims of trade dress:
Apple targets 8 Samsung phones for sales ban

All told, the devices in question racked up about $460.8 million worth of the damages, or less than half of the $1.05 billion Apple was awarded by the jury. That number could still go up pending a ruling from U.S. District Court Judge Lucy Koh, who presided over the case.Apple says this list is only "to address a portion of the immediate, ongoing irreparable harm that Apple is suffering."
The list in this filing does not include the Galaxy Tab 10.1, a device that the jury found to infringe on three of Apple's utility patents, but not Apple's tablet design patent. Citing those verdict findings in a filing late Sunday, Samsung filed to get a preliminary injunction against the device dissolved. Separately from this filing, Apple said that it still wants the 4G version of the tablet included in bans, saying it was not "colorably different," from the infringing devices.

LAMP Quickstart for Red Hat Enterprise Linux 4

A very common way to build web applications with a database backend is called
a “LAMP Stack”, where “LAMP” stands for the Linux® operating system, the Apache web server, the MySQL database, and the PHP (or Perl or Python) web
application language. This Quickstart will take you through configuring and starting up the LAMP components, and then downloading, installing and testing a
complete LAMP application, an online DVD Store. The DVD Store application, including four PHP pages and the code needed to build and load the MySQL database, can be used as a model for your own LAMP web application.

This Quickstart assumes you have successfully installed Red Hat® Enterprise
Linux 4 on your server (RHEL4 ES edition was used for the test but the
instructions should be similar for the other RHEL4 editions) and are moderately
familiar with Linux commands (you will need to be able to edit files). Total time to
work through the Quickstart should be 30 – 60 minutes.

Getting Started
For ease of use, log into the system as root.

Verify that the required packages have been installed. To do this, click on Applications => Systems Settings => Add/Remove Packages. This will bring up
a window showing all of the packages available, and what has already been installed, sorted by groups. Scroll down to the Servers section and verify the Web Server and MySQL Database have been checked. Under details of MySQL Database, verify that both php-mysql and mysql-server have also been checked. If any of these items have not been previously checked, simply click the update button at the bottom of the window and provide the appropriate installation media as requested.

For purposes of this document, the hostname is “rhel4es” and the root password
is “password” (you should use something more creative, of course!). You will need to ensure that all of the appropriate host name information has been
set in your network environment (updating DNS, or /etc/hosts, etc.) You will
need to create a non-root user to own the PHP and MySQL code. We used user
“web” with password “web”.

To create the web user, open a terminal shell (right click anywhere on the
desktop, select “Open Terminal”). Type the following (ideally you can cut and
paste right from this Quickstart to your Linux command shell). In this document
commands that you type or that are printed by the computer are indicated in
monospace font.

useradd web
passwd web

At this point, it will prompt you for the new password. Use “web” as the password
(ignore the warnings for BAD PASSWORD – you can always change this later).

For the rest of this document you will enter some commands as root and some
as web. [Hint: use two Linux command shells, one for root, one for web. If you
are logged in as root you can use the command su – web to login as web in that
command shell].

Start and Test Apache
To run the Apache web server you first need to make a small modification to the
Apache configuration file, then start the Apache service (known as “httpd”), and
finally configure it so it will always start when the machine is booted:

cd /etc/httpd/conf
cp httpd.conf httpd.conf.orig
gedit httpd.conf

Find the line with #ServerName new.host.name:80 and add below it:
ServerName rhel4es

Save your changes; close the window. Next, you will start the web server, and
configure it so that it will automatically start on the next reboot. Type the
following into the shell window:

service httpd start
chkconfig httpd on

To test Apache, bring up a web browser with URL http://localhost. You should
see the Red Hat Enterprise Linux Test Page:
LAMP Quickstart for Red Hat Enterprise Linux 4
Start and Test Apache

Start and Test MySQL
Before starting MySQL, you’ll need to create a MySQL configuration file from one
of the standard ones offered. As root, copy the standard small configuration file
to /etc/my.cnf and add 4 lines to the end of it. Type the following into the terminal

cd /etc
cp /usr/share/doc/mysql-server-4.1.7/my-small.cnf my.cnf
cat >> my.cnf <hit Enter, then paste in next 4 lines>
# For DVD Store full text search
ft_min_word_len = 3
ft_stopword_file =
<Enter Ctrl-C>

Next you need to start the MySQL service (called “mysqld”), and set it to always
start when the machine starts. Type the following into the terminal shell:

service mysqld start
chkconfig mysqld on

Now configure user access to the MySQL database. To change root’s password
(replace the final “password” with your root password), give privileges to the webuser, and remove the default anonymous user, type the following into the
terminal shell:

mysqladmin -u root password password
mysql –p

This will prompt you for the password you just entered above, and start the
MySQL monitor. You will need to ensure that you also add access based on
your specific host name as well (i.e. web@localhost.localdomain). Type the
following at the mysql> prompt:

grant all privileges on *.* to web@localhost identified by 'web';
grant all privileges on *.* to web@rhel4es identified by 'web';
delete from mysql.user where User='';

Login as web and test out MySQL:

su – web
mysql –u web –-password=web

This will start the MySQL monitor as the user “web”. Type the following at the mysql> prompt to test it:

show databases;

You should get output that looks something like:

| Database |
| mysql    |
| test     |
2 rows in set (0.00 sec)

Type “exit” to leave the MySQL monitor. Type “exit” again to log out as “web”.
This shows that MySQL has been installed with the initial two databases.

 Start and Test PHP

As root, edit the PHP configuration file to point to the correct host and allow
access to the web user, then restart Apache to read changes. In the terminal
window, type the following:

cd /etc
cp php.ini php.ini.orig
gedit php.ini

Change three lines to read as follows:

mysql.default_host = rhel4es   
mysql.default_user = web
mysql.default_pw = web

Save the document, close the window, then continue typing the following into the
terminal shell window to restart the web server and put the changes you just
made into effect:

service httpd restart

To test PHP, create a test PHP page. Type the following into the terminal

cd /var/www/html
gedit default.php

Add the following to the file:
   <title>PHP Test Page</title>
     echo “<hr />”;
     echo “<p align=center>This is a test of PHP!</p>”;
     echo “<hr />”;
     echo “<p align=center>Copyright &copy; 2005 Dell</p>”;

To test, use your browser to access http://localhost/default.php. It should look like
LAMP Quickstart for Red Hat Enterprise Linux 4
Start and Test PHP

Install and Test the DVD Store LAMP Application

Now you are ready to install a full LAMP application, the Dell DVD Store
application. This application has been released by Dell to the open source
community under the GPL license and is available for all to use.
First, download in binary the DVD Store files ds2.tar.gz and ds2_mysql.tar.gz
from http://linux.dell.com/dvdstore to web’s home directory, /home/web. To
accomplish this, type the following from the terminal window:

su – web
wget http://linux.dell.com/dvdstore/ds2.tar.gz

Then expand these “tarballs” with:

tar –xvzf ds2.tar.gz
tar –xvzf ds2_mysql.tar.gz

This will create several directories under /home/web/ds2 with the DVD Store data
files and driver programs, as well as the MySQL build and load scripts. Now, as
root, you will need to create a directory to put the PHP pages:

cd /var/www/html
mkdir ds2
Now, the PHP files need to be copied to the new directory:

cd ds2
cp ~/ds2/mysqlds2/web/php4/* .

Now you are ready to create and test the MySQL DVD Store database. As web:

cd ~/ds2/mysqlds2
sh mysqlds2_create_all_nosp.sh
mysql –u web --password=web

mysql> use DS2;
mysql> show tables;
| Tables_in_DS2 |
| CUST_HIST     |
| ORDERS        |
| PRODUCTS      |
| REORDER       |
8 rows in set (0.00 sec)

mysql> select count(*) from CUSTOMERS;
| count(*) |
| 20000    |
1 row in set (0.01 sec)

mysql> exit

This shows that the DVD Store has been installed correctly with 8 tables and
20,000 initial customers.

The DVD Store LAMP stack is ready for testing. With your browser, access
http://rhel4es/ds2. You should see the DVD Store Login page:
LAMP Quickstart for Red Hat Enterprise Linux 4

Login with Username “user2” and password “password”. You should see the
following Welcome screen:
LAMP Quickstart for Red Hat Enterprise Linux 4

Click on “Start Shopping”, search for some DVDs by Title, Actor or Category, add
DVDs to your shopping cart, and finally purchase them using your stored credit
card number.

You now have a working LAMP stack. By basing your application on the MySQL
and PHP code included here, you can jumpstart your own LAMP stack!

Essential free software tools for Windows 7

Windows 7 may be brand spanking new, but that doesn't mean you can't find free or cheap tools to tweak its settings, add features, or smooth an upgrade from XP or Vista. We've compiled a list of ten valuable software tools, many of them free, that can make your Win7 experience a lot more rewarding. (Click on each of the images for a closer look at the tool.)

Windows 7, like its predecessors, doesn't provide built-in protection against malware such as viruses and spyware. (It does have a firewall, however.) You could pay McAfee or Symantec for this service, but why bother with their protection racket when Redmond's does the same thing for free?Microsoft Security Essentials provides solid protection for home PCs, and it's gratis. If you prefer third-party security, check out AVG Anti-Virus Free Edition instead.
Brave souls upgrading to Windows 7 from XP must do a clean install, a tedious process that includes, among other things, reinstalling all of your apps. Why not load most of your free and open source programs all at once? Ninite does just that. First, go to the Ninite site and pick the programs you want (Firefox, iTunes, Skype, etc). Next, download Ninite, which installs the apps on your PC without additional crapware. Ninite is free for personal use.

Download here...

Windows Live Photo GalleryWindows Live Photo Gallery
To keep Windows 7 slim and trim, and avoid the code bloat that slowed Vista, Microsoft left a few utilities out of its new OS.
One such app,Photo Gallery, is a free, easy to use photo manager/editor that's worth a download, particularly if you're not already using Google Picasa to organise your pics and videos.

Windows Easy TransferWindows Easy Transfer
Anyone moving to Windows 7 from XP and Vista should check out this free download, which helps you copy files and settings from one PC to another. (Windows 7 comes with Easy Transfer.)
The new version of Easy Transfer adds a file explorer, which simplifies the task of selecting the exact files you want to copy. Easy Transfer won't hang if it comes across a file or setting it can't move. Rather, it'll complete the transfer and provide a report of everything it couldn't copy. The bad news: Easy Transfer won't copy your programs. For a PC-to-PC connection, you'll need an Easy Transfer Cable. Other transfer options include a USB flash drive, external hard disk, or network connection.
Download here...

Ultimate Windows TweakerUltimate Windows Tweaker v2
This free customisation tooldetects whether you're running Windows 7 or Vista, and offers only those tweaks that are relevant to your OS. "Ultimate" is a fitting description for this mega-tweaker, which provide dozens of configuration options for UI, network, security, and system settings. If you're all about personalising Windows 7, this app's for you.
Winzip 14 StandardWinZip 14 Standard
So you're about to ask: If Windows 7 has zip compression built in, why do I need the latest version of WinZip? Well, if you seldom use zip archives, you probably don't. But zip fans will appreciate the improvements inWinZip 14 Standard, which has simplified the process of zipping and mailing archives in Win 7.
The latest version offers better compression ratios too. WinZip 14 Standard costs $30.

EnhanceMySe7enEnhanceMySe7en Free
Windows 7 may be easier to use than Vista or XP, but diagnostic and maintenance chores can still be tricky.EnhanceMySe7enis a handy utility for anyone doing a little system housekeeping.
This free app makes it easier to select which programs will load when Windows starts, monitor your hard drives' performance, "health," and temperature, and fiddle with the Registry if you dare.

Image Resizer Powertoy CloneImage Resizer Powertoy Clone
Need to resize pictures in Windows 7? Thisfree utility makes it easy, simply right-click one or more image files in Windows Explorer. You can select one of four sizes: small (640 by 480); medium (800 by 600); large (1024 by 768); or handheld PC (240 by 320). You can create your own custom sizes too.

Systerac Tools for Windows 7Systerac Tools for Windows 7
This bundle of 16 tools from Systerachas everything you'll need to keep Windows 7 running smoothly. You can tweak Windows' performance and appearance, optimize memory, clean up the hard drive, cover your tracks by shredding files, and so on. The Systerac interface is aesthetically appealing, nicely organised, and easy to learn

Windows 7 Upgrade AdvisorWindows 7 Upgrade Advisor
Don't upgrade to Windows 7 before running this free utility from Microsoft. Upgrade Advisor scans your PC to see if it's ready for Win 7. If it detects any potential problems, including insufficient memory, incompatible hardware, or outdated software, it'll let you know in a brief summary report

Recommended Post Slide out for Blogger

“Keep the visitors glued to your site for long” This is what every blogger out there wants to do. The Recommended Post slide Out Widget does just that. It’s kind of  an invitation to the reader to read a new post once he has read one of your blog entries. You might have seen this kind of a widget on many popular websites like New York Times, Mashable, Times of India etc.

I too loved the idea and found out that some one else had already made a jQuery snippet which does just the same. You can read about this awesome code on Mary Lou’s blog athttp://tympanus.net/codrops/2010/04/13/end-of-page-slide-out-box/ 
This is the modified form of that snippet so that it gets loaded asynchronously without affecting the page load. The Slide out will show random posts from your Blog. The random posts are fetched from your Blog Feed using Ajax. 

Demo of the Slide Out

Scroll down to the bottom of the post and you should see the Recommended Slide Out.
Recommended Post Slide out for Blogger
Recommended Post Slide out for Blogger

Add the Recommended Post Slide out Widget

To add the widget to your blog, you can use this one click installer.

Customizing the Recommended Slide out

1. End Of Post marker – The slide comes out when the user scrolls down to a particular point in your Blog.(the bottom of the page by default) To mark this point, you can add an HTML element there. The element should have the id bpslidein_place_holder
e.g.: <div id='bpslidein_place_holder'></div> would do the job. The best place to add this marker would be at the end of the post. If you want to do it easily, you can add this to your Blogger Template.
In your template Find,(You will have to expand the Widget Templates)
<div class='post-footer-line post-footer-line-1'>
<p class='post-footer-line post-footer-line-1'>
Immediately below any of these, add the following snippet and save our template
<b:if cond='data:blog.pageType == "item"'>
<div style='display:none' id='bpslidein_place_holder'></div>
Now when the reader scrolls down to this div, the slide will open up.
2. Customizing the Look and Feel of the Slide out.
You can obviously style the Recommended Slide out. But before you do that, you have to add this variable definition to your template
<script>var bpslidein_custom_css=true;</script>
This should be added somewhere above the Slide Out Widget. If this variable is not set, a default StyleSheet will be used to spice up the Recommended Slide out.
Once this variable is set to true, you can add your own CSS definitions. You can add your CSS at Template Designer > Advanced Add CSS
This is the default set of Style definitions applied to the Widget. You can modify them and use it.
#bpslidein{z-index:5;width:400px;height:100px;padding:10px;background-color:#fff;border-top:3px solid #1616F5;position:fixed;right:-430px;bottom:0;-moz-box-shadow:-2px 0 5px #aaa;-webkit-box-shadow:-2px 0 5px #aaa;box-shadow:-2px 0 5px #aaa;font-family:Arial, Helvetica, sans-serif;}
#bpslidein p{font-size:11px;text-transform:uppercase;font-family:Arial,Helvetica,sans-serif;letter-spacing:1px;color:#555;}
#bpslidein_title{color:#555;font-weight:700;font-size:16px;margin:10px 20px 10px 0;}
#bpslidein a,#bpslidein a:hover,#bpslidein_title{text-decoration:none;color:#1616F5;}
#bpslidein .close,#bpslidein .expand,#bpslidein .help{border:2px solid #EEE;cursor:pointer;color:#9A9AA1;width:13px;height:15px;padding:2px 0 0 5px;position:absolute;right:10px;font-size:17px;font-weight:700;font-family:Arial, Helvetica, sans-serif;font-size:12px;}
#bpslidein .help{right:35px;}
3. Other Stuff that you can edit
You can edit the Title of the Widget and the Loading text by editing the Widget Content.

What Is a Parity Drive

What Is a Parity Drive
What Is a Parity Drive

A parity drive is a storage device used as part of a computer system that contains parity data for redundancy and backup purposes. This is commonly part of a Redundant Array of Independent Disks (RAID), in which one or more disk drives are connected together to act as a single system. When data is stored on these devices, parity information can be created for use later in case one of the disks fails. A parity drive is not necessarily part of all RAID setups, but it allows for simple and effective data recovery.
The basic function of a parity drive is to provide additional storage of "parity bits," which are pieces of data used to backup the main drives in a disk array. An array is a computer setup in which multiple disks, such as two or more hard drives, are connected together and used as a single storage system. Although a number of different methods are used for this, a RAID is among the most common forms. There are various types of RAIDS, and more complex "levels" often include the use of a parity drive to provide effective backup and redundancy of information.
A parity drive functions through the use of parity bits that are stored on it. The simplest example of how parity bits function is in a RAID or other system that uses three drives in total. Two of the drives would be used as the actual data storage disks, while the third would function as a parity drive. Whenever data is saved to the RAID, each piece of information is split in half, with one part going onto one drive and the other part onto the second.
Computer data consists of bits, which are binary pieces of data represented by either a one or a zero. Whenever information is stored on a system with a parity drive, one bit from each storage drive is added to the other. If the result is an even number, then a parity bit with a value of zero is saved to the parity device, while an odd result creates a value of one. This can then be used if one of the storage drives fails, to recreate the data that is missing in order to restore what was lost.
For example, a "1" on one device, and a "0" on the other, would generate a "1" to be stored on the parity drive, since this is an odd value when added together. If the storage drive with the "0" data on it becomes corrupted, it can be replaced with a new, blank disk. The system can then look at the existing data, find the remaining "1" in data storage, compare that to the "1" in the parity device, and recognize that a "0" needs to be recreated to restore the lost data. This is redundancy and allows an array to effectively recover data even if part of the original system is lost.

What are Disk Arrays

What are Disk Arrays

Disk arrays are storage systems that link multiple physical hard drives into one large drive for advanced data control and security. Disk arrays have several advantages over traditional single-disk systems.
A hard disk, while being the vital center of any computer system, is also its weakest link. It is the only critical device of a computer system that is not electronic, but relies on intricate moving mechanical parts that often fail. When this happens, data is irretrievable and unless a backup system has been employed, the user is out of luck. This is where disk arrays make a difference.
Disk arrays incorporate controls and a structure that pre-empts disaster. The most common disk array technology is RAID (Redundant Array of Independent Disks). RAID utilizes disk arrays in a number of optional configurations that benefit the user.
One advantage of RAID disk arrays is redundancy of data writes so that if a file is damaged or stored in a bad cluster or disk, it can be instantly and transparently replaced from another disk in the array. RAID also allows hot-swapping of bad disks and increased flexibility in scalable storage. Performance is also enhanced through a process called "striping."
There are many varieties of RAID, and though designed primarily for servers, disk arrays have become increasingly popular among individuals because of their many benefits. RAID is particularly suited for gamers and multimedia applications.
What are Disk Arrays

RAID controllers, built into motherboards, must set parameters for interacting with disk arrays. The controller sets the performance parameter to match the slowest disk. If it were to use the fastest disk as the benchmark, data would be lost when written to disks that cannot support that speed. For this reason, all disks in the array should be the same brand, speed, size and model for optimal performance. A mix of capacities, speeds and types of disks will negatively impact performance. The best drives for disk arrays are SATA (Serial ATA) RAID drives. These drives are optimized for RAID use and, being SATA, are hot-swappable.
Using disk arrays can provide peace of mind while improving data security and performance. Motherboards with built-in RAID controllers support certain types of RAID. For example, an older or inexpensive motherboard might only support RAID 0 and RAID 1, while a newer or more expensive board might support RAID 1 through RAID 5. Be sure to get a motherboard or third party RAID controller that supports the RAID configuration you require for your disk array.

10 essential tricks for admins

The best systems administrators are set apart by their efficiency. And if an efficient systems administrator can do a task in 10 minutes that would take another mortal two hours to complete, then the efficient systems administrator should be rewarded (paid more) because the company is saving time, and time is money, right?
The trick is to prove your efficiency to management. While I won't attempt to cover that trick in this article, I will give you 10 essential tricks from the Blogforadmin's bag of tricks. These tips will save you time,and even if you don't get paid more money to be more efficient, you'll at least have more time to play ...hureeeyyyyyy! ! ! .5G8BAJQHJAR4
The newbie states that when he pushes the Eject button on the DVD drive of a server running a certain Redmond-based operating system, it will eject immediately. He then complains that, in most enterprise Linux servers, if a process is running in that directory, then the ejection won't happen. For too long as a Linux administrator, I would reboot the machine and get my disk on the bounce if I couldn't figure out what was running and why it wouldn't release the DVD drive. But this is ineffective.
Here's how you find the process that holds your DVD drive and eject it to your heart's content: First, simulate it. Stick a disk in your DVD drive, open up a terminal, and mount the DVD drive:
# mount /media/cdrom
# cd /media/cdrom# while [ 1 ]; do echo "All your drives are belong to us!"; sleep 30; done

Now open up a second terminal and try to eject the DVD drive:
# eject
You'll get a message like:
umount: /media/cdrom: device is busy
Before you free it, let's find out who is using it.
# fuser /media/cdrom
You see the process was running and, indeed, it is our fault we can not eject the disk.
Now, if you are root, you can exercise your godlike powers and kill processes:
# fuser -k /media/cdrom
Boom! Just like that, freedom. Now solemnly unmount the drive:
# eject
fuser is good.
Try this:
# cat /bin/cat
Behold! Your terminal looks like garbage. Everything you type looks like you're looking into the Matrix. What do you do?
You type reset. But wait you say, typing reset is too close to typing reboot or shutdown. Your palms start to sweat—especially if you are doing this on a production machine.
Rest assured: You can do it with the confidence that no machine will be rebooted. Go ahead, do it:
# reset
Now your screen is back to normal. This is much better than closing the window and then logging in again, especially if you just went through five machines to SSH to this machine.
David, the high-maintenance user from product engineering, calls: "I need you to help me understand why I can't compile supercode.c on these new machines you deployed."
"Fine," you say. "What machine are you on?"
David responds: " Posh." (Yes, this fictional company has named its five production servers in honor of the Spice Girls.) OK, you say. You exercise your godlike root powers and on another machine become David:
# su - david
Then you go over to posh:
# ssh posh
Once you are there, you run:
# screen -S foo
Then you holler at David:
"Hey David, run the following command on your terminal: # screen -x foo."
This will cause your and David's sessions to be joined together in the holy Linux shell. You can type or he can type, but you'll both see what the other is doing. This saves you from walking to the other floor and lets you both have equal control. The benefit is that David can watch your troubleshooting skills and see exactly how you solve problems.
At last you both see what the problem is: David's compile script hard-coded an old directory that does not exist on this new server. You mount it, recompile, solve the problem, and David goes back to work. You then go back to whatever lazy activity you were doing before.
The one caveat to this trick is that you both need to be logged in as the same user. Other cool things you can do with the screencommand include having multiple windows and split screens. Read the man pages for more on that.
But I'll give you one last tip while you're in your screen session. To detach from it and leave it open, type: Ctrl-A D . (I mean, hold down the Ctrl key and strike the A key. Then push the D key.)
You can then reattach by running the screen -x foo command again.
You forgot your root password. Nice work. Now you'll just have to reinstall the entire machine. Sadly enough, I've seen more than a few people do this. But it's surprisingly easy to get on the machine and change the password. This doesn't work in all cases (like if you made a GRUB password and forgot that too), but here's how you do it in a normal case with a Cent OS Linux example.
First reboot the system. When it reboots you'll come to the GRUB screen as shown in Figure 1. Move the arrow key so that you stay on this screen instead of proceeding all the way to a normal boot.

Figure 1. GRUB screen after reboot
Getting back the root password 
Figure 2. Ready to edit the kernel line
Getting back the root password 
Figure 3. Append the argument with the number 1
Getting back the root password 
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully

Figure 4. Poking a hole in the firewall
Poking a hole in the firewall 
Here's how to proceed:
  1. Check that what you're doing is allowed, but make sure you ask the right people. Most people will cringe that you're opening the firewall, but what they don't understand is that it is completely encrypted. Furthermore, someone would need to hack your outside machine before getting into your company. Instead, you may belong to the school of "ask-for-forgiveness-instead-of-permission." Either way, use your judgment and don't blame me if this doesn't go your way.
  2. SSH from ginger to blackbox.example.com with the -R flag. I'll assume that you're the root user on ginger and that tech will need the root user ID to help you with the system. With the -R flag, you'll forward instructions of port 2222 on blackbox to port 22 on ginger. This is how you set up an SSH tunnel. Note that only SSH traffic can come into ginger: You're not putting ginger out on the Internet naked.
    You can do this with the following syntax:
    ~# ssh -R 2222:localhost:22 thedude@blackbox.example.com
    Once you are into blackbox, you just need to stay logged in. I usually enter a command like:
    thedude@blackbox:~$ while [ 1 ]; do date; sleep 300; done
    to keep the machine busy. And minimize the window.
  3. Now instruct your friends at tech to SSH as thedude into blackbox without using any special SSH flags. You'll have to give them your password:
    root@tech:~# ssh thedude@blackbox.example.com .
  4. Once tech is on the blackbox, they can SSH to ginger using the following command:
    thedude@blackbox:~$: ssh -p 2222 root@localhost
  5. Tech will then be prompted for a password. They should enter the root password of ginger.
  6. Now you and support from tech can work together and solve the problem. You may even want to use screen together! (See Trick 4.)
Trick 6: Remote VNC session through an SSH tunnel
  1. VNC or virtual network computing has been around a long time. I typically find myself needing to use it when the remote server has some type of graphical program that is only available on that server.
    For example, suppose in Trick 5, ginger is a storage server. Many storage devices come with a GUI program to manage the storage controllers. Often these GUI management tools need a direct connection to the storage through a network that is at times kept in a private subnet. Therefore, the only way to access this GUI is to do it from ginger.
    You can try SSH'ing to ginger with the -X option and launch it that way, but many times the bandwidth required is too much and you'll get frustrated waiting. VNC is a much more network-friendly tool and is readily available for nearly all operating systems.
    Let's assume that the setup is the same as in Trick 5, but you want tech to be able to get VNC access instead of SSH. In this case, you'll do something similar but forward VNC ports instead. Here's what you do:
    1. Start a VNC server session on ginger. This is done by running something like:
      root@ginger:~# vncserver -geometry 1024x768 -depth 24 :99
      The options tell the VNC server to start up with a resolution of 1024x768 and a pixel depth of 24 bits per pixel. If you are using a really slow connection setting, 8 may be a better option. Using :99 specifies the port the VNC server will be accessible from. The VNC protocol starts at 5900 so specifying :99 means the server is accessible from port 5999.
      When you start the session, you'll be asked to specify a password. The user ID will be the same user that you launched the VNC server from. (In our case, this is root.)
    2. SSH from ginger to blackbox.example.com forwarding the port 5999 on blackbox to ginger. This is done from ginger by running the command:
      root@ginger:~# ssh -R 5999:localhost:5999 thedude@blackbox.example.com
      Once you run this command, you'll need to keep this SSH session open in order to keep the port forwarded to ginger. At this point if you were on blackbox, you could now access the VNC session on ginger by just running:
      thedude@blackbox:~$ vncviewer localhost:99
      That would forward the port through SSH to ginger. But we're interested in letting tech get VNC access to ginger. To accomplish this, you'll need another tunnel.
    3. From tech, you open a tunnel via SSH to forward your port 5999 to port 5999 on blackbox. This would be done by running:
      root@tech:~# ssh -L 5999:localhost:5999 thedude@blackbox.example.com
      This time the SSH flag we used was -L, which instead of pushing 5999 to blackbox, pulled from it. Once you are in on blackbox, you'll need to leave this session open. Now you're ready to VNC from tech!
    4. From tech, VNC to ginger by running the command:
      root@tech:~# vncviewer localhost:99 .
      Tech will now have a VNC session directly to ginger.
    While the effort might seem like a bit much to set up, it beats flying across the country to fix the storage arrays. Also, if you practice this a few times, it becomes quite easy.
    Let me add a trick to this trick: If tech was running the Windows® operating system and didn't have a command-line SSH client, then tech can run Putty. Putty can be set to forward SSH ports by looking in the options in the sidebar. If the port were 5902 instead of our example of 5999, then you would enter something like in Figure 5.

Figure 5. Putty can forward SSH ports for tunneling
Putty can forward SSH ports for tunneling 
If this were set up, then tech could VNC to localhost:2 just as if tech were running the Linux operating system.
Imagine this: Company A has a storage server named ginger and it is being NFS-mounted by a client node named beckham. Company A has decided they really want to get more bandwidth out of ginger because they have lots of nodes they want to have NFS mount ginger's shared filesystem.
The most common and cheapest way to do this is to bond two Gigabit ethernet NICs together. This is cheapest because usually you have an extra on-board NIC and an extra port on your switch somewhere.
So they do this. But now the question is: How much bandwidth do they really have?
Gigabit Ethernet has a theoretical limit of 128MBps. Where does that number come from? Well,
1Gb = 1024Mb1024Mb/8 = 128MB; "b" = "bits," "B" = "bytes"
But what is it that we actually see, and what is a good way to measure it? One tool I suggest is iperf. You can grab iperf like this:
# wget http://dast.nlanr.net/Projects/Iperf2.0/iperf-2.0.2.tar.gz
You'll need to install it on a shared filesystem that both ginger and beckham can see. or compile and install on both nodes. I'll compile it in the home directory of the bob user that is viewable on both nodes:
tar zxvf iperf*gz
cd iperf-2.0.2
./configure -prefix=/home/bob/perf
make install
On ginger, run:
# /home/bob/perf/bin/iperf -s -f M
This machine will act as the server and print out performance speeds in MBps.
On the beckham node, run:
# /home/bob/perf/bin/iperf -c ginger -P 4 -f M -w 256k -t 60
You'll see output in both screens telling you what the speed is. On a normal server with a Gigabit Ethernet adapter, you will probably see about 112MBps. This is normal as bandwidth is lost in the TCP stack and physical cables. By connecting two servers back-to-back, each with two bonded Ethernet cards, I got about 220MBps.
In reality, what you see with NFS on bonded networks is around 150-160MBps. Still, this gives you a good indication that your bandwidth is going to be about what you'd expect. If you see something much less, then you should check for a problem.
I recently ran into a case in which the bonding driver was used to bond two NICs that used different drivers. The performance was extremely poor, leading to about 20MBps in bandwidth, less than they would have gotten had they not bonded the Ethernet cards together!
A Linux systems administrator becomes more efficient by using command-line scripting with authority. This includes crafting loops and knowing how to parse data using utilities like awkgrep, and sed. There are many cases where doing so takes fewer keystrokes and lessens the likelihood of user errors.
For example, suppose you need to generate a new /etc/hosts file for a Linux cluster that you are about to install. The long way would be to add IP addresses in vi or your favorite text editor. However, it can be done by taking the already existing /etc/hosts file and appending the following to it by running this on the command line:
# P=1; for i in $(seq -w 200); do echo "192.168.99.$P n$i"; P=$(expr $P + 1);
done >>/etc/hosts
Two hundred host names, n001 through n200, will then be created with IP addresses through Populating a file like this by hand runs the risk of inadvertently creating duplicate IP addresses or host names, so this is a good example of using the built-in command line to eliminate user errors. Please note that this is done in the bash shell, the default in most Linux distributions.
As another example, let's suppose you want to check that the memory size is the same in each of the compute nodes in the Linux cluster. In most cases of this sort, having a distributed or parallel shell would be the best practice, but for the sake of illustration, here's a way to do this using SSH.
Assume the SSH is set up to authenticate without a password. Then run:
# for num in $(seq -w 200); do ssh n$num free -tm | grep Mem | awk '{print $2}';
done | sort | uniq
A command line like this looks pretty terse. (It can be worse if you put regular expressions in it.) Let's pick it apart and uncover the mystery.
First you're doing a loop through 001-200. This padding with 0s in the front is done with the -w option to the seq command. Then you substitute the num variable to create the host you're going to SSH to. Once you have the target host, give the command to it. In this case, it's:
free -m | grep Mem | awk '{print $2}'
That command says to:
  • Use the free command to get the memory size in megabytes.
  • Take the output of that command and use grep to get the line that has the string Mem in it.
  • Take that line and use awk to print the second field, which is the total memory in the node.
This operation is performed on every node.
Once you have performed the command on every node, the entire output of all 200 nodes is piped (|d) to the sort command so that all the memory values are sorted.
Finally, you eliminate duplicates with the uniq command. This command will result in one of the following cases:
  • If all the nodes, n001-n200, have the same memory size, then only one number will be displayed. This is the size of memory as seen by each operating system.
  • If node memory size is different, you will see several memory size values.
  • Finally, if the SSH failed on a certain node, then you may see some error messages.
This command isn't perfect. If you find that a value of memory is different than what you expect, you won't know on which node it was or how many nodes there were. Another command may need to be issued for that.
What this trick does give you, though, is a fast way to check for something and quickly learn if something is wrong. This is it's real value: Speed to do a quick-and-dirty check.
Some software prints error messages to the console that may not necessarily show up on your SSH session. Using the vcs devices can let you examine these. From within an SSH session, run the following command on a remote server: # cat /dev/vcs1. This will show you what is on the first console. You can also look at the other virtual terminals using 2, 3, etc. If a user is typing on the remote system, you'll be able to see what he typed.
In most data farms, using a remote terminal server, KVM, or even Serial Over LAN is the best way to view this information; it also provides the additional benefit of out-of-band viewing capabilities. Using the vcs device provides a fast in-band method that may be able to save you some time from going to the machine room and looking at the console.
In Trick 8, you saw an example of using the command line to get information about the total memory in the system. In this trick, I'll offer up a few other methods to collect important information from the system you may need to verify, troubleshoot, or give to remote support.
First, let's gather information about the processor. This is easily done as follows:
# cat /proc/cpuinfo .
This command gives you information on the processor speed, quantity, and model. Using grep in many cases can give you the desired value.
A check that I do quite often is to ascertain the quantity of processors on the system. So, if I have purchased a dual processor quad-core server, I can run:
# cat /proc/cpuinfo | grep processor | wc -l .
I would then expect to see 8 as the value. If I don't, I call up the vendor and tell them to send me another processor.
Another piece of information I may require is disk information. This can be gotten with the df command. I usually add the -h flag so that I can see the output in gigabytes or megabytes. # df -h also shows how the disk was partitioned.
And to end the list, here's a way to look at the firmware of your system—a method to get the BIOS level and the firmware on the NIC.
To check the BIOS version, you can run the dmidecode command. Unfortunately, you can't easily grep for the information, so piping it is a less efficient way to do this. On my Lenovo T61 laptop, the output looks like this:
#dmidecode | less
BIOS Information
Vendor: LENOVO
Version: 7LET52WW (1.22 )
Release Date: 08/27/2007

This is much more efficient than rebooting your machine and looking at the POST output.
To examine the driver and firmware versions of your Ethernet adapter, run ethtool:
# ethtool -i eth0
driver: e1000
version: 7.3.20-k2-NAPI
firmware-version: 0.3-0