It is important for computer network managers and administrators to know their networks' traffic patterns. For example, to see Louisiana Tech's Internet traffic statistics, visit this web page. The graphs shown on this page are drawn using discrete data collected by the Internet router and stored in a log file. The documentation for the log file format can be found here.
Write a C++ program that will read from an MRTG data file named internet.log and generate an appropriate curve fit for the outgoing and incoming traffic over the past seven days. Include in your report a graph showing the actual data and your curve fit for the actual data.
The skeleton program shown below illustrates some of the essentials needed to read data from the internet.log file (assuming it is located in the same folder as you program, e.g., c:\meen292\prog7), and to process Unix style time stamps.
#include <iostream>
#include <fstream>
#include <ctime>
#include <enmcpp.h>
using namespace std;
using namespace ENM;
int main(void)
{
time_t timeStamp;
struct tm *tblock;
ifstream logfile("internet.log");
logfile >> timeStamp;
tblock = localtime(&timeStamp);
cout << "Local time is: " << asctime(tblock) << endl;
}