pdm_webstat to have CSV output flag

Idea created by Kyle_R Employee on Aug 8, 2013

    * Give pdm_webstat the option to output data in a CSV, column format:

    Date, Time, Web Engine 1 data, Web Engine 2 data, Web Engine 3 data etc.
    ***   ***   ***                ***                ***

    * Bring pdm_webstat information within the web client GUI.
    * Distinguish between licenced and non-licenced user activity.
    * Bring graphing of above data into the interface.

    * Trouble-shooting performance issues can benefit from seeing user volume over time.
    * CSV format more useful to graphing and manipulating in Excel than list.
    * Customers interested in how close they are to licence limits.

    To make reporting over time easier, please add a "-c" option to
    the pdm_webstat command to output in CSV, column, format.
    BUSINESS CASE: It is often necessary in Support to graph:
       Number of users per webengine, against Time.
    The current output of pdm_webstat is a list view which does not allow
    easy data extraction and graphing:

    PDM_Webstat: Invoked at 08/17/2012 13:51:25

    Report from Webengine: web:MY_SERVER004:1
    Cumulative sessions so far = 0
    Most sessions at a time    = 0
    Currently active sessions  = 0

    Report from Webengine: web:MY_SERVER002:2
    Cumulative sessions so far = 4222
    Most sessions at a time    = 190
    Currently active sessions  = 106

    Report from Webengine: web:MY_SERVER002:1
    Most sessions at a time    = 198
    Currently active sessions  = 114

    Please add an output format which will give each result in CSV format, in
    pdm_webstat -c

    Date, Time, Webengine1 Name, Webengine1 Cumulative Sessions, Webengine1 Most
    Sessions, Webengine2 Currently Active Sessions,
    and continue along these headers for ALL webengines eg:

    Webengine2 Name, Webengine2 Cumulative Sessions, Webengine2 Most
    Sessions, Webengine2 Currently Active Sessions,
    WebengineN Name, WebengineN Cumulative Sessions, WebengineN Most
    Sessions, WebengineN Currently Active Sessions,

    with the data naturally being:

    08/17/2012, 13:51:25, web:MY_SERVER004:1, 0, 0, 0, web:MY_SERVER002:2,
    4222, 190, 106, web:MY_SERVER002:1, 9991, 198, 114

    TEST 1.
    This output should be able to be opened directly in MS Excel using
    CSV as input with "," as the seperator.

    TEST 2.
    If this command is run repeatedly and append output to a file, then it
    should be possible to graph the output with minimal manipulation.
    (That is, the header line may be repeated . . . or if there is an option
    to be used along with the -c you may choose to suppress the header line
    in the write, so that no manipulation of the resulting output file at all
    is needed).

    As the main aim is to graph user load per webengine over time, then
    bring this into the interface, with an Export option.

    Web Interface Option: Track webengine usage.

    Webengine checkbox - enable tracking for selected webengines.
    Write frequency - enable time period eg Every 1, 5, 10, 30, 60 minutes or
    24 hours. (Have a caution against low times under 10 minutes along the lines
    of "Should only be enabled after consulting Support.")
    Date range to monitor. (Optional? May be useful to specify period that
    this tracking will be on).
    Output location. (Optional? May be desirable to write to a file rather than
    storing in the MDB.)

    Extend pdm_webstat to distinguish between:
    * Licenced users. Those that consume a CA.olf licence compared to:
    * Users. Those that do not. (Employees, Customers, etc).
    Business reason: Total user load or licenced user load may be more important
    depending on the task at hand. Many clients want to know how many licences
    they are consuming over time, for example.