Thursday, September 16, 2004

Of STDOUT and STDERR (non-geeks may wish to skip)

I'm working on a project that is restricting access to root on certain systems by proxying the access through an agent that gives each user ACLs and logs everything. One of the other admins, who handles the log monitoring system, is using the network aware shell to distribute, run and capture results of the parser.

Because the client agent is cross platform capable it does some post processing on STDOUT and STDERR to handle \n, \n\r and ^M as well as tabstops and errant whitespace. This is, of course, messing up the log monitor script which captures STDOUT and STDERR and runs diff against the previous results. If anything changes it alerts. Hmmm, since the post processing is inconsistent the whitespace and carriage returns never seem to match up. The monitor has been throwing erroneous "something changed" messages since the switchover.

So, we've had to go the brute force method of redirecting 2&>1 to a file, pulling the file back to the central server and diff'ing two files instead of a file and a filehandle. Not elegant for sure, but it's working...

0 Comments:

Post a Comment

<< Home