Finding out per process Swap usage

In this post, I will share with you useful shell script to find per process swap usage on your system. Method- 1 total_swap=0 for pid in `ls /proc | grep “[[:digit:]]”| sort -n` do if [[ “$pid” -gt “0” && -f “/proc/$pid/status” ]]; then pname=`cat /proc/$pid/status|awk -F”Name:” ‘{print $2}’` swap_usage=`cat /proc/$pid/smaps | awk ‘BEGIN{total=0}/^Swap:/{total+=$2}END{print total}’` […]

Read More →

L7 LB with HAProxy

HaProxy is a free and reliable software solution for high availability and load-balancing for TCP and HTTP applications. HaProxy has been used many Fortune companies for a long time. It has proved its reliability. In this post I will show you how to create Layer 7 Load-Balancing. You can see below diagram on the Figure-1. […]

Read More →

Apache as a Forward Proxy

Proxy Server is a intermediary server that resides between client and  server. All requests originated by client send to the web server through  proxy server.  You can see below diagram with tcpdump analysis.                   Configurations: Proxy Server Configurations(CentOS7) Install apache for using Proxy server. [root@rhce ~]# yum […]

Read More →

Ansible Sample Scripts

Hello Folks! In this post I will share you some playbooks. Actually, I wrote it before some purposes. You can change it and tweak it :). 1- Apache2 Virtual Host  deployment. It deploys new Virtual Host configuration, enables configuration and checks syntax. If it is everything is all right then restarts an apache2, otherwise rollback. […]

Read More →

Syslog Server Configuration

Basic Syslog Server Configuration In rsyslogd, different types of modules can be used:■ Input modules: These are modules that have a name starting with im. Inputmodules are used to specify from where rsyslogd will receive messages.■ Output modules: These are modules that have a name starting with om. Bydefault, log messages are sent to the […]

Read More →