完成后如何停止iperf服务器? [英] How can I stop iperf server when it finishes?

查看:2343
本文介绍了完成后如何停止iperf服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦客户端完成,该过程将自动关闭.我想在服务器端执行相同的操作,因为我想使某些进程自动化,但是服务器端完成但仍保持打开状态.

Once the client finishes the process is automatically closed. I would like to do the same thing in the server side, because I want to automatize some processes, but the server side finishes but remains open.

推荐答案

我认为这取决于版本.我可以代表 iperf 2 ,我们最近在其中添加了此功能.启动-server时,每个服务器"最终将有两个线程,一个侦听器线程和一个业务(接收器/服务器)线程.因此-t做一些事情,它设置侦听器线程超时和通信线程的时间.侦听器线程是流量线程的父级,因此它必须等待流量线程完成才能终止.

I think it depends on the version. I can speak for iperf 2 where we recently added this capability. When the -server is launched there will ultimately be two threads per the "server", a listener thread and a traffic (receiver/server) thread. So -t does a few things, it sets the listener thread timeout and the traffic threads' times. The listener thread is the parent of the traffic thread so it must wait for the traffic threads to complete before it can terminate.

示例:假设一个问题iperf -s -t 30将使侦听器停留30秒.如果在30秒内没有客户端出现,则服务器"将在30秒后终止.但是如果iperf -s -t 30之后20秒,则客户端连接,例如iperf -c <server> -t 30,那么侦听器/服务器将在终止之前停留20 + 30秒. (注意:客户端的-t <value>没有传递到服务器,因此server -t必须等于或大于客户端-t.)

Example: Let's say one issues iperf -s -t 30 which will keep the listener around for 30 seconds. If no clients present themselves within 30 seconds the "server" terminates after 30 seconds. But if 20 seconds after the iperf -s -t 30 a client connect, e.g. iperf -c <server> -t 30, then the listener/server will to stay around for 20 + 30 seconds before terminating. (Note: The client's -t <value> isn't passed to the server so the server -t needs to be equal or greater than the clients -t.)

这篇关于完成后如何停止iperf服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