xtail.pl

20Jan2010
jec


xtail.pl is a perl script, designed to help inspect the ( rather large number of ) log files produced by mpi_transp. In conjunction with find, it displays the end of each selected file in a different window - if your window manager is up to the task..

It is necessary to recover all the files to a local disk first.

Usage

>setenv LINES 55
> ( find . -name *.log -exec xtail.pl {} \; ; sleep 5000 ) &

Each file is displayed in a window of maximum length $LINES, and an appropriate width ( but less than $COLUMNS if defined.) The ( ; sleep ) construction causes all the xtail subprocesses to be dependent on a single process - which can be killed to terminate all the windows at once. This avoids the tedious business of killing each one individually.

Advanced features

The 1st argument to xtail is the file to be viewed. Subsequent arguments can redefine the process to be executed, and provide it with additional arguments -
for example,

xtail {} more \;
would run more in each window
find . -name *tr.log  -exec xtail.pl {} tail -f
would open a window to follow all tr.log files, eg for an mpi debugging test run on a single machine

xtail.pl only requires that the target file can be accessed with wordcount ( wc -c, wc -l <filename> ) to define the window size - & so will process any sort of text files.

Dependencies

xtail.pl uses the utilities Err.pmFile.pm which may be found in $SC/perlmodules