Network statistics
Page 1 of 1

Author:  Henri [ Sat Nov 08, 2003 15:25 ]
Post subject:  Network statistics

Variables available:

NetStats.Adaptername0 Adapter name
NetStats.MTU0 Adapter MTU
NetStats.Speed0 Adapter theoretical speed
NetStats.TotalDownload0 Adapter total download
NetStats.TotalUpload0 Adapter total upload
NetStats.DownloadSpeed0 Adapter current download speed
NetStats.UploadSpeed0 Adapter current upload speed

By changing the number at the end of variable you can get statistics for different adapters on the system. All found network interfaces are listed to log.txt.

All info is read from this struct so if there's need more variables could be added.
typedef struct _MIB_IFROW {
  DWORD   dwIndex;    // index of the interface
  DWORD   dwType;     // type of interface
  DWORD   dwMtu;      // max transmission unit
  DWORD   dwSpeed;    // speed of the interface
  DWORD   dwPhysAddrLen;    // length of physical address
  BYTE    bPhysAddr[MAXLEN_PHYSADDR]; // physical address of adapter
  DWORD   dwAdminStatus;    // administrative status
  DWORD   dwOperStatus;     // operational status
  DWORD   dwLastChange;     // last time operational status changed
  DWORD   dwInOctets;       // octets received
  DWORD   dwInUcastPkts;    // unicast packets received
  DWORD   dwInNUcastPkts;   // non-unicast packets received
  DWORD   dwInDiscards;     // received packets discarded
  DWORD   dwInErrors;       // erroneous packets received
  DWORD   dwInUnknownProtos;  // unknown protocol packets received
  DWORD   dwOutOctets;      // octets sent
  DWORD   dwOutUcastPkts;   // unicast packets sent
  DWORD   dwOutNUcastPkts;  // non-unicast packets sent
  DWORD   dwOutDiscards;    // outgoing packets discarded
  DWORD   dwOutErrors;      // erroneous packets sent
  DWORD   dwOutQLen;        // output queue length
  DWORD   dwDescrLen;       // length of bDescr member
  BYTE    bDescr[MAXLEN_IFDESCR];  // interface description

Author:  Briseur [ Fri Dec 26, 2003 1:40 ]
Post subject:  Re: Network statistics

Would be it possible to have a plugin for emule.
I precise in graph!!! :P ??

Author:  DarkElf [ Sat Dec 27, 2003 4:08 ]
Post subject: 

you too wan't this?!?

Author:  Ch3p4cK [ Fri Jan 30, 2004 13:42 ]
Post subject:  How?

How can I use this plugin ?? It isn't a file!

Author:  Henri [ Fri Jan 30, 2004 17:18 ]
Post subject: 

The plugin file is included in the LCDInfo 0.6 package. When you run LCDInfo 0.6 all variables available are printed to the log.txt file in the LCDInfo directory. There you can also find the NetStats.* variables. They don't have describing names at the moment so you need to test yourself which variable corresponds to which network adapter. Then you can just put that variable in the screen configuration file.

Author:  mingingbollock [ Thu Apr 22, 2004 17:32 ]
Post subject: 

Just noticed a little quirk in this plugin, when your d/load total reaches 2000meg it then adds a minus sign to the front and starts counting backwards, 1999, 1998 etc, not a problem , but mighty confusing first thing in the morning.

Author:  Henri [ Sat Apr 24, 2004 10:10 ]
Post subject: 

I'll see if there is a bug in my plugin. Even if the problem comes from my plugin the limit of this counter will be 4000MB because MS is using the 32-bit DWORD used in the struct showed in the first post.

To get past this the plugin should somehow detect when the counter overruns and then use this information to give correct values.

Author:  mingingbollock [ Tue May 11, 2004 13:01 ]
Post subject: 

Sorry to be a pain again Henry lol, another little quirk, the netstats plugin doesn't update, in other words you have to either log online Before you have started lcdinfo or close lcdinfo and restart it to get my dsl stats, hope that makes sense lol
thanks again Henry and keep up the excellent work

Author:  Henri [ Wed May 12, 2004 21:32 ]
Post subject: 

Added to bugtracker...

Author:  croc4 [ Mon Dec 06, 2004 23:16 ]
Post subject:  Ip addr in Netstats plugin

It would be good to have the IP addr available from the netstats plugin ;-)

Page 1 of 1 All times are UTC + 2 hours
Powered by phpBB® Forum Software © phpBB Group