It’s really a headache while handling disk space issues with the Linux server. Today I am sharing one of the easiest commands to sort out the size of unwanted logs that can be easily removed from the server to tackle…
Linux
How to remove files using inode number?
An inode is a data structure on a filesystem, which provides the info about the file’s metadata like file permissions, ownership, file type, block details, attributes. Please run the following command to view the details of the inode number of…
How to change MPM in ubuntu
Run the following command to know the current MPM apache using. root@ip-172-31-93-7:/home/ubuntu# apachectl -V | grep -i mpm Server MPM: event The current MPM is apache using is an event module. Available MPM are listed over here. ls /etc/apache2/mods-available/mpm* /etc/apache2/mods-available/mpm_event.conf…
Entries in FSTAB
Fstab files resides in /etc/fstab entries be like the following ones. UUID=1172gfe1-3d7c-44g8-9ad5-0d0b6e0485dd /mnt/test xfs defaults 1 1 First field: has the info about the device name (/dev/sda) either as device name or UUID You will get the UUID by running…
SSH notification mail alert in Centos
Open the “bash_profile” vi ~/.bash_profile Add the following content and replace the ” youremailaccount@yourdomain.com” with your email account that you wish to recieve email alerts. # Email admin when user logs in as rootrootalert() { echo ‘ALERT – Root Shell…
How to calculate MySQL max_connections
max_connections = (Available RAM – Global Buffers) / Thread Buffers For getting the available RAM in bytes. free -b total used free shared buff/cache available Mem: 8253255680 6625886208 172158976 931852288 1455210496 409915392 For getting the details about Global buffers, access…
How to calculate MySQL thread_cache_size
This parameter sets the amount of thread for cache purposes. If client disconnects, his thread are kept in the cache. If the requests are less than the thread_cache_size then threads that are stored in cache will serve the requests. To…
Script for wordpress version with user information
Kindly download the following script and execute the script using the following command. [root@arunlal ~]# wget lintechops.com/wp-version.sh[root@arunlal ~]# sh wp-version.sh Output be like. abxxxcd ‘4.4.18’; abxxxdc ‘4.9.10’; abxxxfg ‘4.0.26’; abxxxtr ‘3.9.27’; acxxxje ‘4.0.26’; apxxxit ‘3.8.5’;
Command for finding disk usage of error_logs in the home directory
It’s really a headache while handling disk space issues with Linux server. Today I am sharing one of the easiest commands to sort out the size of unwanted logs that can be easily removed from the server to tackle the…
How to remove IP Address from cPHulk by using command line.
mysql> use cphulkd; mysql> select IP, BRUTETIME from brutes order by BRUTETIME; mysql> select IP, LOGINTIME FROM logins order by LOGINTIME; mysql> delete from brutes; mysql> delete from logins;