【发布时间】:2016-03-30 18:39:43
【问题描述】:
为什么this 脚本不能在 FreeBSD 上运行?我在 Centos 和 Debian 上运行了脚本,一切都很好。在 FreeBSD (10.2) 上,我遇到以下错误:
awk: syntax error at source line 1
context is
match($0, "^listen >>> queue:[[:space:]]+(.*)", <<<
awk: bailing out at source line 1
-0.9902
作为一个例子,这里是一些 php-form status 的输出:
pool: www
process manager: ondemand
start time: 29/Feb/2016:15:18:54 +0200
start since: 2083770
accepted conn: 1467128
listen queue: 0
max listen queue: 129
listen queue len: 128
idle processes: 1
active processes: 2
total processes: 3
max active processes: 64
max children reached: 1
slow requests: 0
在 Centos 和 Debian 上,当我运行时:
/path/to/script/php-fpm-check.sh "idle processes" http://127.0.0.1/status
我收到1,但在 FreeBSD 上出现上述错误。
【问题讨论】:
-
也许你应该向我们展示有问题的脚本:)
-
单词“this”中的超链接
-
我们需要一个最小示例来重现问题本身的问题。
-
我添加一些例子
-
我们对跟随某个恰好包含一些 awk 的 shell 脚本的链接不感兴趣。向我们展示问题本身中的 awk 脚本,然后我们将能够为您提供帮助。