Ubuntu iTOps Tube

advertisement center

Sunday, February 19, 2012

10 Tips to Use Your Hardware and Software Vendor Support Effectively




Companies purchase support for most of their enterprise hardwares (servers, switches, routers, firewalls etc.,) and softwares (databases, OS, applications, frameworks etc.,). They spend lot of cash on support mainly for two reasons: 1) To get help from vendors to fix critical production issues 2) To keep up-to-date with the latest version of the software and security patches released by the vendors. In this article, I’ve given 10 practical tips for DBAs, sysadmins and developers to use their hardware and software support effectively.

1. Use the Knowledge Base

Most vendors have dedicated support website including a separate knowledge base section with lot of white papers, best practice documents, troubleshooting tips and tricks. Use the knowledge base section of support website to learn and expand your knowledge. Most of the time, the best possible solution to solve a specific problem can be found from the knowledge base or forum of your vendor support website. For example, when you have an issue setting up Automatic Storage Management during Oracle 11g installation, Oracle’s support website metalink, will give you appropriate solution than searching Google.


2. Use support website to create ticket

Instead of calling the support over phone, use their website to create a ticket. It is not easy to explain complex technical issue in detail to the support person over phone. Even when you take time to explain the issue in detail over phone, they may still miss lot of details or write the issue description little differently. This will cause unnecessary delay, as you’ve to explain the problem again to the support engineer who will be assigned to the ticket. If you create the ticket yourself from their website, you can upload all the supporting materials and copy/paste the error message. After you create a ticket from their website, call the support to follow-up and make sure an engineer is getting assigned to it immediately. If they don’t have a support website, ask them whether you can create a ticket by sending an email.


3. Explain the issue in detail

Provide as much as information possible in the ticket description. Don’t assume that the support engineer will understand the issue just by looking at the error message you’ve provided. Providing as much as information upfront in the ticket will help you avoid lot of wasted time going back and forth explaining the issues in detail to the support. Provide a clear step-by-step instructions on how to reproduce the issue.


4. Do some research and debugging before submitting the ticket

Before creating a ticket, perform some basic debugging to eliminate some of the common issues. Attach related log files and debugging output to the ticket. If you’ve worked with your vendor before, you’ll have a good idea of all the basic log files and testing they may ask you to perform. Don’t wait for them to ask the same thing again. Go-ahead and do those basic testing yourself and attach all the log files to the ticket.


5. Don’t waste time with first level of support

Dealing with first level of support is waste of time for complex issues. If you’ve done #2, #3 and #4 mentioned above properly, call the support and demand them to escalate it to the second level of support. If they don’t respond properly, escalate the issue through vendor’s account manager assigned to your company.


6. Use support for your research project

Don’t just call support only for production issues. Call them even for your research project. For example, if you are performing a prototype of a new software that was released by your vendor, call the support to get their help when you get stuck. When you are testing their new bleeding edge software, that was released recently, most of the vendors will even assign a dedicated resource to help you resolve the issue, as they want to fix all the issues in their new software as soon as posible.


7. Setup your support profile

Anytime you create a ticket, you may have to repeatedly enter some basic information related to your account and environment. Most of the support site has the ability to setup a profile with all the basic information, which you can use when you are creating a ticket. This will speed up the ticket creation process.


8. Setup support access for admins

Make sure all your DBAs, sysadmins and senior developers have access to the support website. If you are the only person who has access to support website, identify another backup resource for you and make sure they know how to access the support website to create a ticket, when you are not available. Also, create a separate support-access document with vendors support telephone number,  your account number, support website URL and put it in a shared area where all admins can access it.


9. Subscribe to security alert


It is very important for DBAs, sysadmins, and senior developers to subscribe to the security alerts from the support website. If there are any critical security updates that affects your hardware and software, it should be immediately tested on test environment and moved to production.  I have seen admins who receive the security alerts, but don’t read those emails consistently. It is very important to act on security alerts from your vendors immediately.

10. Get official documentation and diagnostics tools



Use support to get official documentation for your hardware and software. Call your vendor support and ask for diagnostics tools and best practice documents for maintaining your hardware and software. Most of us hate to read documentation. But experienced developers and admins understand that reading official documentation of hardware and software will give them in-depth understanding about the product.

Do you use support from your hardware and software vendors? If you have any tips, please leave a comment.


Firefox Add-On: Hire 7 Personal Bodyguards to Browse Internet Securely



