Oracle VM Consulting
view counter

Servers & Storage Feed

Sun Servers and Storage, Solaris, Oracle Linux, Red Hat Linux, Oracle VM for x86, Oracle VDI and Virtualization resources, news, and support articles.

Performing DNS Queries in Python

dnspython provides a detailed interface into DNS. In its simplest form, it’s possible to perform queries in only a couple of lines of code. Here’s a commented example:

import dns.resolver #import the module
myResolver = dns.resolver.Resolver() #create a new instance named 'myResolver'
myAnswers = myResolver.query("google.com", "A") #Lookup the 'A' record(s) for google.com
for rdata in myAnswers: #for each response
    print rdata #print the data

The results in my case are:

Linux – check if a remote port is open

 
By using nc(Netcat) command we can check if a port in remote machine is opened or closed.
Here is an example to check if remote port is opened or closed:

STATUS=$(nc -z you_remote_host 80 ; echo $?)

if [ $STATUS -eq 0 ]
then
echo "Port is opened"
else
echo "Port is opened"
fi

bash – get previous command status

 
To get previous command status in bash use “$?” variable.
echo $? will return zero if previous command is success & if its non zero it indicates failure.
Example:
$ ls ; echo $?
Output of the above command is list of files, directories and next line it will return number.
We can use condition for check if previous command is success or failure:

How to split an image for visual effects

Suppose that you've just taken a panorama photograph with your fancy digital camera. You can display the picture as is on your blog. Or you can be a little bit more creative. How about splitting it up into 3 rectangular pieces?

Speedup MySQL InnoDB shutdown

Depending on the size of the databases you have in mysql innodb the time it takes mysql to restart can be horribly slow (for very big innodb databases). There are some tricks that can speed this up, but the most effective one that I’ve found and use all the time in similar situations is to pre-flush the dirty pages right before shutdown; this can be done like this:

Xen Project User Summit 2014 Videos Now Available

The Year’s Biggest Xen Project User Event Now Available at Your Desk or On Your Phone

You didn’t make it to this year’s Xen Project User Summit in New York City?  Or you didn’t catch all the sessions you wanted to see because of scheduling conflicts (it happens when you have too much of a good thing…)?  Don’t fret; you can catch up on the action on a computer, tablet, or phone near you!

Brightness Controls not working on Dell Inspiron Laptop with Intel Graphics

On one of my personal laptops (Dell Inspiron 17R), my attempts at using the function key combinations to change the brightness did not yield any results on Fedora 20, Linux Mint 17, or Ubuntu 14.10. The LCD brightness was stuck at "can barely see, but must conserve battery because I'm stuck on an island mode" (not a real setting, but might as well be).
The system has an integrated Intel graphics card, and if you're not sure what your system has you can check it here:
Run the command below in terminal to know what video card is used for the backlight/brightness:

Install GCC 4.8.1 and other Scientitic Packages via Yum on CentOS

Do take a look at Linux @ CERN for the documentation on how to use yum to install devtoolset which contain the following packages. The latest version for CentOS 6 is devtoolset-2.1. Here is a summary of the Linux @ CERN
CentOS 6 / SL 6
Developer Toolset 2.1 provides following tools:

Configuring Python cx_Oracle and mod_wsgi on Oracle Linux

The Web Server Gateway Interface (WSGI) is a standardized interface
between web servers and Python web frameworks or applications. Many
frameworks including Django support WSGI.

This post is a brief how-to about configuring Apache's mod_wsgi
with Python's cx_Oracle driver for Oracle Database. The steps are for
Oracle Linux.

  1. Download Instant Client Basic & SDK ZIP files from href="http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html"
    >OTN. For cx_Oracle, use the ZIPs, not the RPMs.

Designing a Robust Deployment Architecture for Storage Repositories

Getting your storage repositories right is one of the more important aspects of planning and deploying Oracle VM.  Throwing everything into one or two different storage repositories is not very robust nor is it conducive to backups, routine maintenance, high availability or disaster recovery.  Conversely, allocating a storage repository for each individual Oracle VM guest is not scalable or practical.

view counter