Maintaining Software Using RPM (Red Hat Package Manager) RPM is a powerful software manager which can be used to build, install, query, verify, update, and uninstall individual software packages. An RPM package consists of an archive of files, and package information such as name, version, a description and information about dependencies on other RPM packages. […]
Archives for May 2019
How To Check Swap Usage of Each Processes in Linux
This post shows how to check swap usage of each process, answering “How can I know what process would consume the largest swap space?” For all kernels Swap usage is shown as “Swap” columns in /proc/[PID]/smaps. This indicates swapped memory size of the each memory ranges, thus the sum of all of these values shows […]
How to Disable Ctrl+c or Ctrl+z Using the “trap” Command in Linux
The purpose is to disable CTRL+C or CTRL+Z interrupt for the root user or a general user account by the trap command. So basically, when the user tries to interrupt any command or script using CTRL+C or CTRL+Z, he will not be able to do so. The trap command can be used to trap these […]
How to Disable Daylight Savings Time (DST), and Modify the Timezone on Linux
Many countries do not follow DST changes, and by default, they are configured so DST time changes alter their system times and even the database times running on them. This post outlines steps to disable DST and modify the timezone on a Linux server. In this example, the time is set as per Brazil country, […]
How to disable a specific command for a specific user in Linux
Question: How to prevent a given user from being able to run a specific command. This technique uses a filesystem access control list (ACL) to prevent unwanted access. Caution: The sudo facility is not suitable for this purpose. In particular, “subtracting” an executable from the allowed ALL preset does not work as expected. The example […]
How to check the status and space used by images and containers
This post objective is to find out the stats of running container, system information related to space used by images and containers on /var/lib/docker. 1. ‘docker stats‘ command used to check the containers stats on system like CPU usage, IO usage, Memory usage. Below example is for 2 running containers dockerweb and webserver2. # docker […]
How to Remove/ Disable Bash shell Command History on Linux
This post will help you to remove/ disable Bash shell commands history on Linux. 1. Disable history for a current shell. # set +o history 2. Clean command history. # history -c 3. Permanently disable bash history. # echo ‘set +o history’ >> ~/.bashrc Next time when user login to the shell it will not […]
How to Transfer a File In Passive Mode by FTP
By default vsftpd will use passive mode for transferring: # man vsftpd pasv_enable Set to NO if you want to disallow the PASV method of obtaining a data connection. Default: YES If the user wants to customize the ports information used, or to enable active mode, then do the following: 1. modify /etc/vsftpd/vsftpd.conf and add […]
How to Increase the File Download Size Limit in Apache
The Problem You may encounter a request to increase the file download size limit in Apache server. Attempting to call a URL to upload a file, the following error occurs in Browser: ERROR Request entity too large. Request exceeds the capacity limit Apache error_log has the following error: Request content-length of 294135 is larger than […]
How to Disable/Enable Numa for Virtual Machine (XEN based)
How to check if NUMA is enabled To determine if the server is a NUMA-based system with NUMA enabled, run the following command as root on the database server: # numactl -H | grep available available: 8 nodes (0-7) – or – # numactl -H | grep available available: 2 nodes (0-1) If the number […]