1

I need to run an application with krenew, but the application also needs to receive a parameter via command line and I need to send its output to a file. From the documentation, it looks like this should do the trick:

krenew -t -- sh -c 'compute-job > /afs/local/data/output'

but, unfortunately, when I run the command below:

krenew -s -- sh -c './my_app config.xml > results/test.txt &'

the application just dies after a while and I can see from the output of ps aux that krenew is not running along with my_app. I am not sure what the parameter -t does, and as far as I can see, if I run krenew -s ./my_app, it works properly.

I hope someone can clarify this.

Update: If I remove the "&" character from the command (so it won't be detached from the console it works just fine, so I decided to run it in a SCREEN tab. While this is not the best solution, it does the job.

Mihai Todor
  • 222
  • 1
  • 3
  • 13

1 Answers1

4

Instead of running it in a screen session you should be able to use:

krenew -t -- sh -c './my_app config.xml > results/test.txt' &

Notice the & detaching krenew from your shell, but not your application from the spawned sh. The -t parameter fetches a AFS token along with your Kerberos ticket. You only need this if your command needs to access a AFS file system.

Secoe
  • 303
  • 2
  • 8
  • That is cool. It would have never crossed my mind that `&` needs to be applied to `krenew` instead of the process that I want to run... – Mihai Todor Dec 07 '12 at 13:49