I need to trigger HighBandwidth and high disk read for my alert testing purpose. So does anyone knows any Linux command to trigger HighBandwidth(transmitted and received) at 70GB as well as disk read more than 50MB for testing purpose?
Asked
Active
Viewed 132 times
0
-
Just to confirm, you would like to *intentionally DDOS* one (or more) of your systems? – matigo Mar 29 '22 at 08:30
-
No, it's for grafana purpose. I have the queries to trigger but dont know how to trigger them. – Lingesh kumar Mar 29 '22 at 08:42
1 Answers
0
You may trigger the highest possible bandwidth by sending /dev/zero from one computer to /dev/null in a different one directly connected. You may achieve this by using socat:
in one computer:
socat - TCP-LISTEN:9999 </dev/zero
in another one connected to it:
socat TCP:xxx.xxx.xxx.xxx:9999 - >/dev/null
where xxx.xxx.xxx.xxx is the IP of the other machine.
If you want to see which throughput you are having, you may use pv, which will print it:
socat TCP:xxx.xxx.xxx.xxx:9999 - | pv >/dev/null
Similarly you can read a very large file and discard it to /dev/null:
cat /very_large_file | pv >/dev/null
to trigger high disk read.
AndresR
- 103
- 3
-
Hello. Since the OP has not stated which version of Ubuntu they are running my comment may not be correct. I am running Ubuntu 20.04 there is no socat command. A complete answer would say where to get the command and how to install it. – David Mar 29 '22 at 09:31
-