fixing bugs
This commit is contained in:
parent
de24de6913
commit
0d68c67697
@ -160,9 +160,10 @@ class Openvpn:
|
||||
assert self.interface in io_count, "cannot find interface, nic is not there"
|
||||
io_count = io_count[self.interface]
|
||||
open(self.io_stat_fp, "a").write(
|
||||
f"{datetime.utcnow().timestamp()},{io_count.bytes_recv},{io_count.bytes_recv}\n")
|
||||
f"{datetime.utcnow().timestamp()},{io_count.bytes_recv},{io_count.bytes_sent}\n")
|
||||
#command = ["ping", "-w", "1", "-c", "1", "8.8.8.8"]
|
||||
command = ["fping", "-C", "1", "-t200", "-q", "8.8.8.8"]
|
||||
command = ["fping", "-C", "1", "-t200",
|
||||
"-I", self.interface, "-q", "8.8.8.8"]
|
||||
p = subprocess.Popen(
|
||||
command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
result = p.communicate()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user