473,387 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Network Info

750 Expert 512MB
How do i get packets send and received by a pc...? i want to put that in database... i m totally stumped on this... Packets send and received like local area network... displays...
Jan 4 '08 #1
4 1286
PRR
750 Expert 512MB
How do i get packets send and received by a pc...? i want to put that in database... i m totally stumped on this... Packets send and received like local area network... displays...

I want to record the total number of bytes sent and received via my LAN or Network connection.
Jan 4 '08 #2
kenobewan
4,871 Expert 4TB
I read about someone trying to monitor network activity via the SnmpExtensionQuery API function within inetmib1.dll. HTH.
Jan 4 '08 #3
PRR
750 Expert 512MB
Heres some info i got.. with dotnet everything is piece of cake.. though i have a few doubt....
http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.ipglobalproperties.a spx
//program given here

http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.ipglobalstatistics.a spx
// and here


http://blogs.msdn.com/jackg/archive/2006/04/24/582565.aspx
http://community.inthehand.com/library/html/T_InTheHand_Net_NetworkInformation_IPGlobalPropert ies.htm

http://weblogs.com.pk/nasir/Default.aspx?p=4
//scroll down here

http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.aspx
// main msdn link for system.net

http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.ipglobalproperties.a spx
//program given here



bool b = true;
while (b)
{

IPGlobalProperties pro = IPGlobalProperties.GetIPGlobalProperties();
IPGlobalStatistics stat = pro.GetIPv4GlobalStatistics();


Console.WriteLine(" Received .....:" + stat.ReceivedPackets.ToString());

Console.WriteLine("Sent .....:"+stat.ReceivedPacketsForwarded.ToString());

Console.WriteLine("Packets with errors "+stat.ReceivedPacketsWithAddressErrors.ToString() );
string i=Convert.ToString( Console.ReadLine());

if (i == "0")
{
b = false;
}


}


the results i get is lil wayward when i compare with local area thing... Specially the sent items.... Maybe some dircarded messages and other stuff are cancelled there... still anyone can throw some light on this??
Jan 7 '08 #4
PRR
750 Expert 512MB
Can someone look into above question.... plz? lol..
Jan 18 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Alex Ang | last post by:
I have written the following VBScript program. It is stored into a file "map_drive.vbs". It successfully mapped to a network drive \\server1\data. Dim WshNetwork Set WshNetwork =...
5
by: SQLDBA | last post by:
Is there any third party s/w that lists SQL servers in a network and query more info about the server?
2
by: Tom Wells | last post by:
I have a little file upload page that I have been able to use to successfully upload files to the C: drive of LocalHost (my machine). I need to be able to upload to a network drive from the intranet...
3
by: Marcel | last post by:
Hello, I have a problem with accessing files on other computers in my network. The network is a Windows 2000 workgroup network and I have administrator rights.... This works (from the directory...
8
by: BJ | last post by:
Problem: How can I code up a client side process to detect if the network is available? Synopsis: I am writing ASP.NET input forms for a Panasonic Tuff book. The users will be walking around...
8
by: rongchaua | last post by:
Hi all, i would like now to disable and enable network adapter programmatically with c#. I have searched but found nothing useful. There's no topic about this problem. Has someone done with this...
0
by: Kyle Freeman | last post by:
Ive been experimenting with ways to discover computers on the network. Most of what I have tried is centered around looping through our network address ranges to discover the names of the...
1
by: maverickman4 | last post by:
background/setup info: so we have a network set up of about 23 computers including our server which is running windows 2003 standard. we have an incredible amount of traffic going to that server due...
10
by: gary0gilbert | last post by:
An unusual spin to this recurring disk or network error in a Terminal Server environment. Access 2000, Terminal Server 2000, file server is windows 2000. All users have a separate copy of the...
3
by: =?Utf-8?B?Q2hyaXN0aWFuIGZyb20gRnJhbmNl?= | last post by:
I want to write an aspnet aspx page This page : 1 - Connect to a net share \\server\c$ with credentials: user/password 2 - Read Directory info of this share 3 - Write these infos in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.