如何在任务后台处理程序作业中将 stderr 与 stdout 分开

如何在任务后台处理程序作业中将 stderr 与 stdout 分开

task-spooler我正在尝试为发送到Ubuntu 20.04的作业获取一个单独的 stderr 输出文件。

这个命令工作正常:

tsp -Lfetcher sh -c 'curl -v https://google.com'

-E但我在分割 stderr/stdout 的选项上遇到了麻烦(每联机帮助页)。

tsp -Lfetcher -E sh -c 'curl -v https://google.com'

我希望简单地获得另一个文件/tmp/ts-out.VBjwOw.e,例如保存 stderr 的文件,以及/tmp/ts-out.VBjwOw保存 stdout 的文件。但是当我运行该命令时,任务立即失败(没有创建输出文件并且 E-Level 设置为 -1),并且我看到这样的输出写入/tmp/socket-ts.1000.error.

-------------------Error
 Msg: Reading the size of the name
 errno 0, "Success"
date Sat Dec 26 13:17:41 2020
pid 20358
type CLIENT
-------------------Warning
 Msg: JobID 9 quit while running.
 errno 2, "No such file or directory"
date Sat Dec 26 13:17:41 2020
pid 18784
type SERVER
New_jobs
<... more details about jobs>

软件包版本详细信息

$ tsp -V
Task Spooler v1.0 - a task queue system for the unix user.
Copyright (C) 2007-2016  Lluis Batlle i Rossell

$ dpkg -s task-spooler
Package: task-spooler
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 85
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Version: 1.0-1
Depends: libc6 (>= 2.15)
Description: personal job scheduler
 Task spooler is a Unix batch system where the tasks spooled run one
 after the other. Each user in each system has his own job queue. The tasks are
 run in the correct context (that of enqueue) from any shell/process, and its
 output/results can be easily watched. It is very useful when you know that
 your commands depend on a lot of RAM, a lot of disk use, give a lot of
 output, or for whatever reason it's better not to run them at the same time.
Original-Maintainer: Alexander Inyukhin <[email protected]>
Homepage: http://viric.name/soft/ts/

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

相关内容