PAC Manager: Best SSH/telnet manager for Linux
Submitted by krishna on April 8, 2013 - 10:32PAC 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:
Kitty: ssh/telnet client for window
Submitted by krishna on April 4, 2013 - 12:46Kitty is a fork of putty (0.62 version), with all old features along with an extended features. It is one of the best (my view), open source ssh/telent client for windows.
Kitty Screenshot.
Monitor website using apachetop tool
Submitted by krishna on March 31, 2013 - 00:24Apachetop 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
How to truncate files on linux
Submitted by krishna on February 12, 2013 - 13:40There are many ways to truncate files on linux based systems. Few of them are discussed below.
Logrotate Utility: Discuss in detail on link http://krishcon.com/blogs/20130212/RotateTruncate-files-Linux-using-logrotate
Rotate/Truncate files in Linux using logrotate
Submitted by krishna on February 12, 2013 - 11:58The 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
How to find Duplicate Records in table
Submitted by krishna on January 31, 2013 - 17:25The duplicate records in a table can be found using below query.
Query 1:
SELECT *, count(pro) as cnt FROM list GROUP BY pro HAVING cnt > 1;
Illustration: The above query will find the duplicate records from list table. The cnt column will show that the duplicate records is available for how many times.
Query 2:
Master/Slave Replication in Slow Bandwith OR Across External Network
Submitted by krishna on January 10, 2013 - 16:20Database 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
Submitted by krishna on January 3, 2013 - 22:23Many 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
Submitted by krishna on December 23, 2012 - 00:49Many 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.
Install and Configure ntp in Linux
Submitted by krishna on November 26, 2012 - 21:19NTP stands for Network Time Protocol. This protocol is used to synchronize your Linux system's clock with an accurate time source. The below article shows the detailed steps to configure ntp in linux.
Steps:
Login as a root user and install ntp using below command. (Here it's already installed)
MySQL Backup Script
Submitted by krishna on November 20, 2012 - 20:06Backup is one of the most important, part of the database administration. There are several ways to backup MySQL data. I'm discussing a very simple script, easy script to take backup of multiple databases. This script can be customized as, per the requirement.
Script
Problem Installing MySQL Server 5.5.28 binaries
Submitted by krishna on November 3, 2012 - 15:17One 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
Submitted by krishna on November 2, 2012 - 09:49The 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
Submitted by krishna on October 9, 2012 - 09:19Most 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
Submitted by krishna on October 8, 2012 - 06:55Although, 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.
MySQL root user
Submitted by krishna on October 6, 2012 - 12:18MySQL root user is meant for database administrators for administration task. Many times, I found it's being used as replication user and normal user for making connections to mysql database.
One of my clients did the same thing and later it was fixed.
TEST: Default Schema
Submitted by krishna on October 6, 2012 - 11:36MySQL 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
Submitted by krishna on October 5, 2012 - 11:45Some 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
Submitted by krishna on October 5, 2012 - 08:38Working 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
