Skip to content

gitthnx/dirIO_GPLv2

Repository files navigation

dirIO

Linux cmdline script for directory monitoring, e.g. data io (MB/s)

dirIO graphical output


syntax and keys

./dirIO.sh --help 

   Usage: ./dirIO.sh  /directory/to/monitor
                                         
   keys: search tree level       == 'n'        
         output mode             == 'm'        
         pause                   == 'p'        
         resume                  == ' ' or 'r' 
         clear screen            == 'c' or 'C' 
         help                    == 'h' or 'H' or '?'  
         quit                    == 'q' or 'Q' 
                                         
   version 0.1.5.2                          
   March 29, 2025                        

start

  # prepare for Your preferred inotifywait binary being available:
  sudo apt-get install inotify-tools
  whereis inotifywait
  cp /usr/bin/inotifywait /dev/shm/
  (copying .libs folder not necessary)

  # or from cloned git repository 'inotify-tools', 
  # built './autogen.sh; mkdir build; cd build; ../configure; make -j12;', 
  # inside build folder: 'build/src/.libs'
  cp <path to inotify-tools repository>/build/src/inotifywait /dev/shm
  cp <path to inotify-tools repository>/build/src/.libs -R /dev/shm 

  chmod +x ./dirIO.sh

 ./dirIO.sh /path/to/directory/for/monitoring/data_io

notes & issues

1) 'graphical' visualization only partially implemented within scripts for testing functionality options in <tmp> directory


chatGPT assisted code creation, initial prompt command:

Create a code example for data input output monitoring and data rate output within a bash shell command line. 
Create this script as bash shell script. 
Create this script for filesystem data input and data output and data rates from or to this directory, that is declared with script variables on startup. 
Add request for keyboard input for stopping that script on pressing q or Q. 
Add keyboard input scan for pausing output with pressing p and resuming with space key.



credits

inotify
inotify-tools
inotify-info