Force Mounting VMFS Datastore in ESXi 5.0


We had an issue last week that in our vSphere cluster (6 ESXi 5.0 hosts, 3 datastores), two hosts can not see one of the datastores. The issue was caused by that a guy in my team did not follow the proper LUN operation procedure. I tried to add the storage back in the vSphere … Continue reading Force Mounting VMFS Datastore in ESXi 5.0 →

Batch Script: Send Email


sendmail is a handy tool that can be used in batch script to send email. 1) Configure your SMTP settings in the sendmail.ini file. Following is a sample to use Gmail: [sendmail]; you must change mail.mydomain.com to your smtp server,smtp_server=smtp.gmail.com ; smtp port (normally 25)smtp_port=465 ; error logerror_logfile=mail_error_log.txt ; Gmail username and passwordauth_username=xxxxxx@gmail.comauth_password=*********** ; the … Continue reading Batch Script: Send Email →

Perl: Read Excel Cell Value


A sample code to read excel cell value by using Spreadsheet::ParseExcel module. #!/user/bin/perl -w use strict;use Spreadsheet::ParseExcel;#Parse excel filemy $parser = Spreadsheet::ParseExcel->new();my $workbook = $parser->parse("test.xls"); #Get cell value from excel sheet1 row 1 column 2my $worksheet = $workbook->worksheet('sheet1');my $cell = $worksheet->get_cell(1,2); # Print the cell value when not blankif ( defined $cell and $cell->value() ne … Continue reading Perl: Read Excel Cell Value →