473,659 Members | 2,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Real Time Monitoring of a live log file in VB

This seems to be a difficult concept, I am having a heck of a time finding
information on techniques for simply having a VB app essentially tail and
parse what it finds.

The parsing I can handle, and the actions based on the parsing I can handle,
but the simple piece of the puzzle to gather the info as it arrives in the
log file is eluding me.

The scenario is this. I have a tool that will send its updates every so
often to a web server. The source for its information will be log files
created by another tool that is running.

I really dont want to read in the whole log filel every update, there should
be a way to have the app monitor the file and read in line by line every new
addition as it arrives.

Am I making this way too difficult or is there a way to do this? I have
seen other applications do this, but it seems to be vbvoodoo.

Any help or pointers greatly appreciated.

DougB.

Jul 17 '05 #1
2 6361
way too difficult. There is no facility to only access those last read lines
as to VB the file is a single entity. You could try to store/remember the
byte-offset of the last read, and use that as the starting point for the
next, but one way or another you will be dealing with the entire file -
unless you nuke the file once processed and rebuild a new file containing
the data you've read - IOW a file you maintain based on the data you've
already processed. This gives you the final log as history plus restricts
the source file to new data.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"USENETSERV ER" <ye**@right.com > wrote in message
news:6Z******** *********@fe52. usenetserver.co m...
: This seems to be a difficult concept, I am having a heck of a time finding
: information on techniques for simply having a VB app essentially tail and
: parse what it finds.
:
: The parsing I can handle, and the actions based on the parsing I can
handle,
: but the simple piece of the puzzle to gather the info as it arrives in the
: log file is eluding me.
:
: The scenario is this. I have a tool that will send its updates every so
: often to a web server. The source for its information will be log files
: created by another tool that is running.
:
: I really dont want to read in the whole log filel every update, there
should
: be a way to have the app monitor the file and read in line by line every
new
: addition as it arrives.
:
: Am I making this way too difficult or is there a way to do this? I have
: seen other applications do this, but it seems to be vbvoodoo.
:
: Any help or pointers greatly appreciated.
:
: DougB.
:
:
:

Jul 17 '05 #2
Thanks for the answer, I asked the writer of an App that I thought had this
knocked and thats pretty much what he is doing. He uses a seek and tracks
the amount read so far, appending to that value as he goes unding hitting
the end of the file, then a timer kicks in and starts it all over again
going to the last read spot in the file and using that as the startting
point.

I thought there was a more direct route given the speed I have seen this and
others work, but there isn't I guess.

Thanks for the response
Doug B.
"Randy Birch" <rg************ @mvps.org> wrote in message
news:pV******** *******@news04. bloor.is.net.ca ble.rogers.com. ..
way too difficult. There is no facility to only access those last read lines as to VB the file is a single entity. You could try to store/remember the
byte-offset of the last read, and use that as the starting point for the
next, but one way or another you will be dealing with the entire file -
unless you nuke the file once processed and rebuild a new file containing
the data you've read - IOW a file you maintain based on the data you've
already processed. This gives you the final log as history plus restricts
the source file to new data.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"USENETSERV ER" <ye**@right.com > wrote in message
news:6Z******** *********@fe52. usenetserver.co m...
: This seems to be a difficult concept, I am having a heck of a time finding : information on techniques for simply having a VB app essentially tail and : parse what it finds.
:
: The parsing I can handle, and the actions based on the parsing I can
handle,
: but the simple piece of the puzzle to gather the info as it arrives in the : log file is eluding me.
:
: The scenario is this. I have a tool that will send its updates every so
: often to a web server. The source for its information will be log files
: created by another tool that is running.
:
: I really dont want to read in the whole log filel every update, there
should
: be a way to have the app monitor the file and read in line by line every
new
: addition as it arrives.
:
: Am I making this way too difficult or is there a way to do this? I have
: seen other applications do this, but it seems to be vbvoodoo.
:
: Any help or pointers greatly appreciated.
:
: DougB.
:
:
:


Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
9461
by: | last post by:
I've trolled the lists, FAQs, and Net as a whole, but can't find anything definitive to answer this. We're looking for real-time graph capability (bar, line, etc), so that we can display telemetry from a robot system. There are a bunch of packages out there, but many seem to provide only static graphs (e.g. for scientific, financial data, etc). Does anyone currently display real-time telemetry using Python? Can anyone provide any...
24
5442
by: omlet | last post by:
omlet v4) wrote in message Dear DBA, You are cordially invited to test and review our windows native and 100% pure Java Oracle 9i/8i Monitoring Application (OMLET). OMLET is the Ultimate Visual Real Time Oracle Monitoring Tool. As the leading expert in your field, your opinion is highly valued and your feedback is very appreciated. We would like to encourage you to distribute copies of OMLET to your associates and fellow DBAs. Omlet can...
2
1504
by: Benny | last post by:
Hi, A client of us asked to write a script to View live visitors as they browse her website and to get the information such as, what page they are viewing, what browser type they are using, IP address/host name, visitor time on site and screen resolution. Is this possible in ASP scripting without a server side or client side application? How to get the realtime stats of a visitor? Any ideas will help us much.
1
2433
by: Evan Smith | last post by:
My database is suffering from poor performance of late. Reports that used to run in a reasonable time, now take a while. The explain output show that the query is fully indexed, and the statistics are up to date. Using a statement monitor I was able to determine that a particular query took 545 seconds of real time to run, yet only 19 seconds of CPU. According to my system monitoring tools, I had plenty of idle CPU cycles and free memory...
4
1553
by: Bob | last post by:
I've got dot net Winform apps that are running in a backroom server with no user interaction. They are supposed to run unattended 24 7 365. They are IVR apps taking orders via telephony. Problem is nobody is looking at them to know if they are OK. They have err trapping built in and there's logging and tracing to log files, but nobody there looks at that. What I need is to find a way to advise one or more managers immediately when an app is...
30
3295
by: Raymond Hettinger | last post by:
Proposal -------- I am gathering data to evaluate a request for an alternate version of itertools.izip() with a None fill-in feature like that for the built-in map() function: >>> map(None, 'abc', '12345') # demonstrate map's None fill-in feature The motivation is to provide a means for looping over all data elements
10
3070
by: Martin Hughes | last post by:
Hi guys, I was wondering if anyone could give me some advice. I am looking to develop an ASP.NET application that will enable several workstations to access real time telemetry data received from a vehicle on a track. The data flow would be as follows: |-- Workstation 1
9
6866
by: Justin Rich | last post by:
looking for the best approach to reading a real time log file. The file gets updated pretty quickly, always appended to the end. do i really need to just keep re-opening the file and reading the end of it? I cant help but think there is a better way to go about this. any suggestions would be greatly appreciated. Thanks
2
1444
by: msdngroup | last post by:
Hi, All: Can you do something like cross-browser real-time message, remote JavaScript callback and monitoring browser states remotely? Can you ensure web browser running with super speed and much faster than AJAX? Can you execute asynchronus requests and block browser navigation buttons at the same time? See the latest version of SocketPro at www.udaparts.com for all of these
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8332
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.