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 you know if Paradox is running?

Status
Not open for further replies.

pluscarden

Programmer
Jan 26, 2004
26
GB
I want to use Nagios to determine if a Paradox application is running on a remote Windows machine. The problem I have is that although the application is definitely running and appears in the Task Manager list as process pdxrwin.exe, it doesn't appear to have a process id attached to it. Consequently, the standard Nagios plugin I use assumes that there is no such process of that name actually running! Is there anything else I could check for (the existance of a file for example) that would indicate the app is up and running...something that obviously wouldn't be there when it's not running?
 
That should be pdxrwn32.exe, unless you are working with a 16 bit version, perhaps.

And that is Runtime.

My Task Manager definitely shows a PID attached to it when running.

Is the Paradox application yours to modify?

If so, why not write a profilestring to an .ini file or somesuch, and check that .ini file?

I'd say you could check for .lck files in the :pRIV: or :WORK:, but of course those can change far too often and easily to make them reliable.


Tony McGuire
 
Hi...can't recall the exact name of the process I saw running since it's on another computer that I currently can't see. But all I did was right click on the app that is definitely always running and then selected the "Go to process..." thingy and then it just highlighted the process in the process list. And it was something like pdxrwin.exe as I remember. But one thing I did notice is that, unlike all the other processes in the list, this one was indented (like there was a single space before thae actual process name) and the PID column was blank! And if I run my Nagios plugin to test for the process running it just comes back with "No processes found".

Unfortunately, it isn't my app to modify. But I guess I could try testing for the existance of a .lck file if that is the only other way of seeing if the app is up and running.

Thanks for your help. Much appreciated.
 
Did a bit more investigating and discovered there is a file C:\pfwrun5\private\changed.db that seems to exist when the app is running and disappear when it's not. So, I have just written a simple script that tests for the existance of this file. Seems to work a treat.

Many thanks for all your help.
 
Aaah! Paradox 5 for Windows Runtime. 16 bit version, as I suggested it might be.

No, 'changed.db' will only exist after a 'changeto' query has been run.

But if it is in the :priv: directory, it *should* get deleted when the copy of Paradox is exited.

However, this is a VERY bad/unreliable thing to base 'is Paradox running' on.

What if the changeto query isn't run during the current session? Paradox could definitely still be running.

What if the system crashes, or the user turns the system off/reboots it, while Paradox is running and the changed.db is there? Well, then the changed.db still exists when the computer reboots or is turned back on - but Paradox isn't necessarily running.

Or, if the user changes :pRIV: I don't think Paradox deletes that changed.db.

VERY bad way of trying to detect if Paradox is running.

Tony McGuire
 
Hmmmmmmm...yep, probably not the best solution. Kinda brings things full circle though.

Other than being able to test for the process running (which I can't 'cos there is no PID) and not having the luxury of the .ini thingy (this being an app written by a software company who I doubt are just gonna change something for my benefit) I don't really know what else to do. Unfortunately, I am not a Paradox expert (as you have probably gathered) so I am a bit in the dark with this thing. If this isn't gonna work then I guess I will just have to try and think of another solution. Thanks anyway.
 
Well, better than 'deleted.db' in that private directory, you could test for paradox.lck in the same location.

It is created when Paradox starts, and is deleted when Paradox exits.

It can definitely be left behind if the user shuts the system off with Paradox still running, or the system crashes. And should the user/app change the :pRIV: directory, the .lck file gets deleted.

But it is MUCH better than trying to work with 'deleted.db'. Likely in the high 90% range.

DISCLAIMER: I am reporting this behaviour using Paradox 9; I don't have any of the 16 bit versions. You should test that what I am reporting works the same way on your system(s).

Tony McGuire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top