File not getting created on thread restart

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf File not getting created on thread restart

  • Creator
    Topic
  • #51238
    Benjamin Rubin
    Participant

    Here is the scenario:

    I have a thread that outputs to a file.  Every night there is a bash script that is kicked off by a cron job that stops the thread, moves the file elsewhere, and then starts the thread again.  The problem is that the file defined in the thread’s output file properties is not getting created.  When I arrive in the office in the morning and restart the thread using Network Monitor the file is created, although all the transactions during the night have been lost.

    Here is an excerpt from the script that I’m running:

    Code:

    #!/bin/bash
    site=”prodsite”
    process=”ADT”
    thread=”MYTHREAD_ADT_OUT”
    filepath=”/quovadx/qdx5.6/integrator/prodsite/filesout/mythread/thread.dat”
    fileout=”MYTHREAD`date -d ‘-1 day’ +%m%d%y`.txt”
    archivedir=”/home/hci/archive/mythread/”

    source /home/hci/.profile
    setsite $site

    hcicmd -p $process -c “$thread pstop”
    sleep 60

    mv $filepath $archivedir$fileout
    sleep 60

    hcicmd -p $process -c “$thread pstart”

    I have also tried using `touch` to create $filepath after I move the file, but the file still doesn’t contain any data by morning.

    Is there something else that I should be doing here?

Viewing 3 reply threads
  • Author
    Replies
    • #69312
      Sam Craig
      Participant

      Hey Benjamin,

      I had the same problem and had to add the below code to my script to

      get the file creation to work.  Had to “export” the cloverleaf site variables.

      ## Setup hci environment

      export ROOT=”/quovadx/qdx5.5/integrator”

      export FPATH=$FPATH:/quovadx/qdx5.5/integrator/kshlib

      export PATH=$PATH:$ROOT/bin

      export SITE=”pimprod”

      setroot $ROOT

      ## Run the setsite command to the region you want to process

      setsite $SITE >> /home/apollomd/process_apollomd_log

      Hope this helps…..

    • #69313
      Robert Milfajt
      Participant

      This sounds like a UNIX file protection issue.  Try putting this in to eliminate permissions:

      Code:

      > $filepath
      chmod 777 $filepath

      Hope this helps,

      Robert Milfajt
      Northwestern Medicine
      Chicago, IL

    • #69314
      Benjamin Rubin
      Participant

      Sam Craig wrote:

      Hey Benjamin,

      I had the same problem and had to add the below code to my script to

      get the file creation to work.

    • #69315
      Troy Morton
      Participant

      Why not just use fileset local and add a fileset tcl proc to do all your work natively in Cloverleaf whithout any cron scripts?

Viewing 3 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,125
Forums
28
Topics
9,294
Replies
34,439
Topic Tags
287
Empty Topic Tags
10