If our Linux system is running slow, we should check the following parameters:
The troubleshooting steps are the following :
iostat -y 5,
tcpdump -i enps03,
lsof -i -P -n | grep -i listen,
yum install epel-releaseand
yum install iftop.
psacctwith the command
We can troubleshoot the issue of IP being assigned but not reachable with the following steps:
The gateway address is 192.168.1.1.
mii-toolto verify the NIC status with the command:
systemctl restart network
ip addr. It should be
systemctl stop firewalld
We should install only those packages that are really required. If there are unwanted packages, we should delete them. The lesser the number of packages, the less is the chance of unpatched code.
The guidelines to be followed on installing/uninstalling the packages are:
To get a list of all the packages, run the command(for CentOS):
apt list -installed
To count the total number of packages, run the command:
rpm -qa | wc -l
To remove packages, run the command
rpm -e package_name or
apt-get remove package_name.
The orphaned packages are those which do not serve the purpose of package dependencies. It is recommended to remove all the orphaned packages from the CentOS Linux.
The built-in utility
yum-utils is used to verify if there are orphaned packages.
To verify if that is present, run the command:
rpm -qa | grep yum-utils
If not present, install it with the command:
yum install yum-utils
To get the list of all orphaned packages, run the command:
To remove a package run the command(for CentOS):
yum remove `package-cleanup --leaves`
Myself Debomita Bhattacharjee, an IT employee with 6+ years of experience in Software industry. My area of interest is Automation testing and Front End Development.