Y
Y
yvazik2017-06-16 16:29:52
bash
yvazik, 2017-06-16 16:29:52

How to write a script to check the speed to the host?

Help with writing a script. It is required to connect to the machine via pdsh and start the server ipref (pdsh -w [email protected] iperf -s) Then check the speed to the server and display the result. Something like:
res=`iperf -c 192.168.1.100 -d | tail -c17` echo ${res}
The output to the console should be only the speed, without any extra information. Either an error. After that, it is desirable to stop the server via pdsh.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2017-06-16
@shambler81

wait, I think we're doing the wrong thing.
what do you actually want to do with it?
1. What for pdsh, normal sh will go?
2. Why do you need to connect to this computer when you can measure it using wget, etc. There are a million options, moreover, you don’t need to set anything and protect passwords too.
3. who is preventing you from using prsoto ssh, which is able to execute commands on another server by itself?
Describe in more detail what you would like to end up with and what the idea is, maybe we will find a simple option. YES, and making your script is not difficult at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question