hi
we have 3 servers and we have a script to monitor cpu usage of all 3 servers and writes into one file on one of the server where we monitor all those servers ( by doing tail -f filename ) so we decided to create script ( perl ) that will read values from this file and display it should be like "top" command it will refresh on its own without quitting ...can u guys provide me ideas ?
sample log file is as follows :
20080115_172824_Hpux1571 801 Hpux1571 0 0
20080115_172826_Hpux1570 801 Hpux1570 6 0
20080115_172832_Hpux1572 801 Hpux1572 65 0
20080115_172835_Hpux1571 801 Hpux1571 0 0
20080115_172838_Hpux1570 801 Hpux1570 1 0
20080115_172844_Hpux1572 801 Hpux1572 60 0
20080115_172847_Hpux1571 801 Hpux1571 0 0
20080115_172849_Hpux1570 801 Hpux1570 6 0
my current scripts prints like this :
Hpux1571 : 0
Hpux1570 : 6
Hpux1572 : 65
Hpux1571 : 0
Hpux1570 : 1
Hpux1572 : 60
it should display like :
$tailit.pl
Hpux1570 : 6
Hpux1571 : 0
Hpux1572 : 65
extracting values is not a problem , problem is that displaying only latest values from them .....
suggest something ...