mirror of
https://github.com/tgbot-collection/ytdlbot.git
synced 2024-11-10 09:12:45 +08:00
vnstat 2nd
This commit is contained in:
parent
831604881e
commit
6a54442241
1 changed files with 5 additions and 5 deletions
10
db.py
10
db.py
|
@ -40,6 +40,10 @@ class Redis:
|
|||
%s
|
||||
|
||||
|
||||
{vnstat_banner}
|
||||
%s
|
||||
|
||||
|
||||
{quota_banner}
|
||||
%s
|
||||
|
||||
|
@ -49,10 +53,6 @@ class Redis:
|
|||
|
||||
|
||||
{usage_banner}
|
||||
%s
|
||||
|
||||
|
||||
{vnstat_banner}
|
||||
%s
|
||||
"""
|
||||
|
||||
|
@ -114,7 +114,7 @@ class Redis:
|
|||
else:
|
||||
cmd = "/usr/bin/vnstat -i eth0".split()
|
||||
vnstat_text = subprocess.check_output(cmd).decode('u8')
|
||||
return self.final_text % (db_text, quota_text, metrics_text, usage_text, vnstat_text)
|
||||
return self.final_text % (db_text, vnstat_text, quota_text, metrics_text, usage_text)
|
||||
|
||||
def reset_today(self):
|
||||
pairs = self.r.hgetall("metrics")
|
||||
|
|
Loading…
Reference in a new issue