We see celebrities, politicians and famous people cruise around with bodyguards to protect themselves and their possessions from various threats. While most of us cannot afford such kind of protection when we cruise the streets, we can at least have that kind of protection when we cruise the internet. I have provided list of 7 powerful Firefox add-ons with screenshots that will protect you from the dangerous unknowns of the internet.

1.  NoScript


Using NoScript add-on, you can allow JavaScript, Java, Flash and other plugins to be executed only by a website that you trust.  Click on the NoScript icon from the browser status bar to add a website to your trusted list. NoScript also provides protection from cross-site scripting (XSS).

When you view a website that is not added to NoScript trusted website, it displays a status bar at the bottom as shown below. In this example, it shows 3 scripts were allowed out of 8 scripts in the website that you are currently viewing.

Fig - NoScript status bar displayed at browser bottom


You can allow all or selective scripts from a website by clicking on the NoScript icon in the status bar as shown below.




Fig - Display NoScript menu by clicking on “S” icon on status bar


From the NoScript options menu, specify whether you want to block Java, Flash, Silverlight or IFRAME as shown below.


Fig - NoScript Configuration Options


2. WOT (Web Of Trust)


The concept behind WOT is good. Before you click on a link, WOT will give you an idea about the site by displaying colored ring icon next to the link – green to go, yellow for caution and red to stop – helping you avoid dangerous sites. If the colored ring next to the link is confusing, an option to enable color blind accessible version is available from WOT menu.

In the example below, it displays the WOT ring icon next to the link. Moving mouse over the ring icon displays the WOT rating in four different categories – Trustworthiness, Vendor reliability, Privacy and Child Safety. The ratings of different sites relies on the user input. If you choose to contribute to the rating, you can create an account at myWOT to rate different sites yourself.  Since the rating is driven by user input, the quality of the rating depends on more user involvement. According to mywot.com, they currently have ratings for more than 20 million websites, with more than 1 million dangerous website in their list.

If you visit a website considered as dangerous by WOT, it will give you a nice warning message with an option to continue or exit from the website.  Also, if you don’t like the ring next to the link on search results, you can turn them off from the WOT option menu. But, you’ll still be warned when you enter a dangerous site.




Fig - Web of Trust ring icon next to a link

3. Flash Block


While browsing internet, animated flash contents can be very annoying sometimes. Flash Blockblocks all the flash contents by default. To allow flash from a trusted website, add it to the white list as shown below. When a flash is blocked on a website, it will display an icon with “F”. When you move mouse over the “F” icon, it will turn into “Play” icon, which will let you play the flash on demand. If you use NoScript, you don’t need to install flash block, as NoScript blocks flash content.


Fig - Flash Block option to add whitelist


4. LocationBar


Location Bar add-on puts emphasis only on the domain name in the address bar for any page that you are viewing. This will help you to easily spot the domain name of the website to avoid any spoofing. In the example below, mozilla.org is emphasized in the address bar. In my opinion, this should’ve been the default behavior of Firefox like Google Chrome browser.


Fig - Location Bar with domain name (mozilla.org) emphasized


Move the mouse to any part of the URL in the location bar and press <Control> + click, which will open the URL until that point in a new tab. In the example below, <Control> + click on “firefox” on the URL will open the URL until Firefox in a new tab.


Fig - Location Bar with partial URL highlighted for opening


5. InterClue


Using InterClue you can view the content of a website from the link without opening the website. Just move the mouse over the icon that is displayed next to the link, which will open a pop-up to display the content of the website and some other vital statistics of the website as shown below.  I prefer InterClue over other preview website add-ons, as InterClue strips down unnecessary formatting of the target website and displays the content in a very nice readable format.



Fig – InterClue pop-up window showing NagiosExchange website

From the InterClue option menu, you can configure the link to open only when you click on the icon. I really like this feature, as I don’t like pop-up automatically show up when you accidentally move the mouse over a link. InterClue has lot of options for you to play around and tweak it as shown below.


Fig - InterClue Advanced Options


6. Distrust


Distrust is very simple and easy to use add-on to browse the internet without leaving a trace on your laptop. Click on the eye icon in the status bar to enable secure browsing mode, where distrust will monitor Firefox for its activities. After turning off distrust, it will remove history, cache and cookies that were used during the distrust session.

Following are the different items monitored during the distress session, which can be configured from the options menu as shown below.


Fig - Distrust Options


7. KeyScrambler Personal


