Monitoring PcVue processes

8 Posts
3 Users
0 Likes
43 Views
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
Topic starter
 

Hi all,

I am looking for a software that is able to monitor several processes (i.e. sv32.exe, hds.exe, ...) and, if the process disappears it sends an email.
Do you know any?

Nico

 
Posted : 23/01/2021 12:36 am
e.mahaut
(@e-mahautarcinfo-com)
Posts: 270
Member Moderator
 

Hi Nico,

I have a real crazy solution, homemade. Please do not laugh.
On one hand PcVue can send emails. On the other hand there is an article about SvRestart.
Why not configuring a very simple project dedicated to send the email to who needs to be informed and on the real project monitor sv32.exe and start automatically the project sending the email.

Then, this project sending email also monitors sv32.exe in order to start the real on site project.
After the feedback of sending the email is OK, it turns off.

No other software needed :cheer:

Edouard

 
Posted : 25/01/2021 3:23 pm
KASI
 KASI
(@k-simanjalamarcinfo-com)
Posts: 134
Estimable Member
 

Hahaha Edouard,

I had very similar idea to make use of SvRestart as well, but I did not think of starting a second project just to send email, that is brilliant.
My idea was to send email using external code, when SvRestart detects sv32.exe is down, so of course yours is better.

I also have idea for enhancement to your idea, when PcVue shutdown, before down, write or create an empty file, or probably write the last user logged in (@USER).
So if PcVue crash, we will not have that file.
After PcVue start, it will delete this file.

In this case, when your 2nd project starts, you can check the existence of this file, and send email accordingly to say :
1. If the file exist, send email saying PcVue was shut down by user XXX (based on content of the file)
2. If the file does not exist, send email saying PcVue crashed

By the way, do you know if SvRestart checks only for sv32.exe, or also for HDS.exe? I think it is only for sv32.exe.

Thanks,
Kantha

 
Posted : 25/01/2021 3:31 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
Topic starter
 

Done !
I made a small program that is doing the job.

If you need it one day you can ask me. For internal use only...

Nico

 
Posted : 29/01/2021 8:58 pm
e.mahaut
(@e-mahautarcinfo-com)
Posts: 270
Member Moderator
 

Hi,

Actually, in the sample code, SvRestart uses GetCurrentProcessId from Kernel Lib, to only check 'itself' = Sv32.exe
I think it would be possible to get HDS.exe process by using GetProcessId.
The code should be changed accordingly but I guess the aim is to kill HDS.exe if present after project exit or while sv32 is not running anymore?
If so, it would be better if SvRestart always ends HDS.exe task before restarting the project.

Regards
Edouard

 
Posted : 01/02/2021 3:33 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
Topic starter
 

Hi,

Actually that's not really what I wanted originally. What we need is to monitor and alert when 1 of the process ran by PcVue crashed.
It can be sv32, hds, messaging, etc... And the goal is not to restart it automatically but just alerting.

The good use case is our Online demo: 1 PcVue is running as a service on a VM in Azure with a demo project. It is used by our sales to demonstrate PcVue or directly by potential customers to see what is PcVue. So, the project must be operational 24h/7d meaning we must be alerted if something is wrong.

As said, I did the software (Staying Alive) and it is running now in our Demo online. It is not perfect but makes the job 🙂

Nico

 
Posted : 01/02/2021 4:28 pm
e.mahaut
(@e-mahautarcinfo-com)
Posts: 270
Member Moderator
 

My previous post was only to answer Kantha's remark:
"By the way, do you know if SvRestart checks only for sv32.exe, or also for HDS.exe ? I think it is only for sv32.exe"

 
Posted : 05/02/2021 8:36 am
KASI
 KASI
(@k-simanjalamarcinfo-com)
Posts: 134
Estimable Member
 

Ah thank you Edouard, I got the answers now 🙂

And I think the program icon that Nico did looks pretty cool.

Thanks
Kantha

 
Posted : 05/02/2021 10:25 am