Posts

Showing posts from March, 2011

Squid Transparent Proxy Server

Image
  A proxy server is a server (a computer system or an application) that acts as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource, available from a different server. The proxy server evaluates the request according to its filtering rules. For example, it may filter traffic by IP address or protocol. If the request is validated by the filter, the proxy provides the resource by connecting to the relevant server and requesting the service on behalf of the client.                        Fig. Schematic representation of a proxy server, where the computer in the middle acts as the proxy server between the other two. Transparent proxies An intercepting proxy (also forced proxy or transparent proxy ) combines a proxy server w...

Top 5 Memory Consuming Processes in Linux

Hi,        Some times we need to know the most memory consuming process. In Linux you can do this with the help of following command. [root@server2~]#ps axo %mem,command,pid | sort -nr | head -n 5  24.2 /usr/java/jdk1.6.0_24/bin/j 2223  9.4 /usr/sbin/mysqld --basedir= 2855  1.9 /usr/java/jdk1.6.0_24/bin/j 2065  0.8 /usr/libexec/gdmgreeter 3847  0.2 /usr/libexec/gdm-rh-securit 3798 Here option "axo"  allow us to see Every Process in User-Defined format. !!Enjoy Linux Kuldeep

Setting Java Heap Size

Two JVM options are often used to tune JVM heap size: -Xmx for maximum heap size, and -Xms for initial heap size. Here are some common mistakes I have seen when using them: Missing m, M, g or G at the end (they are case insensitive). For example, java -Xmx128 BigApp java.lang.OutOfMemoryError: Java heap space The correct command should be: java -Xmx128m BigApp . To be precise, -Xmx128 is a valid setting for very small apps, like HelloWorld. But in real life, I guess you really mean -Xmx128m Extra space in JVM options, or incorrectly use =. For example, java -Xmx 128m BigApp Invalid maximum heap size: -Xmx Could not create the Java virtual machine. java -Xmx=512m HelloWorld Invalid maximum heap size: -Xmx=512m Could not create the Java virtual machine. The correct command should be java -Xmx128m BigApp , with no whitespace nor =. -X options are different than -Dkey=value system properties, where = is used. Only setting -Xms JVM option and its value is greater t...

389 Directory Server | Fedora Directory Server On CentOS

389 Directory Server The 389 Directory Server (previously Fedora Directory Server ) is an LDAP (Lightweight Directory Access Protocol) server developed by Red Hat, as part of Red Hat's community-supported Fedora Project. 389 Directory Server is identical to the Red Hat Directory Server, just rebranded. The name 389 is derived from the port number for LDAP. Features 1.) 389 Directory Server has multi-master capability. 2.) 389 Directory Server also has the ability to export parts of the directory to read-only servers. This is similar to the Read Only Domain Controller in Microsoft's Active Directory Domain Services. 3.) 389 Directory Server has a Java-based GUI front end for administration, but the underlying LDAP database can be managed by other LDAP compliant tools. First you need to download & install epel rpm package, that is repository rpm packages.Then you can install packages with your usual method, and the EPEL repository is included. [root@server2/etc/dirsr...

How to know Size and Name of Installed rpm

Recently I have come in situation having low space. So I start thinking that how will I got the list of all RPM installed along with their size. So I have spend some time for searching and got the following nice command. #rpm -qia|awk '$1=="Name" { n=$3} $1=="Size" {s=$3} $1=="Description" {print s  " " n }' |sort -n Let me explain the above thing 1.) rpm -qia will list all installed rpms along with their all Info. 2.) send above output to awk. It will see if first column is "Name", then set value of Third column to n(variable).Similarly, If first column is "Size", then set value of Third column to s(variable).                                    Note : If you just run rpn -qia then you will see that the row Having Name as first column have third column as its Actual Name and same with Size. 3.) Finally It ...

Using the /proc filesystem

                                          **The Proc File System** Today I have come to know these all things about Proc File System. really so Interesting.                                     The proc filesystem is a special filesystem found on most UNIX-based systems. It holds a great deal of information, in ASCII format, most of which is not very friendly to the average user.It is important that you keep in mind that the files under /proc are not kept on a physical storage, meaning they are subject to change after reboot. Also, they should not really be called files as they are pseudo-files, as they exist only in memory. I break that rul...

What is Zombie process in Linux?

Zombie process                                            On Unix and Unix-like computer operating systems , a zombie process or defunct process is a process that has completed execution but still has an entry in the process table . This entry is still needed to allow the process that started the (now zombie) process to read its exit status . The term zombie process derives from the common definition of zombie —an undead person. In the term's metaphor, the child process has " died " but has not yet been " reaped ". Also, unlike normal processes, the kill command has no effect on a zombie process. Finding if zombies exist execute the top command one line is tasks: Example output: Tasks: 139 total,   2 running, 136 sleeping,   0 stopped,   1 zombie ...