Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Win7] net_io_counters bytes_sent and bytes_recv are always 0 #806

Open
rukechen opened this issue Apr 18, 2016 · 4 comments
Open

[Win7] net_io_counters bytes_sent and bytes_recv are always 0 #806

rukechen opened this issue Apr 18, 2016 · 4 comments

Comments

@rukechen
Copy link

Hi:

I got one issue on Win7.

My psutil version is 4.1.0.

I always got bytes_sent and bytes_recv with zero value.

How can I transform from packets_sent to bytes_sent?

{'isatap.{A9542735-8D16-4156-BFDF-531BC52EEF9B}': snetio(bytes_sent=0, bytes_rec
v=0, packets_sent=0, packets_recv=0, errin=0, errout=0, dropin=0, dropout=0), '
xb0\xcf\xb0\xec\xb3s\xbdu': snetio(bytes_sent=0, bytes_recv=0, packets_sent=1515
3, packets_recv=32484, errin=0, errout=0, dropin=0, dropout=0), 'Loopback Pseudo
-Interface 1': snetio(bytes_sent=0, bytes_recv=0, packets_sent=0, packets_recv=0
, errin=0, errout=0, dropin=0, dropout=0)}

@giampaolo
Copy link
Owner

I won't have time to look into this anytime soon but it looks like a C typing issue of some sort.

@giampaolo giampaolo changed the title [Win7] function net_io_counters(pernic=True) [Win7] net_io_counters bytes_sent and bytes_recv are always 0 Nov 13, 2016
@vmontes
Copy link

vmontes commented May 3, 2017

I have the same problem. I'm working at Win7 64 and I have some loopback network interfaces and would like to monitoring the packets of those, and I'm always getting 0. Would be very helpful to see the traffic of those network interfaces.

psutil 5.2.0

@giampaolo
Copy link
Owner

Are the values of all network interfaces set to 0? I also have different (virtual) NICs returning 0. Please paste the output.

@vmontes
Copy link

vmontes commented May 3, 2017

output from psutil.net_io_counters(pernic=True)

{'isatap.{A4BC3AC6-9BD2-4035-949A-D3B0516852E9}':snetio(bytes_sent=0L, bytes_recv=0L, packets_sent=0L, packets_recv=0L, errin=0L, errout=0L, dropin=0L, dropout=0L),
'internet':snetio(bytes_sent=8849823L, bytes_recv=16626352L, packets_sent=17546L, packets_recv=20409L, errin=0L, errout=0L, dropin=0L, dropout=0L),
'isatap.{2B826709-31EE-41E6-98BC-15B636B6F6F4}':snetio(bytes_sent=0L, bytes_recv=0L, packets_sent=0L, packets_recv=0L, errin=0L, errout=0L, dropin=0L, dropout=0L),
'isatap.{403D2B12-C944-4419-BCF3-6C2474CA6F77}':snetio(bytes_sent=0L, bytes_recv=0L, packets_sent=0L, packets_recv=0L, errin=0L, errout=0L, dropin=0L, dropout=0L),
'isatap.{B849AADA-EB6A-4963-AC60-6FFD1D81E689}':snetio(bytes_sent=0L, bytes_recv=0L, packets_sent=0L, packets_recv=0L, errin=0L, errout=0L, dropin=0L, dropout=0L),
'Dev':snetio(bytes_sent=0L, bytes_recv=0L, packets_sent=0L, packets_recv=0L, errin=0L, errout=0L, dropin=0L, dropout=0L),
'Loopback Pseudo-Interface 1':snetio(bytes_sent=0L, bytes_recv=0L, packets_sent=0L, packets_recv=0L, errin=0L, errout=0L, dropin=0L, dropout=0L),
'VirtualBox Host-Only Network':snetio(bytes_sent=0L, bytes_recv=0L, packets_sent=0L, packets_recv=0L, errin=0L, errout=0L, dropin=0L, dropout=0L),
'loopback1':snetio(bytes_sent=0L, bytes_recv=0L, packets_sent=0L, packets_recv=0L, errin=0L, errout=0L, dropin=0L, dropout=0L),
'loopback2':snetio(bytes_sent=0L, bytes_recv=0L, packets_sent=0L, packets_recv=0L, errin=0L, errout=0L, dropin=0L, dropout=0L)}

Only the connected physical network interface is getting traffic data count. I'm sending and receiving data at the loopbacks 1 and 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants