Open GoogleCodeExporter opened 9 years ago
This reminds me of issue 204 (get NICs ip/subnet/broadcast/gateway addresses)
which we decided to reject:
http://code.google.com/p/psutil/issues/detail?id=204#c6
I believe this is pretty hard to implement on all platforms.
Also, the kind of network info you can extract change depending on the
platform; as such it's not immediately clear what API this should have.
Last: is this really useful? IMO, it isn't (can't think of a use case).
Original comment by g.rodola
on 30 Jan 2012 at 2:38
I use it to display alerts in Glances (https://github.com/nicolargo/glances).
For exemple, when the network bitrate of a 100 Mbps interface is higher than 70
Mbps then the stat is displayed using a WARNING color.
In Glances v2.0, i want to replace StatGrab by PsUtil :)
Original comment by nicolash...@gmail.com
on 30 Jan 2012 at 2:47
Interesting (and Glances looks like a nice tool).
So exactly what info are you proposing to extract from the NICs?
Just the bitrate? What do 'duplex' and 'up' parameters represent?
Being these per-NIC info only we should provide a new function (!= current
network_io_counters()).
Original comment by g.rodola
on 30 Jan 2012 at 3:12
I only use the maximum bitrate of the network interface.
I just create a wiki page for the Statgrab to PsUtil works:
https://github.com/nicolargo/glances/wiki/Study:-replace-StatGrab-by-PSUtil
Nicolas
Original comment by nicolash...@gmail.com
on 30 Jan 2012 at 3:17
Marking it as 'accepted'.
Ideally we'd have a nics_info() function (or network_ifaces_info() in order to
remain consistent with network_io_counters()) along these lines:
>>> psutil.nics_info()
{'lo':info(speed=100, up=True, duplex=2),
'eth0':info(speed=100, up=True, duplex=2),
... }
Still have to look into implementation details on every platform though.
Original comment by g.rodola
on 24 Feb 2013 at 10:32
I created a separate hg branch for this and started with the Linux
implementation committed as revision 60843072901f.
Original comment by g.rodola
on 3 Mar 2013 at 11:18
psutil has been migrated from Google Code to Github (see:
http://grodola.blogspot.com/2014/05/goodbye-google-code-im-moving-to-github.html
).
Please do NOT reply here but use this instead:
https://github.com/giampaolo/psutil/issues/250
Original comment by g.rodola
on 26 May 2014 at 3:08
Original issue reported on code.google.com by
nicolash...@gmail.com
on 30 Jan 2012 at 2:14