Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh终端关掉就mqtt连接自动退出了,无法在后台运行 #201

Closed
ivanhxq opened this issue Jan 16, 2023 · 3 comments
Closed

ssh终端关掉就mqtt连接自动退出了,无法在后台运行 #201

ivanhxq opened this issue Jan 16, 2023 · 3 comments

Comments

@ivanhxq
Copy link

ivanhxq commented Jan 16, 2023

问题:
通过ssh连接主机,执行命令如下:
./emqtt_bench sub -h ip_addess -p 1883 -c 7500 -i 10 -t bench1/%i -q 0

一旦ssh终端断开,emqtt_bench创建的mqtt连接全部退出了,无法长时间测试
试过加参数:--log_to null,也没有

期望:emqtt_bench创建的mqtt连接能在后台运行,即使终端如ssh断开也不退出,用于长时间测试

@tigercl
Copy link

tigercl commented Jan 17, 2023

加个 & 就可以了:

emqtt_bench &

需要日志的话可以这样:

emqtt_bench > log.file 2>&1  &

@qzhuyan
Copy link
Contributor

qzhuyan commented Jan 24, 2023

try nohup

@qzhuyan qzhuyan closed this as completed Jan 24, 2023
@ivanhxq
Copy link
Author

ivanhxq commented Jan 29, 2023

这样才行:nohub emqtt_bench &
tks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants