3 How it works
Justin Parsell edited this page 2022-03-01 16:56:26 -05:00

Logic

The program attempts to ping the requested device 5 times, and if it responds, report it up. Otherwise, report it down. It saves this information to the console as well as an outputed file, pingResults.csv.

Program flow

The program does the following

  1. The program attempts to read in from the file to a vector containing the device name and associated ip
  2. The program sets up the output file, ensuring that it exsists and writes header information
  3. The program iterates through each device and creates a runner job for each device
  4. The program creates a logging thread that handles writing to the console and appending to the file
  5. The program begins to execute the threads and writes the information out
  6. The program closes the execuation stack and the logging thread
  7. The program writes to the file and exits

Status information

The program attempts to ping each device 5 times, if more then 50% of the pings make it through, it reports the device as up. The pinging thread waits 5000ms or 5s before it considers a no-response.