Options issues "ts could not run the command"

705 views
Skip to first unread message

dkjkj

unread,
Feb 3, 2010, 8:05:39 PM2/3/10
to taskspooler
Hi

I have this and I do not understand why ts do not want to run. The
solution was to pack it into a script.
filer:~> ts -K
filer:~> sh -x ./flush daily
+ /usr/local/bin/ts -d '/usr/sbin/amflush daily -b -f'
0
filer:~> ts -t
ts could not run the command
filer:~> ts
ID State Output E-Level Times(r/u/s) Command
[run=0/1]
0 finished /tmp/ts-out.evR4t0 -1 0.00/0.00/0.00 && /usr/
sbin/amflus
h daily -b -f
filer:~> ts -K
filer:~> /usr/sbin/amflush daily -b -f
Warning: no log files found for tape A00031L3 written 2009-12-06
19:01:03
Warning: no log files found for tape A00030L3 written 2009-12-06
19:01:02

Is this a ts issue or just me?

Raúl Salinas Monteagudo

unread,
Feb 4, 2010, 5:19:31 AM2/4/10
to tasks...@googlegroups.com

2010/2/4 dkjkj <j...@jensen-net.org>

I have this and I do not understand why ts do not want to run. The
solution was to pack it into a script.
filer:~> ts -K
filer:~> sh -x ./flush daily
+ /usr/local/bin/ts -d '/usr/sbin/amflush daily -b -f'

Dear j...@jensen-net.org
This is the normal behaviour.  

You should remove the quotation marks, or prepend "sh -c ".

Otherwise, ts will try to execute a file called " '/usr/sbin/amflush daily -b -f' " without parameters.

Hope that helps.

Raúl

Lluís Batlle

unread,
Feb 4, 2010, 5:34:34 AM2/4/10
to tasks...@googlegroups.com
Hello dkjdkj,

As Raúl commented, 'ts' will take its arguments, and run them. In your
case, you pass *one single argument* (due to the single quotes), and
ts tries to run that single argument.

The first non-hyphened argument will be taken as the program to run,
and all the next arguments go for that program, not for ts. So you
don't need quotes for your case.

the 'sh -c' helps when you want bash to evaluate the expression at job
run time, not at job enqueue time. For example:

ts sleep 10
ts touch myfile1 myfile2
ts rm myfile* # the * is evaluated at enqueue time myfile1 and 2 are
still not created at enqueue time.
ts sh -c 'rm myfile*' # the * is evaluated at job run time, and will
remove the myfile files.

Good luck,
Lluís.

2010/2/4 Raúl Salinas Monteagudo <rausa...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "taskspooler" group.
> To post to this group, send an email to tasks...@googlegroups.com.
> To unsubscribe from this group, send email to
> taskspooler...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/taskspooler?hl=en-GB.
>

Reply all
Reply to author
Forward
0 new messages