Thursday, 12 February 2015

How to Create Formatted HTML Output from Scripts

Use Below scripts convert in HTML format and send to mail in singal command :-

top -b -n 1 | /tmp/healthcheckreport.sh | mail -s "Server load" -a "Content-Type: text/html" mail@gmail.com

 
The default formatting results in messages that look something like this.




The HTML for that email message was created by piping the output from one command into the ConvertTo-HTML cmdlet. Fortunately ConvertTo-HTML has the -Head parameter that can be used to add style information to the HTML that it generates.

For example, by adding this line to the script used in the last article we can change the font to something a little nicer to look at.
 
$style = "< style>BODY{font:arial 10pt;}< /style>"

Note: extra spaces have been added to the style tags so that WordPress does not remove them.
Then modify the ConvertTo-HTML cmdlet to add the -Head parameter.
 
$message.Body = Get-ExchangeServer | Select-Object Name,ServerRole | ConvertTo-Html -Head $style

This time when the script is run the email looks like this instead.



That is a little better, but we can do a lot more. How about we add some more styles to the table and really make it look nice.
 
$style = "< style>BODY{font-family: Arial; font-size: 10pt;}"
$style = $style + "TABLE{border: 1px solid black; border-collapse: collapse;}"
$style = $style + "TH{border: 1px solid black; background: #dddddd; padding: 5px; }"
$style = $style + "TD{border: 1px solid black; padding: 5px; }"
$style = $style + "< /style>"

Again note that extra spaces were added to the style tags above to preserve them in WordPress.

Now the script produces an email that looks like this.



Although this requires you to know a little bit about how HTML styles work, it is a pretty easy topic to learn and once you get a few working styles in your scripting tool kit you can just use them over and over again.



Thursday, 5 February 2015

SAN storage




Oracle's SAN storage solutions are built for the most stringent enterprise-grade requirement and will help your company increase data role as a strategic asset. The Oracle FS1 Flash Storage System scales to petabytes of all-flash capacity while delivering a multitude of innovations designed to take flash technology to new extremes. Users of Oracle Applications including Oracle People-Soft, Oracle E-Business Suite and more can now benefit from one-click application storage provisioning which simplifies deployment and automates complex manual tuning and administration. Users also benefit from QoS Plus software, the most intelligent management framework in the industry, delivering adaptive and anticipatory storage resources with rapid learning and highly granular data tiering. QoS Plus aligns business priorities with data usage across four tiers of storage media, adapting performance optimization at the lowest cost metric. Built on Oracle’s five generations of flash expertise and innovations such as Oracle Exa-data and the first flash-aware database, Oracle Database, the Oracle FS1 Flash Storage System is co-engineered with Oracle servers, operating systems, applications and databases for maximum operational efficiency. Unlike most competitors’ all-flash arrays, the Oracle FS1 provides enterprises the option to exploit the economics of hard disk without impacting the predictable performance expected from an all-flash array.

Virtual Box oracle

Oracle VM VirtualBox

The latest release is version 4.3.20.



Download link:-

http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html



Why is virtualization useful?

The techniques and features that Virtual-Box provides are useful for several scenarios:

 Running multiple operating systems simultaneously
 Virtual-Box allows you to run more than one operating system at a time. This way, you can run software written for one operating system on another (for example, Windows software on Linux or a Mac) without having to reboot to use it. Since you can configure what kinds of “virtual” hardware should be presented to each such operating system, you can install an old operating system such
as DOS or OS/2 even if your real computer’s hardware is no longer supported by that operating system.

Easier software installations
 Software vendors can use virtual machines to ship entire software configurations. For example, installing a complete mail server solution on a real machine can be a tedious task. With Virtual-Box, such a complex setup (then often called an “appliance”) can be packed into a virtual machine. Installing and running a mail server becomes as easy as importing such an appliance into Virtual-Box.

Testing and disaster recovery
Once installed, a virtual machine and its virtual hard disks can be considered a “container” that can be arbitrarily frozen, woken up, copied, backed up, and transported between hosts.
On top of that, with the use of another Virtual-Box feature called “snapshots”, one can save
a particular state of a virtual machine and revert back to that state, if necessary. This way,
one can freely experiment with a computing environment. If something goes wrong (e.g.
after installing misbehaving software or infecting the guest with a virus), one can easily
switch back to a previous snapshot and avoid the need of frequent backups and restores.
Any number of snapshots can be created, allowing you to travel back and forward in virtual
machine time. You can delete snapshots while a VM is running to reclaim disk space.

Infrastructure consolidation
 Virtualization can significantly reduce hardware and electricity costs. Most of the time, computers today only use a fraction of their potential power and run with low average system loads. A lot of hardware resources as well as electricity is thereby wasted. So, instead of running many such physical computers that are only partially used, one can pack many virtual machines onto a few powerful hosts and balance the loads between them.


How to Install Oracle Virtual Box

As installation of VirtualBox varies depending on your host operating system, we provide installation
instructions in four separate chapters for Windows, Mac OS X, Linux and Solaris, respectively.

Installing on Windows hosts
 

Prerequisites

 Performing the installation
The VirtualBox installation can be started either by double-clicking on its executable file (contains both 32- and 64-bit architectures) or by entering VirtualBox.exe -extract on the command line. This will extract both installers into a temporary directory in which you’ll then find the usual .MSI files. Then you can do a msiexec /i VirtualBox-<version>-MultiArch_<x86|amd64>.msi
to perform the installation.

In either case, this will display the installation welcome dialog and allow you to choose where
to install VirtualBox to and which components to install. In addition to the VirtualBox application,
the following components are available:

USB support This package contains special drivers for your Windows host that VirtualBox requires
to fully support USB devices inside your virtual machines.
Networking This package contains extra networking drivers for your Windows host that
VirtualBox needs to support Bridged Networking (to make your VM’s virtual network cards
accessible from other machines on your physical network).


Depending on your Windows configuration, you may see warnings about “unsigned drivers” or
similar. Please select “Continue” on these warnings as otherwise VirtualBox might not function
correctly after installation.

Installation details
The installer will create a “VirtualBox” group in the Windows “Start” menu which allows you
to launch the application and access its documentation.
With standard settings, VirtualBox will be installed for all users on the local system. In case
this is not wanted, you have to invoke the installer by first extracting it by using

VirtualBox.exe -extract and then do as follows:
VirtualBox.exe -msiparams ALLUSERS=2

or
msiexec /i VirtualBox-<version>-MultiArch_<x86|amd64>.msi ALLUSERS=2
on the extracted .MSI files. This will install VirtualBox only for the current user.
If you do not want to install all features of VirtualBox, you can set the optional ADDLOCAL
parameter to explicitly name the features to be installed.
The following features are available:

VBoxApplication Main binaries of VirtualBox.

Note: This feature must not be absent since it contains the minimum set of files to have  working VirtualBox installation.

VBoxUSB USB support.
VBoxNetwork All networking support; includes the VBoxNetworkFlt and VBoxNetworkAdp features
(see below).
VBoxNetworkFlt Bridged networking support.
VBoxNetworkAdp Host-only networking support.
VBoxPython Python support.

For example, to only install USB support along with the main binaries, do a: VirtualBox.exe -msiparams ADDLOCAL=VBoxApplication,VBoxUSB

or
msiexec /i VirtualBox-<version>-MultiArch_<x86|amd64>.msi ADDLOCAL=VBoxApplication,VBoxUSB

 Uninstallation
As VirtualBox uses the standard Microsoft Windows installer, VirtualBox can be safely uninstalled
at any time by choosing the program entry in the “Add/Remove Programs” applet in theWindows
Control Panel.