Archive for the ‘IOSTAT’ Category


1. List all Open Files with lsof Command

 

Screenshot_27

Sections and it’s values are self-explanatory. However, we’ll review FD & TYPE columns more precisely.

FD – stands for File descriptor and may seen some of the values as:

  1. cwd current working directory
  2. rtd root directory
  3. txt program text (code and data)
  4. mem memory-mapped file

Also in FD column numbers like 1u is actual file descriptor and followed by u,r,w of it’s mode as:

  1. r for read access.
  2. w for write access.
  3. u for read and write access.

TYPE – of files and it’s identification.

  1. DIR – Directory
  2. REG – Regular file
  3. CHR – Character special file.
  4. FIFO – First In First Out

2. List User Specific Opened Files

 

Screenshot_28

 

3. Find Processes running on Specific Port

 

Screenshot_29

 

4. List Only IPv4 & IPv6 Open Files

 

Screenshot_30

 

Screenshot_31

 

5. List Open Files of TCP Port ranges 1-1024

 

Screenshot_32

 

6. Exclude User with ‘^’ Character

Screenshot_33

 

7. Find Out who’s Looking What Files and Commands?

 

Screenshot_34

 

8. List all Network Connections

 

Screenshot_35

 

9. Search by PID

Screenshot_36

10. List all TCP or UDP connections

Screenshot_37

 

 

 


6 Iostat Command Examples in Linux

 Display CPU and I/O statistics

 

Screenshot_20

Shows only CPU Statistics

 

Screenshot_21

Shows only Disks I/O Statistics

 

Screenshot_24

Shows I/O statistics only of a single device.

 

Screenshot_23

Display LVM Statistics

 

Screenshot_24

iostat version.

 

Screenshot_25