Redirecting progress bar output - SSH

This is a discussion on Redirecting progress bar output - SSH ; Hi there, I've lots of transfers done using scp running in batch mode with pub/priv keys authentication. As they are fully automated, I'm redirecting output to logs. That works just fine, but I would additionaly benefit from having progress bar ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Redirecting progress bar output

  1. Redirecting progress bar output

    Hi there,

    I've lots of transfers done using scp running in batch mode with
    pub/priv keys authentication. As they are fully automated, I'm
    redirecting output to logs. That works just fine, but I would
    additionaly benefit from having progress bar output also in the logs.
    However redirecting stdout and stderr doesn't seem to do the trick. Is
    there a way this can be done?

    Regards,
    TraSh.


  2. Re: Redirecting progress bar output


    In the previous article, TraSh wrote:
    > I've lots of transfers done using scp running in batch mode with
    > pub/priv keys authentication. As they are fully automated, I'm
    > redirecting output to logs. That works just fine, but I would
    > additionaly benefit from having progress bar output also in the
    > logs. However redirecting stdout and stderr doesn't seem to do the
    > trick. Is there a way this can be done?


    Go into the source tree, edit progressmeter.c, find the function
    can_output(). Change it to:

    static int
    can_output(void)
    {
    /* return (getpgrp() == tcgetpgrp(STDOUT_FILENO)); */
    return (1);
    }

    Rebuild from source, and run.

    Alternatively, add code for a custom flag to force progress meters and
    modify can_output to return 1 if that flag is set.
    --
    _+_ From the catapult of |If anyone disagrees with any statement I make, I
    _|70|___=}- J.D. Baldwin |am quite prepared not only to retract it, but also
    \ / baldwin@panix.com|to deny under oath that I ever made it. -T. Lehrer
    ***~~~~-----------------------------------------------------------------------

+ Reply to Thread