0

I'm using POE::Component::Client::Ping to ping multiple hosts with this example.

As I understand this sends one request to host. Is it possible to specify number of packets to ping like in ping -c 4 HOST?

David Ansermot
  • 6,052
  • 8
  • 47
  • 82
Massimo
  • 75
  • 10

2 Answers2

0

Yes, it is possible to send a ping with a non-standard payload size. Details here :

https://metacpan.org/pod/POE::Component::Client::Ping#OTHER-RESOURCES

mbsingh
  • 499
  • 10
  • 26
  • thanks, but I can't find there anything about number of packets – Massimo Mar 16 '15 at 08:11
  • Read the section marked with the subheading - **Payload => $bytes** – mbsingh Mar 16 '15 at 08:20
  • It seems the module you're using is more of a client than a simple command. Does the simpler Net::Ping help? http://perldoc.perl.org/Net/Ping.html – RichM Mar 16 '15 at 12:57
  • I have to ping 1500 hosts at once so I shifted to asynchronous way. – Massimo Mar 16 '15 at 13:15
  • @manpreetbhamba Payload or data bytes stands for bytes in packet, so thus one can control packet size. But how can exactly send 4 packets, for example? – Massimo Mar 16 '15 at 13:24
0

No, POE::Component::Client::Ping doesn't implement repetition logic. It just pings. I wrote it such that control of how it pings is almost entirely in your hands.

Rocco Caputo
  • 104
  • 3