If you use the rsync utility to keep your backups synchronized between your servers or with a local machine, you might want to prevent the script from using too much bandwidth. However, rsync makes a lot of network I/O. The point of limiting bandwidth is to make sure your backup scripts don’t clog up the […]
Archives for May 2020
How to Set CPU Affinity for SYSTEMD Process in CentOS/RHEL 7
CPUAffinity is one of the directives to control the CPU affinity of the systemd executed processes. from the man page of systemd.exec: # man systemd.exec CPUAffinity= Controls the CPU affinity of the executed processes. Takes a list of CPU indices or ranges separated by either whitespace or commas. CPU ranges are specified by the lower […]
How to verify if NX/XD is Enabled or Disabled in CentOS/RHEL 7 and 8
NX stands for No eXecute and XD stand for eXecute Disable is a technology used in processors to prevent the execution of certain types of code. NX/XD is a hardware cpu feature which is provided in almost all the hardware. Some BIOS has an advanced option of enabling or disabling it. This post will help […]
How to Set Environment Variables for a systemd Service in CentOS/RHEL 7
Question: How to do set environment variables for use with a systemd service of MySQL Server? There are a number of different methods that can be used to set environment variables for a systemd service. The method used can vary depending on the Linux distribution and the version of the distribution. The MySQL manual states […]
How to Set Resource Limits for a Process with Systemd in CentOS/RHEL 7 and 8
Some specific applications or processes may need higher resource values than the default systemd assigned values. It’s possible to override the default resource limits assigned by systemd. Basically systemd sets the default limits for any process when it starts. For example: # cat /proc/1696/limits | grep “Max locked memory” Max locked memory 65536 65536 bytes […]
How to add a Custom Script to systemd in CentOS/RHEL 7
The systemd facility replaces the older System-V initialization scripts from earlier releases. The systemd is an event-driven facility which allows non-dependent subsystems to be started, controlled, or stopped in parallel. Here we explain how to add a custom script to the systemd facility. 1. Write And Debug The Custom Script Typically a systemd script is […]
How to Disable user list on GNOME login screen in CentOS/RHEL 8
Question: How to disable the user list being shown when logging into a CentOS/RHEL 8 system? There are 2 ways to disable the user list being shown on the login screen in CentOS/RHEL 8. Per user Settings Globally Settings for all users Method 1 – Per User Setting In this method, an individual user is […]
How to Configure GNOME Console Login Banner in CentOS/RHEL 7 and 8
Question: How to set the banner shown as part of a console in CentOS/RHEL 8? GNOME console banner is a screen with a certain message that is shown before any user logins into the system using his/her login credentials. Login is performed by the Gnome Display Manager (GDM) tool. The steps to configure the GNOME […]
How to Reset Root Password in CentOS/RHEL 8
Starting from CentOS/RHEL 7, resetting of root password has slightly changed than its earlier versions. Let see in this post how we can recover a lost root password on a CentOS/RHEL 8 machine. Breaking Boot Sequence 1. Reboot the system and interrupt the boot loader sequence by pressing any key. 2. Move the cursor to […]
How to Count lines in a file in UNIX/Linux
Question: I have a file on my Linux system having a lot of lines. How do I count the total number of lines in the file? Using “wc -l” There are several ways to count lines in a file. But one of the easiest and widely used way is to use “wc -l”. The wc […]