How to detect if a Windows app dies??

 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions How to detect if a Windows app dies??
# 1  
Old 12-05-2006
How to detect if a Windows app dies??

Hello All: I hope this is the right category...
I have a application (this app runs under java and jboss) that runs under Windows, it's started as a service. If that application should become disabled, crash or no longer function, what would be the best method for determining it is no longer running? If this was UNIX it would be a no-brainer I could simply watch for the pid or write a script to tickle the app. I don't think I have that luxury on Windows (Sever 2003,2000, XP)

Again Thanks all
# 2  
Old 12-05-2006
Actually, believe it or not you do have pid, but I have no great experience of windows, but I would expect that there is something in the APIs to get PIDs. My main concern would be ( from the last time I had to work with windows ) is that is is very difficult to get that kind of information after the fact if the process does not itself open a window.
# 3  
Old 12-06-2006
Quote:
Originally Posted by jimmyc
I have a application (this app runs under java and jboss) that runs under Windows, it's started as a service. If that application should become disabled, crash or no longer function, what would be the best method for determining it is no longer running?
You mention services. You can use net start to see if your service is currently up or not.
# 4  
Old 12-06-2006
Quote:
Originally Posted by reborg
My main concern would be ( from the last time I had to work with windows ) is that is is very difficult to get that kind of information after the fact if the process does not itself open a window.
Difficult - yes.
Very difficult - probably.

If you want to go down this way, you should look at the toolhelp32 api or use the psapi library. There are a couple of other ways as well. See Alex Fedotov's write up on the same.

Last edited by vino; 12-06-2006 at 11:03 AM..
# 5  
Old 12-07-2006
Thanks All: Our customer has asked for this request but it doesn't seem to be a "hot" topic for them. I'll go down that road if it becomes more of a issue. One thing I might be able to do,... Our application opens tcpip ports. I could poll that port ever 15 minutes if its gone then I might have a pretty good idea our app is toast. A netstat -a and search for our IP port "should" be pretty simple. I'll look into "net start" and see what that offers.

Hay... this is a GREAT site Keep up the good work !!!!
# 6  
Old 12-07-2006
Quote:
Originally Posted by jimmyc
Our application opens tcpip ports. I could poll that port ever 15 minutes if its gone then I might have a pretty good idea our app is toast.
Could you make a persistent connection, and wait for it to close?
# 7  
Old 12-07-2006
Hmm.. Good suggestion I'll have to think about that. Meanwhile.. I was looking at net start This may work... Cool Smilie Thx Vino
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Wuhan Coronavirus Status App for China - Rapid Prototype using MQTT and the IoT OnOff IOS App

With a little bit of work, was able to build a nice "Wuhan Coronavirus Status" app using MQTT and the IoT-OnOff app. More on this technique here: ESP32 (ESP-WROOM-32) as an MQTT Client Subscribed to Linux Server Load Average Messages The result turned out nice, I think. I like the look and... (10 Replies)
Discussion started by: Neo
10 Replies

2. OS X (Apple)

Detect active usb device used by app

I've searched a number of sites but thought I'd post it here. I'm want to a detect certain usb device (external camera) that is actively being used by an app on a mac. My search has led me through looking at the system events log to see if there is a ProductID indicator logged. The device is... (2 Replies)
Discussion started by: dallas88
2 Replies

3. OS X (Apple)

Can a ios app be developed on a windows or ipad?

hi, i want to start developing an ios app that can be used on iphone and ipad. can anyone guide me how to start? i saw that it can be developed only on a mac system.. but i dont have a mac system. i have an ipad 4 and a laptop with windows os? can i use one of these to start developing ios app??... (4 Replies)
Discussion started by: Little
4 Replies

4. UNIX for Dummies Questions & Answers

Windows app over Sun Fire 445?

Please, I have a professional application that run only over windows, but I have a Full Sun Fire 445 for that. Someone can sugest me about how to do? Wich S.O can be use. Thanks before hand. Please read the forum rules again. Rule #9 should be in your focus. Thank you! (9 Replies)
Discussion started by: abelop
9 Replies

5. Windows & DOS: Issues & Discussions

Controlling AIX processes remotely using a NET app on a Windows server?

I have a .NET application that remotely starts, stops, and gets status of Windows services and scheduled tasks. I would like to add the capability of starting, stopping, and getting status of remote AIX applications also. Based on some preliminary research, one option may be to use 3rd party .NET... (0 Replies)
Discussion started by: auser1
0 Replies

6. Windows & DOS: Issues & Discussions

Linux remote app on Windows

So I have been playing around with some code and thought I would tap the vast Linux knowledge here. My company has a bunch of servers running Linux on the Amazon cloud. I have created a Windows application in C++ that acts like a remote desktop to the Linux servers. When I run it it connects... (3 Replies)
Discussion started by: bobmanc
3 Replies

7. UNIX for Dummies Questions & Answers

FTP thru Unix doesn't auth usrname & pswd, but Windows app does - why?!

Strange one this... One of our contacts switched FTP servers, a different IP and now using port 2121 instead of 21. Changed the details in a Windows application using the username & password provided and it works no problem. Tried to FTP through Unix and although I can connect to the... (2 Replies)
Discussion started by: macca74
2 Replies

8. UNIX for Dummies Questions & Answers

simple app to communicate windows and linux/unix

Careful!!! This is a newbie question! Hello Community I'd like to develop a very simple application, on the one side (some windows pcs with a listener and sender) on the other side a linux server that does the same. Any suggestions about doing that? telnet, smbclient????? It must be... (3 Replies)
Discussion started by: ncatdesigner
3 Replies

9. Shell Programming and Scripting

Needing a line feed for windows app

I wrote a program to format data with awk. This file will goto a windows machine and loaded into a windows app. The vendor said adding a line feed would help, but it would work as is. I am already doing a /n, will putting on the /r give the windows person what he wants. Thanks. (5 Replies)
Discussion started by: benefactr
5 Replies
Login or Register to Ask a Question