PAC Manager: Best SSH/telnet manager for Linux

PAC manager is a GUI application for easily managing SSH/telnet connections on linux. It has all the features of commercial SecureCRT tool. It supports macro, cluster connections, RDP & VNC and lot more. It provides an tray icon area for quick access of the configured connections.

PAC Manager can be downloaded from here.

Features:

Monitor website using apachetop tool

Apachetop is a tool similar like mtop, mytop, top. It displays real time web server statistics. Apachetop parse log file and generate human readable output. It's a simple command line utility, used to monitor real time traffic.

Syntax below:

apachetop -f /var/logs/httpd/access.log 

Multiple log file can be provide to monitor.

Manual Link: http://linux.die.net/man/1/apachetop

Rotate/Truncate files in Linux using logrotate

The log files of any applications (LAMP) like apache, mysql, linux, php  needs to be managed, if they are growing frequently on linux servers. Managing log file efficiently, prevents from high disk space utilization.

Logrotate is one of the functionality, available on all the linux based servers to manage log files. This tool rotates, compresses, and mails system logs

Configuration files: /etc/logrotate.conf

Master/Slave Replication in Slow Bandwith OR Across External Network

Database replication is one of the important part of the architecture, as it provides scalability, redudancy and backup solutions. It provides exact copy of database from master to another server (slave).  Replication can help protection against hardware failure also.

Replication lag happens very frequently in the below senarios.

  • Replication on a slow network
  • Replication between external network
  • Replication between two different data centers.

 

MySQL net_read_timeout and net_write_timout

Many times, we see aborted connections in mysql error log file, while restoring backup, taking data dump (backup) or executing analytics (report) query on mysql server. This happens due to extremely poor network communication between the device. The mysql configuration variables related to this is below. The default value of these variables is 30 and 60.

How to setup/configure timezone in centos

Many times we need to change the timezone, as per our requirement. Most of OS images (centos, debian, ubuntu) doesn't comes with the proper timezone. I'm discussing one of the way to change the time on centos operating system below.

a) system-config-date

[root@localhost ~]# system-config-date

The above command will open up a GUI interface to change the date and  timezone.

Problem Installing MySQL Server 5.5.28 binaries

One of most easiest and preferred way of MySQL installation is binary installation. While performing mysql binary install using the below command, run into following errors.

[root@localhost mysql]# scripts/mysql_install_db --user=mysql
Installing MySQL system tables...
./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

Installation of system tables failed!  Examine the logs in
./data for more information.

 

Change/Setup hostname in Linux CentOS

The guide show you on how to change the hostname on linux Centos. Login to the system using root or sudo. Reboot is required for both options (B) and (C) for the changes to take effect and permanent.

Option A:

The below command will change the hostname of the server. Hostname command is used to change as well as read the hostname of the server. This change is not permanent  and will vanish after reboot.

[root@localhost ~]# hostname db1.mylinux.com
[root@localhost ~]# hostname
db1.mylinux.com

Option B:

How to store IP address value in integer datatype column

Most of the time, we use string datatype column like char or varchar to store ip address values. There is a way to store ip address value in numeric datatype column like unsigned interger. There is miscellaneous functions INET_ATON(), INET_NTOA() using which it's possible

INET_ATON() Return the numeric value of an IP address
INET_NTOA() Return the IP address from a numeric value

Building Report Server

Although, there are many ways to setup a reporting server depending on the requirements. Sharing one of those. Reporting Server provides reports i.e. daily, weekly, monthlty and quarterly reports to the clients. Data flow from many different servers (services) to one system called as Report Server. Client might be using more than one services. Therefore, it is necessary to collect the whole data at one place, analyze and generate reports for clients and billing purpose. This makes the data huge in TBs.

TEST: Default Schema

MySQL and it's fork (Percona Server, MariaDB) contains default schema (database) test. Many times, i found it missing from clients mysql-server. It has it's own importance.

1. On master slave replication setup with below configuration parameters.

binlog-ignore-db=mysql
binlog-ignore-db=test
binlog-ignore-db=information_schema

This makes the test schema useful for benchmarking purpose (sysbench, mybench, supersmack) without replicating the benchmark data on slave or new schema can be created if slave benchmark required.

Faulty Physical Ram

Some times it's very difficult to find out exact issue. Specially When it's related with hardware. Similar scenario, i faced with a client. I have been provided with a new box to setup mysql server. After setup mysql along with other application, mysql frequently goes down without any comment in mysql error log file. Spending few days verifying os, logs, mysql and later i found the culprit using memtester tool. Thanks to memtester tool.

Quick Table Query

Working with clients, sometime I have to deal wih more than 300 tables within a schema. In order to identify tables, views, table size, alphabetical ordering of tables, engines etc. Information Schema is the best place to look for detailed information.

Quick Alternatives:

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.2.2-MariaDB-gamma Source distribution