Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to alert when a program is down?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01496159
Message ID:
01496237
Views:
60
>>Hi,
>>
>>I have a program (VFP9) running on a custom computer 24/7. It is very important for the customer that the program never stops or that someone is alerted if it stops. But sometimes, for whatever reasons, it will hang. Is there a way to monitor the program from a Windows service or whatever other way?
>>
>>TIA.
>
>An easy and low tech way is to create a witness table in a share where you have something like
>
>
>ComputerName C(20), Heartbeat T, LastWrite T, HeartbeatRateInSeconds I, WriteGapInSeconds I ... other fields if you need
>
>
>Now your application writes the current date every HeartbeatRateInSeconds on the Heartbeat field, and if the application is also writing into some other tables, whenever it performs the write it also updates the LastWrite field (see below when you can use this).
>
>Then you write your monitoring application that just checks if the current time - Heartbeat is less or equal than the HeartbeatRateInSeconds, if it is not then you know that something happened to it and you can take action. The second optional test is mainly if your data depends on an external source, in our case we have several applications that receive data thru the serial port and writes into a table, and by defining the minimum rate we expect data to come (I called WriteGapInSeconds) we know that if the current time - LastWrite greater than WriteGapInSeconds, there might be a problem with said external data, i.e the serial port connection was broken.
>
>One thing you need to take into account is that because the "Server" computer is different than the "Monitor" computer(s) you need to have the time of all of them in sync
>
>HTH
>Hugo

Thank you. I like the "low tech" approach. I will run it by the customer.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform