Nfs troubleshooting

Steps followed to troubleshoot NFS4

Below are few commands which are frequently used to troubleshoot NFS or io troubleshooting check port 2049 and 111 # nmap -p 2049 <nfs_server_ip> -Pn # nc -vz <nfs_server_ip> 2049 # nfsiostat /techbluff # nfsstat -m To get nfsstats of directory and cache every 10 seconds # nfsiostat 10 -d   ..

Change grub parameter

Change in grub values

First copy grub file before making changes # cp /etc/default/grub /etc/default/grub-`date +%FT%H%M` Now do required changes in /etc/default/grub # vim /etc/default/grub For Example GRUB_TIMEOUT = 40 After making changes compile grub using grub2-mkconfig # grub2-mkconfig /boot/grub2/grub.cfg # date Sun Mar 19 15:39:28 XXX 2023 # touch te-`date +%FT%H%M` # -rw-r--r--  ..

How to search ldap user

How to clean sss clean cache

Search ldap users using below commands # ldapsearch -x -LL uid="<username>" # getent passwd <username> Try to ping or reach the ldap servers(url) which are configured in /etc/ldap.conf # nc -vzw2 389 Check if ports are open using nmap # nmap -p 389 -PN Do TCP check with traceroute # traceroute  ..

How to detect physical cable is connected to network card or not

Find physical cable connection to Network slot

There are various tools to find the network cable link of network card connected to a server, however in linux all are files and the connection status can also able be determined by simple cat command. /sys/class which say more # ls -l /sys/class/net/ lrwxrwxrwx 1 root root 0 Aug 11  ..

Delete all but not last n lines

Leave last few lines and delete all

How do I delete a huge file except last n lines of a file? vi editor has a feature called "ex", By using it you can delete all lines of a file except n lines from a file Create a file with n lines # for i in $(seq 1 2500); do  ..

How to flush linux DNS cache nscd

Using nscd command to flush dns cache

The nscd caches are saved to disk on RedHat system, they are located in /var/db/nscd # ls /var/db/nscd/ group hosts netgroup passwd services When you stop or restart nscd these files just stay there and restarting really wont clear or flush your  ..

How to calculate total diskspace in terminal

Covert Kilobytes to Megabytes or gigabytes of disk

To find the disk size # fdisk -s /dev/sdb 62914560 In the above command the disk space will be printed in KB. But I had the requirement to print the values in MB or GB for multiple servers. To print diskspace in Megabytes or MB # echo  ..

How to calculate total memory in terminal

Covert Kilobytes to Megabytes or gigabytes through terminal

When I tried to run size of my memory, I executed below command and found the result in KB # grep 'MemTotal' /proc/meminfo I can also run free -m or free -g to read the output in MB or GB. But when I have list of values in  ..

Adding rhq agent during system boot

Running rhq agent as a Daemon or init.d Service

Normally the agent should be started as a background daemon process. On Windows, this runs as a service. On Linux and Unix systems, the agent starts at boot time from init.d Register with chkconfig. # /sbin/chkconfig --add Enable the agent service to run at boot time and have it  ..

Chown for symbolic link

Change ownership for symbolic link

The chown command changes the user ID and/or the group ID of the specified files. Symbolic links named by arguments are silently left unchanged unless -h is used. Changing the owner of a symbolic link needs special attention. When you use chown the regular way to change the owner of a  ..

How to install and configure ansible on fedora

Installing Ansible Playbook

Great things about Ansible is that you dont need to install an Ansible client on the servers you are managing. You only need to install Ansible on your local machine or on a master server that can connect to the managed servers via SSH. Ansible works by configuring client machines  ..

Reinstall format disk using dd command

Format disk using dd command

When you want to clean the disk or format the disk dd command will be very handy to use it. Format disk using dd command # dd if=/dev/zero of=/dev/sdb # dd if=/dev/null of=/dev/sdd bs=4096 count=1 This command will clean or wipe the data of your existing disk. Use this command  ..

How to mount nfts partiton on linux

Mount partition with ntfs file system and read write access

Today when I want to mount my external harddisk I felt uneasy since my Redhat linux does not support nfts partiton. NTFS3G is an open source cross-platform, stable, GPL licensed, POSIX, NTFS R/W driver used in Linux. It provides safe handling of Windows NTFS file systems. To proceed with mounting  ..

Yum download package without installing

Yum only download not to install

How to yum download a package without installing? Install downloadonly plugin for download option # yum install yum-utils # yum install yum-plugin-downloadonly How to yum download a package? # yum install --downloadonly --downloaddir=<directory> <package> Example: # yum install --downloadonly --downloaddir=./ kmod-VirtualBox-3.19.5-200.fc21.x86_64.x86_64 To download already installed packages # yumdownloader <package>   ..

How to find block size of filesystem

How to find block size of partition

How do I find block size of an partition on Linux? # tune2fs -l /dev/sda1 | grep -i 'block size' Block size: 1024 How do I find block size of a filesystem on Linux? #  ..

Previous 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Next >

Tech Bluff