view counter

Linux Feed

Linux Support, Oracle Linux, Red Hat Enterprise Linux, SUSE, Oracle Unbreakable Enterprise Kernel and the Oracle Unbreakable Linux Support Program (ULN) resources, news, and support articles.

Nginx disable logging

 
To disable logging in nginx we need to change values of access_log and error_log to off.
Lets say if you have config file for website example.com in sites-enabled and you want to disable logging for it.
Just open configuration file related to your website and look for access_log & error_log in server block, change their values to off.

Compiling GSL/4.1 from GIT on CentOS 5

GSL/4.1  is a code construction tool. It will generate code in all languages and for all purposes. To compile GSL, do the followings
Prerequisites
# yum install pcre
Compilation
# git clone git://github.com/imatix/gsl
# cd gsl/src
# make
# sudo make install
To show command-line help

Support for binding Oracle PL/SQL BOOLEAN introduced in PHP OCI8 2.0.7

I've released PHP OCI8
2.0.7
which has oci_bind_by_name() support for binding
PL/SQL's href="http://docs.oracle.com/cd/E16655_01/appdev.121/e17622/datatypes.htm#LNPLS348">BOOLEAN
type to PHP's href="http://www.php.net/manual/en/language.types.boolean.php">boolean.
The feature is available when PHP OCI8 2.0.7 is linked-with and
connects-to Oracle Database 12c. (The necessary Oracle C library
support for binding BOOLEAN was introduced in 12c).

Python dictionary sum of all values

 
By sum and values() functions in dictionary we can get sum of all values.
Lets say we have a dictionary d defined as following:
d = {'a' : 1, 'b' : 2, 'c' : 3}
To print sum of all values in above dictionary use following function:
sum(d.values())
Output:
6
To print only values from dictionary:
d.values()
Output:
We will get output as list
[1, 3, 2]

Find out when a package was last installed or updated

If you administer a Linux computer, you may occasionally ask when a software package was last installed or updated on your system. For a Red-Hat-based operating system - Centos, Fedora, RHEL, etc - getting the answer is a simple task of querying the RPM database. The RPM database stores, among other things, the last install date of rpm packages. To query information about the curl package: $ rpm -qi curlName : curlVersion : 7.29.0Release : 7.fc19Architecture: i686Install Date: Sun 11 Aug 2013 03:55:52 PM PDT

Video recording of my talk at FOSDEM’14 in Brussels

Configuration management in an Enterprise Linux Team — How I automated myself out of my job Thanks to the FOSDEM video team for this video! It nicely integrates the slides and me talking! It’s just a pity the sound from the camera was used instead of the mic I was wearing. Therefore you hear a […]

Enabling SRIOV on Intel Ethernet Server Adapter

First thing first
Step 1: Check that the Intel Ethernet Server Adapter. For more information, do take a look at Using SR-IOV with Intel® Ethernet Server Adapters
In a nutshell, You blacklist the vf driver in the host, and enable the VFs as part of the kvm guests.
Step 1: Add a line /etc/modprobe.conf

Debugging Tools to track run-time errors for mpirun

If you are having with unexplained issues with mpirun, you can use various method to troubleshoot.
Information on “–mca orte_base_help_aggregate 0″
If your mpirun dies without any error messages  you may want to take read from OpenMPI FAQ which
Debugging applications in parallel 7. My process dies without any output. Why?

Python convert float to int

 
Here I will show how to convert a float number to integer using python.
In my script I have a number a = 1.4
a = 1.4
To convert it to integer use following code:
print int(round(a))
After converting float a to integer we will get output as 1.
Add above two line in a script(floatToInt.py) and execute it.
a = 1.5
print int(round(a))

Now execute script with command python floatToInt.py
Output:
1

Merging pdf files

This post is about combining pdf files. It complements 2 earlier posts on splitting pdf files - part 1, and 2. I am using a tool named SimpleScan to scan in multiples pages of a document. Each page is scanned into a separate pdf file. I must find a way to stitch the pdf files together into one single pdf.

view counter