Showing posts from August, 2014

Linux System Activity Report SAR Graphs

One of the extremely useful tools to get an overview of what system is doing is a SAR reports, We can see SAR stats by simply issuing the command: # sar Linux 3.0.74-0.6.8-default (hostname)      10/09/13        _x86_64_ 00:00:01 CPU %user %nice %system %iowait %steal %idle 00:10:01 all  0.25  0.00  0.18    0.02     0.00 99.56 In most cases it is run as daemon in system and create the stats every 10 minutes, We can also see current system statistics by issuing following command: # sar 2 5 which create report every 2 seconds for 5 times, Cron jobs can be find in sysstat file under cron.d directory: # cat /etc/cron.d/sysstat # Run system activity accounting tool every 10 minutes */10 * * * * root /usr/lib64/sa/sa1 1 1 # 0 * * * * root /usr/lib64/sa/sa1 600 6 & # Generate a daily summary of process accounting at 23:53 53 23 * * * root /usr/lib64/sa/sa2 -A The first cron sa1 gather systems stats every 10min by defaul

Install SNMP and open its port on iptables firewall

In order to get your system monitored by a centralized monitoring system, most probably you need to enable snmp in your Linux, Here is the way snmpd daemon can be installed and enabled: 1. Installation via yum or rpm: # yum install net-snmp or: # rpm -ivh net-snmp-libs-5.5-44.0.1.el6.x86_64.rpm net-snmp-5.5-44.0.1.el6.x86_64.rpm lnet-snmp-utils-5.5-44.0.1.el6.x86_64.rpm 2. SNMP configuration can be edited in snmpd.conf. # cat /etc/snmp/snmpd.conf |grep -i public # By default, the agent responds to the "public" community for read # First, map the community name "public" into a "security name" com2sec notConfigUser  default       public 3. Start the snmpd service: # /etc/init.d/snmpd start Starting snmpd:                                                         [OK] # /etc/init.d/snmpd status snmpd (pid  19508) is running... # ps -ef|grep snmp root     19508     1  0 Jul08 ?        00:00:18 /usr/sbin/snm