Help save net neutrality! Learn more.
Close

STAF COPY while STAF running command in backg

Help
Mojo
2012-11-08
2013-06-12
  • Mojo

    Mojo - 2012-11-08

    Hey,

    I have a problem.
    The scenario is this :

    1. Run command that should run for 30 minutes (all output is referenced to a file), example :
    staf 10.7.81.104 PROCESS START SHELL COMMAND "C:\\QA\\Tools\\IPerf-1.7.0\\iperf.exe -u -c 226.7.78.137 -p 5011 -i 10 -T 2 -t 3600 -l 1470" STDERR "/tmp/err.8.57.29" STDOUT "/tmp/out.8.57.29"

    2. Run STAF COPY command to my local (linux) machine . Example :
    staf 10.7.81.104 FS COPY FILE "/tmp/out.11.12.25" TOFILE "/tmp/out.8.57.29" TEXT

    The problem :

    Running this with STAF in windows 2012 - doing no problems.
    Running this with STAF in windows 2008 R2 - causing the second step to free … It doesn't copy the file.. After awhile I'm getting RC:18 , which means that I cannot access afile that something is written to it. But when I'm trying manualy to copy the file with a regular Windows "copy" command - there is no problem to copy it.
    The strange this it happens on only Windwos 2008 R2…
    I tried it on few machines - same problem..
    Thanks for your help..

     
  • Sharon Lucas

    Sharon Lucas - 2012-11-08

    I assume in your example you had a typo as you showed that the PROCESS START request is creating file /tmp/out.8.57.29 on machine 10.7.81.104 in which case the FS COPY request should be copying file /tmp/out.11.12.25 (not file /tmp/out.11.12.25).

    I ran the following using STAF V3.4.11 (the latest STAF version) to try to recreate the issue on my Windows Server 2008 R2 x64 system (staf5c) but I could not recreate it.  Here are the commands that I ran.  I ran command "ping -t staf1f" where the -t options indicates to continuously ping the specified host.

    C:\>STAF staf5c PROCESS START SHELL COMMAND "ping -t staf1f" STDERR C:/temp/test.err STDOUT C:/temp/test.out
    Response


    5

    C:\>STAF staf5c FS COPY FILE C:/temp/test.out TOFILE C:/temp/test.out
    Response


    C:\>STAFLoop 25 staf5c FS COPY FILE C:/temp/test.out TOFILE C:/temp/test.out
    Total loops: 25
    Total time : 72.187
    Avg. time  : 2.887
    Loops/sec  : 0.346323

    C:\>

    Note that the STAFLoop command submits the specified STAF service request the specified number of times (e.g. 25) so it continuously was submitting a FS COPY request to copy the process stdout file to the local machine and it never failed.

     
  • Mojo

    Mojo - 2012-11-09

    Hey slucas,
    Thansk for your reply..
    I saw what you tried, but using ping isnt enough.
    You need to simulate heavy traffic.. My command write to the file more than 10 times a second.
    Ping has abreak of ~1 second between each ping, so thats why its not enough

     
  • Sharon Lucas

    Sharon Lucas - 2012-11-09

    I ran a process that continuously writes to stdout on Windows Server 2008 R2 x64 and ran it while continuously submitting FS COPY requests of the stdout file and it always works.  I cannot recreate the issue.

     
  • Sharon Lucas

    Sharon Lucas - 2012-11-09

    When your FS COPY request request RC 18 (File Read Error) what error message is in the result?

     
  • Mojo

    Mojo - 2012-11-11

    Hey,
    I can do a follow up and check the specific error message.
    My script is writing to the file 20 times a seconds, and it happens there.
    Any way, I did a workaround , by copying the file to temp file using windows command ("copy …") , but the problem is still there.

     

Log in to post a comment.