gpt4 book ai didi

linux - Gnu 并行卡住,不提供输出

转载 作者:行者123 更新时间:2023-12-03 10:01:26 25 4
gpt4 key购买 nike

Parallel 似乎已正确安装,因为我能够运行基本的并行检查命令。

# parallel --version
GNU parallel 20161222
Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016
Ole Tange and Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
GNU parallel comes with no warranty.

Web site: http://www.gnu.org/software/parallel

When using programs that use GNU Parallel to process data for publication
please cite as described in 'parallel --citation'.

但是当我尝试在远程服务器上执行查询时,它不提供任何输出也不返回提示.. 例如:-

parallel ssh {} hostname :::: hosts
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication
please cite:

O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
;login: The USENIX Magazine, February 2011:42-47.

This helps funding further development; AND IT WON'T COST YOU A CENT.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.

To silence this citation notice: run 'parallel --citation'.

在上面的示例中,hosts 文件包含远程服务器 IP 的列表

即使是一个简单的parallel echo::: A B C 命令也会给出输出..

我尝试使用 /usr/bin/parallel 运行,但问题仍然存在..

当我使用 bash -x 运行命令时,出现以下错误:-

bash -x parallel ssh {} hostname :::: hosts
+ use IPC::Open3
/usr/bin/parallel: line 22: use: command not found
/usr/bin/parallel: parallel: line 24: syntax error near unexpected token `('
/usr/bin/parallel: parallel: line 24: `use POSIX qw(:sys_wait_h setsid ceil :errno_h);'

我检查过文件/usr/bin/parallel 对我来说似乎没问题。

无法为此找到解决方案。非常感谢任何帮助。谢谢。

UPDATE_1:-

root@sg-server:[~]:# parallel -Dall echo ::: 1
shell? perl /usr/bin/parallel -Dall echo ::: 1
shell? -bash
which -bash => shell path /bin/bash
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication
please cite:

O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
;login: The USENIX Magazine, February 2011:42-47.

This helps funding further development; AND IT WON'T COST YOU A CENT.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.

To silence this citation notice: run 'parallel --citation'.

Open file descriptors: 2 1
echo Context: Non: 4 Ctxgrp: NonCtxGrp: 1
echo ▒<▒> Context: Non: 4 Ctxgrp: 1 NonCtxGrp: 1
Wanted procs: 16
MultifileQueue->empty RecordQueue->empty CommandLineQueue->empty JobQueue->empty MultifileQueue->empty RecordQueue->empty eval 1
noncontext + command: 5
context+noncontext + command: 5
cmd_line->number_of_args 1
Replace echo ▒<▒>
Target: echoTarget: ▒<▒>Replacing in ▒<▒>
Return echo 1
noncontext + command: 5
context+noncontext + command: 5
noncontext + command: 5
context+noncontext + command: 5
6 == 6 echo 1
Time to fork 1 procs: 0 (processes so far: 1)
MultifileQueue->empty 1 RecordQueue->empty 1CommandLineQueue->empty 1JobQueue->empty 1 RecordQueue-unget ''
JobQueue->empty Limited to procs: 1
JobQueue->empty Running jobs before on ::
: has out of 1 jobs running. Start another.
JobQueue->empty Command to run on ':': 'echo 1'
processes . Starting (1): echo 1
bash -c testfun\(\)\ \{\ rm\ /tmp/parTMasE.tst\;\ \}\;\ export\ -f\ testfun\;\ perl\ -MIPC::Open3\ -e\ if\\\(\\\$pid\\\=::open3\\\(\\\$i,\\\$o,\\\$e,\\\"-\\\"\\\)\\\)\\\ \\\{\\\ wait\\\;\\\ \\\}\\\ else\\\ \\\{\\\ exec\\\(\\\"bash\\\",\\\"-c\\\",\\\"testfun\\\ \\\&\\\&\\\ true\\\"\\\)\\\;\\\ \\\} 2>/dev/null


^Ckill_sleep TERM
kill_sleep TERM
kill_sleep TERM
kill_sleep KILL

即使在运行 parallel -Dall echo::::1 命令时,我也必须按 CTRL+c 才能返回提示。

最佳答案

正如我们在注释中调试的那样,您的 (/usr/local)/bin/rm 不是正常的 (/usr/local)/bin/rm

关于linux - Gnu 并行卡住,不提供输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59783063/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com