http://qs321.pair.com?node_id=1177240


in reply to Re^2: Capacity Planning
in thread Capacity Planning

The first step is to clearly lay out how you would go about doing it yourself.

Then break that description down to steps simple enough for a 3 year old to follow.

You'll want to look into opening a file, <$reading> a line at a time to get your IP addresses, chomping off the CRLF at the end of each line so you have only the IP, useing probably Net::Ping or a similar module to do the pinging for you, and then printing the results, either to screen or a file.

Replies are listed 'Best First'.
Re^4: Capacity Planning
by VinsWorldcom (Prior) on Dec 05, 2016 at 19:39 UTC

    With respect, not sure if Net::Ping will work based on how I'm reading the OP. As I understand it, he wants to log into a device and then issue the ping *from* that device. In the Cisco world, we call this "proxy ping" and there is an SNMP way to do this as well - connect to a remote device via SNMP, issue a ping from it to somewhere, and then get the results in SNMP reponse.

    Net::Ping would work if the ping was coming from the device where the script is running, but I think you'd need it locally installed on the remote machine or better, just use system or backticks to execute ping from the remotely connected to machine to the target.

    Of course, I could be misunderstanding the OP - without code or more detail, I'm just guessing as well.