HowTo: Linux Serial Port Sniffer

A serial port sniffer is a tool that allows you to monitor and log the traffic between two serial devices. In Linux, you can use the socat utility as a serial port sniffer. Here are the steps to use socat as a serial port sniffer: Install socat if it’s not already installed: sudo apt-get install … Read more

MySQL: Log Files in Linux / UNIX / BSD

In MySQL, log files are used to record various events that occur within the server. These logs can be useful for troubleshooting issues or auditing activity. Here are the log files in Linux/UNIX/BSD systems where MySQL logs are typically stored: Error Log: The error log records any errors that occur in the MySQL server. This … Read more

MySQL: Set Cache Size

In MySQL, you can set the cache size for different types of caches to improve performance. Here are the steps to set the cache size: Open the MySQL configuration file my.cnf in a text editor. sudo nano /etc/my.cnf Find the section for the cache you want to set the size for. For example, the key_buffer_size … Read more

UNIX: Zip Example

The zip command is a commonly used utility for compressing files and directories on Unix-like systems. Here are some examples of how to use the zip command: Compress a file: zip archive.zip file.txt Compress multiple files: zip archive.zip file1.txt file2.txt Compress a directory and its contents: zip -r archive.zip directory/ Compress a directory and exclude … Read more

RedHat / CentOS Install and Configure Cacti Network Graphing Tool

Cacti is a popular network graphing tool that allows you to monitor and graph various metrics about your network devices. Here’s how to install and configure Cacti on RedHat and CentOS: Install the necessary packages using the yum package manager: sudo yum install cacti cacti-spine httpd mariadb-server php php-mysqlnd net-snmp net-snmp-utils php-snmp -y Start the … Read more

Squid Listen on Other Port ( Squid Configure Port Listing with SELinux)

By default, Squid listens on port 3128. However, you can configure Squid to listen on other ports as well. Here’s how to do it: Edit the Squid configuration file. On most Linux distributions, the file is located at /etc/squid/squid.conf. sudo vi /etc/squid/squid.conf Look for the http_port directive. This directive specifies the port that Squid listens … Read more