Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I monitor for new events in a log?

Status
Not open for further replies.

Dadster

Programmer
Apr 2, 2001
6
US
We have products that monitor system log messages. I'd like to know how to do that. In fact, a way to monitor any started task's JESMSGLG would be a real boon. Anybody know how to do that? Thanks.
 
Get the size of the log-file every somany seconds?
(Assuming... a lot, I guess)

HTH,
TonHu
 
Thanks for your response. No, the size of the log is not what I want to monitor. What I'd like to monitor are the messages, themselves, so that I can respond to conditions as they occur.
 
Hi Dadster,

I think it would be helpful to everyone if you gave a bit more information about your system environment.

If you are using a mainframe of somesort, then the system documentation will most likely describe how the system broadcasts its messages - giving you clues on where to look.

An example. I am using a Tandem system (Guardian OS). The operating system automatically sends its messages to a special process. This process has a reserved name, which when it exists (the implementer decides to name their user written running program after this special process name), the OS sends it its messages. Programmers name their running code after this process in order to do exactly what you want to do.

For a different solution, I think TonHu is quite right in that, if you are reading (monitoring) the log file, a change in its size will tell you that there is new data to process - advance your record pointer, et voila! Good idea, indeed.

I have, in the past, used TonHu's suggestion on my system. The only difference was that my OS comes with a set of APIs that you can use when you need to be alerted to the presence of new data in a monitored file.

Dimandja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top