Advertisement

Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Wednesday, May 6, 2020

DEVOPS - How to find out processes in 'D' state of uninterruptible sleep (High I/O Wait)

IN this blog I am going to write on how to find out processes state and specially when there is high I/O wait on the system. 


The key is to list down the process which are in 'D' or 'S' state (primarily 'D').


Run below command to list processes in 'D' state. Replace '^D' with '^S' to get list of processes in S State.
Once you get the process you can do action on it 

 for x in `seq 1 1 10`; do ps -eo state,pid,cmd | grep "^D"; echo "----"; sleep 5; done

Wednesday, September 4, 2019

AWS/Linux: How to know if a device has File system on it

It is a common question which comes to me from people to understand how to know if a raw disk has file system on it or not. 

There can be multiple ways but in this blog I will talk about file command

File command can help you know if the FS is there or not?
How 
use file -s '/device_name'
if you get output like data: that means no FS
If there is any other output, it means FS is present.