Saturday 19 November 2016

Test script in AIX

Test script for repeat output, with in time interval it will show the output of command which you given in script. This script is very useful when you are monitoring the CPU, Memory, Disk input and output and moving or copying files from one to other you will see the slight difference.

while true
do
<command>
sleep 10
done

Example 1 :
It will show "lsvg rootvg" command every 20 seconds.To stop the script run ctrl+d

while true
do
lsvg rootvg
sleep 20
done

 Example 2 : 
It will show "sar" command every 5 seconds.To stop the script run ctrl+d

while true
do
sar
sleep 5
done

No comments:

Post a Comment

Privacy Policy

  Privacy Policy for UNIX TECH INFO At UNIX TECH INFO, accessible from https://unixworld4admin.blogspot.com/, one of our main priorities is ...