how to transfer log files between servers and search these log files?

Hi Everyone,

I have one Windows server.
I have five Linux servers.
These five Linux servers produces log files.
Each log files contains informations such as domain name, first name, last name, etc.

Question 1: Can I write an ASP.NET application for the Windows server so that this ASP.NET application can transfer all the specified date
(from 05/22/2006 to 06/22/2006) log files from these five Linux servers to the Windowns server?  If so, how to write this ASP.NET application
for transfering log files?

Question 2: After we transfter all the log files from these five Linux servers to the Windows server, on this Windows server can I search all of
these log files for the specified information such as domain name, first name, last name, etc. and generate a report of the search results?
If so, how to write this ASP.NET application for doing the searching these log files?

If ASP.NET can not able to do Question 1 and Question 2. Then You can use any Windows Programming tool or language that you
feel comfortable with. Please let me know how. Thanks.

Thank you very much for your time and help in advanced!

Jimmy Lam
Tuesday, May 9th-2006

0
MayLam
5/10/2006 1:51:51 AM
📁 asp.net.getting-started
📃 91979 articles.
⭐ 3 followers.

💬 1 Replies
👁️‍🗨️ 725 Views

Hi,

if you have the log files accessible from a url, like you would request a normal html page, you could use the WebClient class which has several Download methods available to copy the files. I don't have any experience myself with network shares towards Linux operating systems but you could also try out laying a network share and use the Server.MapPath method.

For the second question you can read out files with the methods on the File class, which can be found in the System.IO namespace. After reading out you can use regular expressions, take a look at http://www.regexlib.com/, to filter out the data from the log files.

Grz, Kris.


Read my blog. Handy Firefox plugins for web developers.


Workaround for non working Mark as answer buttons.
0
XIII
5/10/2006 5:05:06 AM
Reply: