我正在使用端口转发来利用远程机器上的代理服务器。
远程机器主机名是remotemachine
. 代理正在侦听 8118 端口。我正在将此端口转换为本地端口 5223。
ssh -vvv -N remotemachine -L 5223:localhost:8118
Run Code Online (Sandbox Code Playgroud)
如果我不使用超过 10 个同时连接,当 ssh 冻结时,一切都很好。它不再通过端口转发发送数据。
即ab -c 10 -t 5 -X 'localhost:5223' 'http://www.google.ru/'
工作,但ab -c 20 -t 5 -X 'localhost:5223' 'http://www.google.ru/'
导致 ssh 冻结
MaxSessions 30
参数 in/etc/ssh/sshd_config
根本没有帮助。
我该怎么做才能消除这 10 个连接限制?
-vvv
输出中没有什么有趣的=(
我想将foobar
日志级别的程序中的日志消息保存err
到/var/log/foobar.log
rsyslogd 中的文件中。我怎样才能做到这一点?
这是我可以按程序名称过滤消息的方法:
:programname,contains,"foobar" /var/log/foobar.log
Run Code Online (Sandbox Code Playgroud)
这是我如何按日志级别过滤消息:
*.err /var/log/foobar.log
Run Code Online (Sandbox Code Playgroud)
但我不明白如何同时通过这两个过滤器进行过滤。