LCDInfo.com

http://www.lcdinfo.com
It is currently Tue Mar 19, 2024 13:49

All times are UTC + 2 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Network statistics
PostPosted: Sat Nov 08, 2003 15:25 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
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.
Code:
typedef struct _MIB_IFROW {
  WCHAR   wszName[MAX_INTERFACE_NAME_LEN];
  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
} MIB_IFROW,*PMIB_IFROW;


Top
 Profile  
 
 Post subject: Re: Network statistics
PostPosted: Fri Dec 26, 2003 1:40 
Offline

Joined: Mon Dec 22, 2003 10:23
Posts: 26
Hello!
Would be it possible to have a plugin for emule.
I precise in graph!!! :P ??


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 27, 2003 4:08 
Offline

Joined: Tue Feb 18, 2003 12:33
Posts: 118
Location: Angers, France
you too wan't this?!?

_________________
Shadows move where light should be


Top
 Profile  
 
 Post subject: How?
PostPosted: Fri Jan 30, 2004 13:42 
Offline

Joined: Fri Jan 30, 2004 0:24
Posts: 7
How can I use this plugin ?? It isn't a file!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2004 17:18 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 22, 2004 17:32 
Offline

Joined: Sat Apr 17, 2004 2:32
Posts: 106
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.
cheers
minging


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 24, 2004 10:10 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 11, 2004 13:01 
Offline

Joined: Sat Apr 17, 2004 2:32
Posts: 106
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
minging


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 21:32 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
Added to bugtracker...


Top
 Profile  
 
PostPosted: Mon Dec 06, 2004 23:16 
Offline

Joined: Wed Nov 10, 2004 8:46
Posts: 21
It would be good to have the IP addr available from the netstats plugin ;-)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group