如何记录 Windows 7 网络流量和网络流量MySQL 的磁盘使用情况?
我运行的是 Windows 7 Pro,并且有几台服务器正在运行。其中一台服务器是通过 Cygwin 制作的 SSH/文件服务器。我已经使用 syslog-d 在内部进行了日志记录设置;但是,它没有提供足够的日志记录。当用户连接到服务器时,我可以在 Windows 7 资源监视器中看到他/她,并显示他/她的 IP 地址以及发送/接收的数据量。当用户从文件服务器下载文件时,我还可以通过查看磁盘使用情况在资源监视器中看到他/她正在下载什么文件。
这里存在第一个问题:如何记录用户的IP地址、连接时间和连接时间。断开连接,他们下载了哪些文件,以及下载到 MySQL 数据库的速度是多少?
除了前面提到的服务器之外,我还使用 IIS 来托管网站,并且希望进行某种网络日志记录。
如果我能找到一个适用于这两个服务器的工具,那将是最好的解决方案。
我做了一些搜索,发现了一个名为 Snort 的程序,它看起来适用于网络方面,但不适用于磁盘使用。我对这个程序一点也不熟悉,但乍一看也许它可以完成我想做的部分事情?也许有更简单/更好的方法?
我对 MySQL 很陌生,对网络和磁盘日志记录知之甚少,因此非常感谢任何和所有帮助和指导。谢谢!
I'm running Windows 7 Pro and have a few servers running. One of the servers is a SSH / file server that was made via Cygwin. I already have logging setup internally using syslog-d; however, it does not provide adequate logging. When a user is connected to the server I can see him/her in the Windows 7 Resource Monitor and it shows his/her IP address as well as how much data is being sent/received. When a user is downloading a file from the file server I can also see in the resource monitor what file he/she is downloading by looking at the disk usage.
Herein lies the first question: How can I log users' IP address, the time they connect & disconnect, what files they download, and what their download speed was, to a database in MySQL?
In addition to the aforementioned server, I also use IIS to host a website, and would like to have some sort of networking logging.
If I could find a tool that would work for both of these servers that would be the best solution.
I did some searching and found a program called Snort that looks like it would work for the network side of things, but not for the disk usage. I'm not familiar with this program at all, but at first glance maybe it could accomplish part of what I want to do? Maybe there is an easier/better way?
I'm pretty new to MySQL and know very little about network and disk logging so any and all help and guidance would be much appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
高级 Web 统计在理解 IIS 日志文件方面做得非常好,虽然它会为您提供比您需要的更多的信息,但它肯定会为您提供您想要的信息。它是开源的,我的托管提供商将它用于我开发的 ASP.NET 站点。
至于将信息记录到 MySQL:
我假设您已经拥有或知道如何获取信息,并且您只想将其记录到 MySQL 数据库。
首先,您需要创建数据库。
第二,您需要适合您选择的编程语言的 MySQL 连接器。 MySQL ADO.NET 连接器非常出色且易于使用。我还假设您至少了解一种编程语言以及如何将其连接到数据库。如果没有,我推荐 C# 和 ADO.NET——它非常简单,并且在线有大量教程。
3、编写一个程序,在收到信息时将其发送到数据库。
Advanced Web Statistics does a pretty good job of making sense of the IIS log files, and though it will give you more information than you need, it will certainly give you the information you want. It is open source, and my hosting provider uses it for the ASP.NET sites I have developed.
As far as logging the information to MySQL:
I am assuming that you already have, or know how to get the information and you simply want to log it to a MySQL DB.
1st, you will need to create the database.
2nd, you need the MySQL connector for your programming language of choice. The MySQL ADO.NET connector is excellent and easy to use. I am also assuming you know at least one programming language and how to connect it to a database. If not, I recommend C# with ADO.NET-- it is super easy and there are plenty of tutorials online.
3rd, write a program to send your information to the database, when you receive it.