Hackers use Keylogging technique to monitor and capture the keystrokes you type to obtain sensitive information like your password. KeyScrambler add-on encrypts all the keystroke that you type anywhere in the browser. In the example below, as I typed ramesh in the username field, KeyScrambler encrypts it to 5-qm\0. So, if a hacker is using key-logger to monitor your keystroke, he’ll only see the encrypted keystrokes and not the original sensitive information. From the KeyScrambler options menu, you can also hide the keystroke overlay window that is displaying the encrypted keys as you type. KeyScambler Personal Firefox add-on will only encrypt the keystrokes that you type on Firefox browser and not the keystrokes that you type on different applications.


Fig - KeyScambler encrypts the username and password as you type


What Firefox add-ons do you use to browse internet securely? Please leave your comment.


Backup and Restore MySQL Database Using mysqldump



mysqldump is an effective tool to backup MySQL database. It creates a *.sql file withDROP table, CREATE table and INSERT intosql-statements of the source database. To restore the database,  execute the *.sql file on destination database.  For MyISAM, use mysqlhotcopy method that we explained earlier, as it is faster for MyISAM tables.

Using mysqldump, you can backup a local database and restore it on a remote database at the same time, using a single command. In this article, let us review several practical examples on how to use mysqldump to backup and restore.

For the impatient, here is the quick snippet of how backup and restore MySQL database using mysqldump:


backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql

How To Backup MySQL database

1. Backup a single database:

This example takes a backup of sugarcrm database and dumps the output to sugarcrm.sql

# mysqldump -u root -ptmppassword sugarcrm > sugarcrm.sql
# mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql


The sugarcrm.sql will contain drop table, create table and insert command for all the tables in the sugarcrm database. Following is a partial output of sugarcrm.sql, showing the dump information of accounts_contacts table:

-- Table structure for table `accounts_contacts`
DROP TABLE IF EXISTS `accounts_contacts`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `accounts_contacts` (
`id` varchar(36) NOT NULL,
`contact_id` varchar(36) default NULL,
`account_id` varchar(36) default NULL,
`date_modified` datetime default NULL,
`deleted` tinyint(1) NOT NULL default '0',
PRIMARY KEY  (`id`),
KEY `idx_account_contact` (`account_id`,`contact_id`),
KEY `idx_contid_del_accid` (`contact_id`,`deleted`,`account_id`)
SET character_set_client = @saved_cs_client;
-- Dumping data for table `accounts_contacts`
LOCK TABLES `accounts_contacts` WRITE;
/*!40000 ALTER TABLE `accounts_contacts` DISABLE KEYS */;
INSERT INTO `accounts_contacts` VALUES ('6ff90374-26d1-5fd8-b844-4873b2e42091',
'2008-07-23 05:24:30',1),
'80a6add6-81ed-0266-6db5-4873bc54bfb5','2008-07-23 05:24:30',1),
'27060688-1f44-9f10-bdc4-48751db40009','2008-07-23 05:24:30',1),
'c71eff65-b76b-cbb0-d31a-487be06e4e0b','2008-07-23 05:24:30',1),
'7b886f23-571b-595b-19dd-487ce1eee867','2008-07-23 05:24:30',1);
/*!40000 ALTER TABLE `accounts_contacts` ENABLE KEYS */;


2. Backup multiple databases:

If you want to backup multiple databases, first identify the databases that you want to backup using the show databases as shown below:

# mysql -u root -ptmppassword
mysql> show databases;
| Database           |
| information_schema |
| bugs               |
| mysql              |
| sugarcr            |
4 rows in set (0.00 sec)


For example, if you want to take backup of both sugarcrm and bugs database, execute the mysqldump as shown below:

# mysqldump -u root -ptmppassword --databases bugs sugarcrm > bugs_sugarcrm.sql

Verify the bugs_sugarcrm.sql dumpfile contains both the database backup.

# grep -i "Current database:" /tmp/bugs_sugarcrm.sql

-- Current Database: `mysql`

-- Current Database: `sugarcrm`


3. Backup all the databases:

The following example takes a backup of  all the database of the MySQL instance.

# mysqldump -u root -ptmppassword --all-databases > /tmp/all-database.sql


4. Backup a specific table:

In this example, we backup only the accounts_contacts table from sugarcrm database.

# mysqldump -u root -ptmppassword sugarcrm accounts_contacts \

      > /tmp/sugarcrm_accounts_contacts.sql


4. Different mysqldump group options:

§  –opt is a group option, which is same as –add-drop-table, –add-locks, –create-options, –quick, –extended-insert, –lock-tables, –set-charset, and –disable-keys. opt is enabled by default, disable with –skip-opt.

§  –compact is a group option, which gives less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options –skip-add-drop-table –no-set-names –skip-disable-keys –skip-add-locks

How To Restore MySQL database


1. Restore a database

In this example, to restore the sugarcrm database, execute mysql with < as shown below. When you are restoring the dumpfilename.sql on a remote database, make sure to create the sugarcrm database before you can perform the restore.

# mysql -u root -ptmppassword


mysql> create database sugarcrm;

Query OK, 1 row affected (0.02 sec)


# mysql -u root -ptmppassword sugarcrm < /tmp/sugarcrm.sql


# mysql -u root -p[root_password] [database_name] < dumpfilename.sql


2. Backup a local database and restore to remote server using single command:

This is a sleek option, if you want to keep a read-only database on the remote-server, which is a copy of the master database on local-server. The example below will backup the sugarcrm database on the local-server and restore it as sugarcrm1 database on the remote-server. Please note that you should first create the sugarcrm1 database on the remote-server before executing the following command.

[local-server]# mysqldump -u root -ptmppassword sugarcrm | mysql \

                 -u root -ptmppassword --host=remote-server -C sugarcrm1

[Note: There are two -- (hyphen) in front of host]


How To Install Perl Modules Manually and Using CPAN command



Installing Perl modules required by various open source software is a routine tasks for sysadmins. Installing Perl modules manuallyby resolving all the dependencies is  tedious and annoying process.

Installing Perl modules using CPAN is a better solution, as it resolves all the dependencies automatically. In this article, let us review how to install Perl modules on Linux using both manual and CPAN method.

When a Perl module is not installed, application will display the following error message. In this example, XML::Parser Perl module is missing.

Can't locate XML/parser.pm in @INC (@INC contains:
/usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/site_perl/5.10.0 .)


Install Perl Modules Manually

Download Perl module

Go to CPAN Search website and search for the module that you wish to download. In this example, let us search, download and install XML::Parser Perl module. I have downloaded the XML-Parser-2.36.tar.gz to /home/download

# cd /home/download
# gzip -d XML-Parser-2.36.tar.gz
# tar xvf XML-Parser-2.36.tar
# cd XML-Parser-2.36

Build the perl module

# perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for XML::Parser::Expat
Writing Makefile for XML::Parser
# make
# make test

Install the perl module

# make install

This is very simple for one module with no dependencies. Typically, Perl modules will be dependent on several other modules. Chasing all these dependencies one-by-one can be very painful and annoying task. I recommend the CPAN method of installation as shown below. Use the manual method only if the server is not connected to the Internet.


Install Perl Modules using CPAN automatically

Verify whether CPAN is already installed

To install Perl modules using CPAN, make sure the cpan command is working. You should have the CPAN perl module installed before you can install any other Perl modules using CPAN. In this example, CPAN module is not installed.

# cpan
-bash: cpan: command not found
# perl -MCPAN -e shell
Can't locate CPAN.pm in @INC (@INC contains:
/usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl/5.10.0 .).
BEGIN failed--compilation aborted.


Install the CPAN module using yum

# yum install perl-CPAN

Output of yum install perl-CPAN command:

Loaded plugins: refresh-packagekit
updates-newkey                       | 2.3 kB     00:00
primary.sqlite.bz2                   | 2.4 MB     00:00
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
Transaction Summary
Install      5 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): perl-ExtUtils-ParseXS-2.18-31.fc9.i386.rpm     |  30 kB     00:00
(2/5): perl-Test-Harness-2.64-31.fc9.i386.rpm         |  70 kB     00:00
(3/5): perl-CPAN-1.9205-31.fc9.i386.rpm               | 217 kB     00:00
(4/5): perl-ExtUtils-MakeMaker-6.36-31.fc9.i386.rpm   | 284 kB     00:00
(5/5): perl-devel-5.10.0-31.fc9.i386.rpm              | 408 kB     00:00
Installing     : perl-ExtUtils-ParseXS                             [1/5]
Installing     : perl-devel                                        [2/5]
Installing     : perl-Test-Harness                                 [3/5]
Installing     : perl-ExtUtils-MakeMaker                           [4/5]
Installing     : perl-CPAN                                         [5/5]
Installed: perl-CPAN.i386 0:1.9205-31.fc9
Dependency Installed:
  perl-ExtUtils-MakeMaker.i386 0:6.36-31.fc9
  perl-ExtUtils-ParseXS.i386 1:2.18-31.fc9
  perl-Test-Harness.i386 0:2.64-31.fc9
  perl-devel.i386 4:5.10.0-31.fc9


