Thursday, August 15, 2013

How to increase/reduce the verbosity of the Apache httpd error log?

To increase or decrease the information being logged into Apache's error log file, LogLevel directive in httpd.conf file need to be set with any one of the following levels - emerg, alert, crit, error, warn, notice, info, debug

Eg:

LogLevel warn

emerg results in the least information being recorded and debug the most.

The path of the error log file is specified using ErrorLog directive in Apache httpd.conf file. 
The ErrorLog directive sets the name of the file to which the server will log any errors it encounters. If the file-path is not absolute then it is assumed to be relative to the ServerRoot.

Eg:

    ErrorLog logs/error_log       #ErrorLog path relative to ServerRoot

     (or)

   ErrorLog /var/log/httpd/error_log



How to Increase the number of simultaneous/concurrent TCP connections in Red Hat Enterprise Linux 5 and 6 ?

/var/log/messages may show that number of TCP connections has been exhausted and kernel is dropping packets.

To modify the maximum allowed TCP sessions in RHEL 5 and 6, with reference to https://access.redhat.com/site/solutions/94803, here is the solution

In RHEL 5, modify the following parameter

    /proc/sys/net/ipv4/netfilter/ip_conntrack_max

In RHEL 6, modify the following parameter

     /proc/sys/net/ipv4/netfilter/ip_conntrack_max

The increase in TCP session limit will result in more core memory being used.


Tuesday, August 6, 2013

File system commonly available on Unix and Unix-like operating systems (Linux, FreeBSD, Solaris)

Which file system is commonly available in Unix, Linux, FreeBSD and Solaris?

The virtual filesystem, procfs("process" file system or /proc, where it is usually mounted) is the filesystem commonly available in Unix and Unix like operating systems, namely, Linux, FreeBSD and Solaris.

File types in Linux

Different file types in Linux are

  1. Regular file  ( - )
  2. Directory ( d )
  3. Symbolic Link ( l )
  4. Character Special Device ( c )
  5. Block Device ( b )
  6. Named pipe or Fifo ( p )
  7. Socket file ( s )