http://www.perlmonks.org?node_id=1177233


in reply to Capacity Planning

Welcome to the Monastery, Aatus!

Please show us the code that you've written and are having issues with. We're here to help with code problems, not to completely do all of your work for you.

Replies are listed 'Best First'.
Re^2: Capacity Planning
by Aatus (Initiate) on Dec 05, 2016 at 15:39 UTC
    Wish I had a code to give you, again I am learning this from scratch and was hoping there was something out there already I could learn from.

      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.

        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.