Skip to content

Commit

Permalink
interfacecount
Browse files Browse the repository at this point in the history
  • Loading branch information
1majom committed Oct 23, 2024
1 parent 804e5ba commit f725e03
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions good-try.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,12 @@ def get_video_duration(file_path):
for line in net_dev_output:
if any(interface_name in line for interface_name in interface_names):
stats = line.split(':')[1].split()
all_network_transmit_bytes += (int(stats[8])/ divider)
all_network_transmit_packets += (int(stats[9])/ divider)
if divider != 1:
print(f"transmit: {int(stats[8])} / {divider} = {int(stats[8])/ divider}")
# with our 720p test video around 726-900 bytes or around 20 packets of control info can happen on even inactive interfaces
if int(stats[8]) > 1100 and int(stats[9]) > 50:
all_network_transmit_bytes += (int(stats[8])/ divider)
all_network_transmit_packets += (int(stats[9])/ divider)
if divider != 1:
print(f"transmit: {int(stats[8])} / {divider} = {int(stats[8])/ divider}")



Expand Down

0 comments on commit f725e03

Please sign in to comment.