Configure cpan the first time

The first time when you execute cpan, you should set some configuration parameters as shown below. I have shown only the important configuration parameters below. Accept all the default values by pressing enter.

Note: Make sure to execute “o conf commit” in the cpan prompt after the configuration to save the settings.

# cpan
Sorry, we have to rerun the configuration dialog for CPAN.pm due
to some missing parameters...
CPAN build and cache directory? [/root/.cpan]
Download target directory? [/root/.cpan/sources]
Directory where the build process takes place? [/root/.cpan/build]
Always commit changes to config variables to disk? [no]
Cache size for build directory (in MB)? [100]
Let the index expire after how many days? [1]
Perform cache scanning (atstart or never)? [atstart]
Cache metadata (yes/no)? [yes]
Policy on building prerequisites (follow, ask or ignore)? [ask]
Parameters for the 'perl Makefile.PL' command? []
Parameters for the 'perl Build.PL' command? []
Your ftp_proxy? []
Your http_proxy? []
Your no_proxy? []
Is it OK to try to connect to the Internet? [yes]
First, pick a nearby continent and country by typing in the number(s)
(1) Africa
(2) Asia
(3) Central America
(4) Europe
(5) North America
(6) Oceania
(7) South America
Select your continent (or several nearby continents) [] 5
(1) Bahamas
(2) Canada
(3) Mexico
(4) United States
Select your country (or several nearby countries) [] 4
(2) ftp://carroll.cac.psu.edu/pub/CPAN/
(3) ftp://cpan-du.viaverio.com/pub/CPAN/
(4) ftp://cpan-sj.viaverio.com/pub/CPAN/
(5) ftp://cpan.calvin.edu/pub/CPAN
(6) ftp://cpan.cs.utah.edu/pub/CPAN/
e.g. '1 4 5' or '7 1-4 8' [] 2-16
cpan[1]> o conf commit
commit: wrote '/usr/lib/perl5/5.10.0/CPAN/Config.pm'
cpan[2]> quit
No history written (no histfile specified).
Lockfile removed.


Install Perl Modules using CPAN

You can use one of the following method to install a Perl module using cpan.

# /usr/bin/perl -MCPAN -e 'install Email::Reply'
# cpan
cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?)
cpan[1]> install "Email::Reply";


Output of above perl install command:

CPAN: Storable loaded ok (v2.18)
Going to read /root/.cpan/Metadata
Database was generated on Mon, 15 Sep 2008 11:02:52 GMT
Running install for module 'Email::Reply'
Running make for R/RJ/RJBS/Email-Reply-1.202.tar.gz
CPAN: LWP::UserAgent loaded ok (v2.036)
CPAN: Time::HiRes loaded ok (v1.9711)
Fetching with LWP:
CPAN: checksum security checks disabled because Digest::SHA not installed.
Please consider installing the Digest::SHA module.
CPAN: Compress::Zlib loaded ok (v2.008)
CPAN: File::Temp loaded ok (v0.18)
Warning: prerequisite Email::Abstract 2.01 not found.
Warning: prerequisite Email::MIME::Creator 1.41 not found.
Writing Makefile for Email::Reply
---- Unsatisfied dependencies detected during ----
----       RJBS/Email-Reply-1.202.tar.gz      ----
Email::Abstract [requires]
Email::MIME::Creator [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
[Note: CPAN automatically detects that Email::Abstract
       and Email::MIME::Creator is required]
Fetching with LWP:
make -- OK
make install  -- OK
Fetching with LWP:
make -- OK
make install  -- OK
Warning: prerequisite Email::Simple::Creator 1.4 not found.
Writing Makefile for Email::MIME::Creator
Email::Simple::Creator [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
[Note: CPAN automatically detects that Simple::Creator is required]
Fetching with LWP:
make -- OK
make install  -- OK
Fetching with LWP:
CPAN.pm: Going to build R/RJ/RJBS/Email-Reply-1.202.tar.gz
make -- OK
make install  -- OK



In the example above, Email::Reply is dependent on the several other modules. CPAN automatically resolves the dependencies and installs Email::Reply and all the dependent Perl modules.