Jump to content

Need some direction on a project


CountyIT
 Share

Recommended Posts

I am kind of at a loss on where to start. I have written a program that logs results to a text file. One line at a time. It is as plain and simple as that. Now the boss has upped the ante. This progarm could be running on 300-400 computers scattered anywhere in the country. Now he wants a program that will merge all of these individual logs on each computer in to one big log at the home office. I am at a loss on where to start.

These logs are set to delete themselves when they reach 5MB in size and I don't want to copy the entire file to the home office. I was thinking along the line of somehow keeping track of which lines in the log were already transmitted so I can re-start the transmittal at any given point. Something along the line of a FIFO.

I also need a method of sending these "lines" in the log. Some are connected via VPN. Others just have internet. I am at a loss on where to start. I was looking at inet functions but it seems like they are only applicable to entire files. Any recommentions on where or how to start this little project?

Thanks!

Link to comment
Share on other sites

I would just send my log to a php page which would deal with it, or upload the whole file via ftp or http, or send each log line on the fly to web.

The options are almost boundless, but using web saves all kinds of tcp connections btween client and server and what not.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

I'm no expert, but the way I would approach it would be to get a web hosting service that you could use FTP.

1. When a user performs a task that creates a single log file, upload the log file.

2. On the home office server, have another program periodically check for newly uploaded files by FTP using _FTP_ListToArray.

3. Download & read the content of the log file and append it to the end of the "master" log file. Afterwards, check to see if the log file is over 5 MB and if so, delete the oldest entry using _FileWriteToLine with the option to delete the line(s) specified.

4. Delete the log files via FTP that you downloaded on step 3 so the next time you list files, you will have a clean slate.

No need for complicated databases and can be done without VPN on every computer. Just costs $5-10/month for cheap web hosting.

Edited by abberration
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...