=================================================================== RCS file: /cvs/wpscripts/zlist/zlist,v retrieving revision 1.7 retrieving revision 1.9 diff -u -r1.7 -r1.9 --- wpscripts/zlist/zlist 2011/08/04 12:48:31 1.7 +++ wpscripts/zlist/zlist 2012/02/02 07:41:05 1.9 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: zlist,v 1.7 2011/08/04 12:48:31 yason Exp $ +# $Id: zlist,v 1.9 2012/02/02 07:41:05 yason Exp $ use DBI; use Term::ANSIColor qw(:constants); use Time::HiRes qw(gettimeofday tv_interval); @@ -79,11 +79,11 @@ print "\n"; - # fetch probas - db_fetch(1); +# fetch probas +db_fetch(1); -# print "****** probas ($#numcard) ******\n"; - print BOLD WHITE ON_BLUE "Probas queue". RESET . " ($#numcard pcs.) :\n"; +#print "****** probas ($#numcard) ******\n"; +print BOLD WHITE ON_BLUE "Probas queue". RESET . " ($#numcard pcs.) :\n"; $i = 0; while( ($numcard[$i]) ) { @@ -91,9 +91,48 @@ $i++; $total++; } - print "\n"; +print "\n"; +# fetch TT +db_fetch(2); +print BOLD WHITE ON_BLUE "TT queue". RESET . " ($#numcard pcs.) :\n"; + $i = 0; + while( ($numcard[$i]) ) + { + print "$numcard[$i]\t[ executed $time[$i], priority=$pri[$i], file=$path[$i] (size=$size[$i]) ]\n"; + $i++; + $total++; + } +print "\n"; + +# fetch zayavki_ +db_fetch(3); + +print BOLD WHITE ON_BLUE "zayavki_ queue". RESET . " ($#numcard pcs.) :\n"; + $i = 0; + while( ($numcard[$i]) ) + { + print "$numcard[$i]\t[ executed $time[$i], priority=$pri[$i], file=$path[$i] (size=$size[$i]) ]\n"; + $i++; + $total++; + } +print "\n"; + +# fetch proba_ +db_fetch(4); + +print BOLD WHITE ON_BLUE "proba_ queue". RESET . " ($#numcard pcs.) :\n"; + $i = 0; + while( ($numcard[$i]) ) + { + print "$numcard[$i]\t[ executed $time[$i], priority=$pri[$i], file=$path[$i] (size=$size[$i]) ]\n"; + $i++; + $total++; + } +print "\n"; + + # print summary information print BOLD WHITE . "Total: " . RESET . "$total files in queue.\n"; @@ -143,6 +182,9 @@ # remove first symbols to get only filename (i.e. \\fileserver\zayavki\ - 21 symbols) $path[$i] = substr($path[$i], 21) if ($type_file == 0); #zayavki $path[$i] = substr($path[$i], 19) if ($type_file == 1); #proba + $path[$i] = substr($path[$i], 16) if ($type_file == 2); #TT + $path[$i] = substr($path[$i], 22) if ($type_file == 3); #zayavki_ + $path[$i] = substr($path[$i], 19) if ($type_file == 4); #proba_ # make local file path $searchpath =~ tr/\\/\//;