def stat_daily_site(self, start=None, end=None):
"""
Extracting statistics per site from start to end (unixtimestamps)
:param start:
:param end:
:return:
"""
unixend = int(time.time()) if end is None else end
unixstart = (unixend - 52 * 7 * 24 * 3600) if start is None else start
content = self.sitecmdjson('/stat/report/daily.site', {
'attrs': ['bytes', 'wan-tx_bytes', 'wan-rx_bytes', 'wlan_bytes', 'num_sta', 'lan-num_sta', 'wlan-num_sta',
'time'],
'start': unixstart,
'end': unixend
})
return self.response(content, inspect.stack()[0].function, 'Daily Statistics for site')
评论列表
文章目录