#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
import datetime
import time
from an_report import *
global ndays
chart_data = ""
chart_min = 0
chart_max = 0
days = 0
total = 0
chart_hz = 440
chart_vt = 330
for i in sdkeys:
days += 1
if chart_data == "":
else:
msg = """\
<p>
Period: {0} - {1} ({2:d} days)<br />
url = "cht=lc&chs={0:d}x{1:d}&chg={2:d},{3:d}&chds={4:d},{5:d}&chxt=y,x&chxl=0:|0|{6:d}|1:|{7}|{8}&chd=t:{9}".format(ndays * sz, chart_vt, 7 * sz, 250 * (chart_vt // chart_max), chart_min, chart_max, chart_max, start_day, end_day, chart_data)
msg += """\
<!-- {0} -->
<img src=\"{1}\" alt=\"{2}\" /><br />""".format(url, fname, "Active catalog IPs over {0:d} day window".format(ndays))
print(msg)
if summary_file:
f.close()
for k in ebd:
if k in merge_entries_by_date:
for v in ebd[k]:
if not v in merge_entries_by_date[k]:
merge_entries_by_date[k].append(v)
else:
merge_entries_by_date[k] = ebd[k]
data = {}
for d in dates:
ip_counts = {}
data = {}
for d in dates[1:]:
try:
except KeyError:
# run through merge_entries_by_date[firstdate] and decrement
# advance firstn, set firstdate, firstdt to dates[firstn]
firstn += 1
# recalculate delta
report_section_begin("Active IP addresses")
print("<h3>Distinct IP addresses, by date</h3>")