Is there a way to obtain the total number of transmitted (TX) and received (RX) packets from a particular network interface in Windows NT/2000/2003/XP/Vista using WMI? If this is not possible with WMI and is possible using another method such as API call, please let me know.
> Is there a way to obtain the total number of transmitted (TX) and received > (RX) packets from a particular network interface in Windows > NT/2000/2003/XP/Vista using WMI? If this is not possible with WMI and is > possible using another method such as API call, please let me know.
Thank you for your reply. Can you be a little more specific as to which couter you are referring to in WMI? Is the counter below the network interface or part of Perfmon counters?
> yes you can with wmi. > but it is a counter ... ( uint32 => +- 4GB )
> "Frank" <b...@nospam.nospam> schreef in bericht > news:eCAYI%23WRGHA.4572@TK2MSFTNGP10.phx.gbl... >> Is there a way to obtain the total number of transmitted (TX) and >> received (RX) packets from a particular network interface in Windows >> NT/2000/2003/XP/Vista using WMI? If this is not possible with WMI and is >> possible using another method such as API call, please let me know.
Gary Chang Microsoft Community Support ====================================================== PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00 AM PST, February 14, 2006. Please complete a re-registration process by entering the secure code mmpng06 when prompted. Once you have entered the secure code mmpng06, you will be able to update your profile and access the partner newsgroups. ====================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ====================================================== This posting is provided "AS IS" with no warranties, and confers no rights. ======================================================
> Thank you for your reply. Can you be a little more specific as to which > couter you are referring to in WMI? Is the counter below the network > interface or part of Perfmon counters?
>> "Frank" <b...@nospam.nospam> schreef in bericht >> news:eCAYI%23WRGHA.4572@TK2MSFTNGP10.phx.gbl... >>> Is there a way to obtain the total number of transmitted (TX) and >>> received (RX) packets from a particular network interface in Windows >>> NT/2000/2003/XP/Vista using WMI? If this is not possible with WMI and is >>> possible using another method such as API call, please let me know.
I'm looking to capture the "total" number of packets "sent" and "received" by the interface/adapter (not looking for per second counters). In Windows 2000/2003/XP if you open the properties of the network interface there is a section called "activity" and shows the number of packets sent/received. I'm looking to capture this information, i.e. cumulative total packets.
Where is the information for the adapter properties being pulled from?
Thank you,
Frank
""Gary Chang[MSFT]"" <v-gar...@online.microsoft.com> wrote in message
> Gary Chang > Microsoft Community Support > ====================================================== > PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00 > AM PST, February 14, 2006. Please complete a re-registration process by > entering the secure code mmpng06 when prompted. Once you have entered the > secure code mmpng06, you will be able to update your profile and access > the > partner newsgroups. > ====================================================== > When responding to posts, please "Reply to Group" via your newsreader so > that others may learn and benefit from this issue. > ====================================================== > This posting is provided "AS IS" with no warranties, and confers no > rights. > ======================================================
>Where is the information for the adapter properties being pulled from?
I am afraid I don't find a WMI class which provide the TX and RX packet count you wants. But I know that data could be easily retrieved via the networking API. The MIB_IFROW structure's member--dwInUcastPkts and dwOutUcastPkts are the numbers of packets received and sent by a particular interface:
(Note: That sample program needs the Platform SDK's Iphlpapi.h and Iphlpapi.lib file )
Thanks for your understanding!
Best regards,
Gary Chang Microsoft Community Support ====================================================== PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00 AM PST, February 14, 2006. Please complete a re-registration process by entering the secure code mmpng06 when prompted. Once you have entered the secure code mmpng06, you will be able to update your profile and access the partner newsgroups. ====================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ====================================================== This posting is provided "AS IS" with no warranties, and confers no rights. ======================================================
>>Where is the information for the adapter properties being pulled from?
> I am afraid I don't find a WMI class which provide the TX and RX packet > count you wants. But I know that data could be easily retrieved via the > networking API. The MIB_IFROW structure's member--dwInUcastPkts and > dwOutUcastPkts are the numbers of packets received and sent by a > particular > interface:
> (Note: That sample program needs the Platform SDK's Iphlpapi.h and > Iphlpapi.lib file )
> Thanks for your understanding!
> Best regards,
> Gary Chang > Microsoft Community Support > ====================================================== > PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00 > AM PST, February 14, 2006. Please complete a re-registration process by > entering the secure code mmpng06 when prompted. Once you have entered the > secure code mmpng06, you will be able to update your profile and access > the > partner newsgroups. > ====================================================== > When responding to posts, please "Reply to Group" via your newsreader so > that others may learn and benefit from this issue. > ====================================================== > This posting is provided "AS IS" with no warranties, and confers no > rights. > ======================================================