OS2World OLD-STATIC-BACKUP Forum

OS/2 - Technical => Utilities => Topic started by: runnindave on 2007.08.27, 23:26:00

Title: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.08.27, 23:26:00
Hello,

New to the OS\2 thing but am faced with an issue. We have an OS2 machine that connects to a local server. The OS\2 machine keeps dropping its wired network connection which makes us have to reboot it.

I found a utility called PWMON which is supposed to ping out to a remote location and if it fails to get a response it reboots the computer. I can get it to ping the local server, but if I disconnect the NIC it will announce it failed to connect forever without rebooting. It seems I need to run a web server on the box.

So can anyone think of a way to reboot an OS\2 Warp workstation if the network fails?

You guys are my last hope.
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.08.28, 03:09:12
I could... but I am not telling you how!!!

No, just kidding... give me a few (hours) and I will try to put together something for you and post it...

-Robert
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.08.28, 15:59:17
Hey Awesome, that would be great, unless....

there are two guys over your shoulder laughing as you wrote this... LOL.

So there is a way to ping our server, and if the ping fails ( due to network failure ) reboot. One thing I liked about the PWMON utility is that it would ping every 60 seconds and if the ping failed 3 times in a row it would reboot the machine. Too bad it doesnt work. This would be helpful if we had a temporary network outage or was replacing a switch or something like that.

Looking forward to your assistance.

Dave

Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: Robert Deed on 2007.08.28, 17:17:53
Wouldn't it be better to find out why the OS/2 machine keeps disconnecting from the network to begin with?  And, other then a driver not being properly loaded there should be no reason why you would need to restart the computer to get back on the network, it should be as simple as running a script which will take down the interface and start it again. 

Other the bad cables, i've never had any problems with any OS/2 servers which I have administered disconnecting.  I have had problems with the lan shares stop sharing, but that was a simple configuration problem, and since I changed to samba for my file sharing needs in OS/2 I haven't had any issues.  (needed over 2gig file support since my file server is used to archive 4.7gig dvd's)

Quote from: runnindave on 2007.08.28, 15:59:17
Hey Awesome, that would be great, unless....

there are two guys over your shoulder laughing as you wrote this... LOL.

So there is a way to ping our server, and if the ping fails ( due to network failure ) reboot. One thing I liked about the PWMON utility is that it would ping every 60 seconds and if the ping failed 3 times in a row it would reboot the machine. Too bad it doesnt work. This would be helpful if we had a temporary network outage or was replacing a switch or something like that.

Looking forward to your assistance.

Dave


Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.08.28, 17:23:28
Honest question,

However, we have addressed every other NIC, TCPIP stack, Network Hardware etc detail to this point. That is where I am now. After all has been addressed, the above solution is the best solution. We cant afford to spend money on new hardware and network equipment for this problem.

The OS2 Warp is running a legacy application that we use and it is important we keep it. Its just becoming a hastle having to reboot it all the time.

Thanks for your input.
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.08.30, 16:59:31
Hey, RobertM

Have you had a chance to look into this? Is there a direction to point me in to be of some assistance?

From what I have seen, one has to program in PASCAL to create OS\2 applications? Is this true?

I am a Visual Basic guy so Pascal was something I learned back in the day.

Anyway I could port a VB app and run it on my Warp computer?

Dave
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: Robert Deed on 2007.08.31, 18:04:02
You don't have to program in pascal, in fact the pascal compilers for OS/2 are about the most unsupported and outdated of any.

C/C++ helps more..

There is visualage basic for OS/2 however it is very old and wouldn't help in porting a VB app.



Quote from: runnindave on 2007.08.30, 16:59:31
Hey, RobertM

Have you had a chance to look into this? Is there a direction to point me in to be of some assistance?

From what I have seen, one has to program in PASCAL to create OS\2 applications? Is this true?

I am a Visual Basic guy so Pascal was something I learned back in the day.

Anyway I could port a VB app and run it on my Warp computer?

Dave


Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: Robert Deed on 2007.08.31, 18:07:03
Is the system trapping?  Do you have any logs?   Or is the system simply silently losing network connection.  When the connection is dropped are you just losing lan services or entire network io?  What is the hardware of the system.  Like I said, I would rather address the problem then simply work around it, there is a good deal of knowledge of OS/2 with various hardware available on this site, and it would help if we had all the information.  Again, a script could be made to do what you want, however if you have defective hardware the problem is most likely just going to become more frequent, and if it is a simple misconfiguration somewhere (or bad driver level) then it would make much more sense to fix that.

Quote from: runnindave on 2007.08.28, 17:23:28
Honest question,

However, we have addressed every other NIC, TCPIP stack, Network Hardware etc detail to this point. That is where I am now. After all has been addressed, the above solution is the best solution. We cant afford to spend money on new hardware and network equipment for this problem.

The OS2 Warp is running a legacy application that we use and it is important we keep it. Its just becoming a hastle having to reboot it all the time.

Thanks for your input.
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.08.31, 18:19:03
Thanks Robert

We have the same OS\2 setup on about three different computers in the test bed. For some reason, invisibly to me, they all exhibit the same behavior. They will run fine and then the IP connection just breaks off. Its something to do with software and deep inside the IP stack from what I have observed. Nothing in hardware seems to be the issue as we have used multiple cards and drivers. Its hard

Not being an expert in OS\2 I was not able to track down what was going on or what was causing the break. I had read somewhere that this is a known issue with OS\2 Warp ( one comment in some blog FWIW ) and there was no solution.

So my quick solution is to simply reboot when the machine drops its connection. I just have no clue on how to script this.

I have a REBOOT.exe file that works fine. If there was some script that could ping out every minute, and if the ping fails after the third ping, call the reboot.exe file.

that would be ideal for us.

Thanks for your time.

Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.08.31, 23:00:21
Sorry Dave,

I got a little busy with some work projects, but am looking into it.

Can you please provide me with the following info...

OS/2 (as of WSeB) had a "bug" in the original TCP/IP stack (which was fixed in later releases such as WSeB CP2 and CP2PF) that would cause the stack to lock and no longer route or respond to TCP/IP traffic if the machine received a certain type of attack/packets (I dont remember the specifics of the cause, but this might be your issue).

I run WSeB CP2PF (and have run the earlier releases) and once I switched to CP2 and CP2PF (or applied the TCPIP fixes to WSeB original) never ran into the problem you are describing again. I've run multiple websites from the same box - which handles ooodles of traffic (lots too! ;) ) and not experienced any issues since applying the fix or switching to a later release of WSeB.

I *had* a reboot tool I used to use (but can't find it - will rewrite it for you)  that I used for that and other situations... what I did was assign a machine an IP like this... XX.XX.XX.100, and then an alias on the same card for XX.XX.XX.150 - my second machine was XX.XX.XX.101 with no alias. If the second machine saw no response (via pinging the first) on IP XX.XX.XX.150, it would alias itself to that address and assume the functions of the first machine. The first machine, when rebooted would tell the second machine "I'm up... un-alias that IP" and then check to see when the 2nd machine dropped the alias. It would then alias itself to the .150 address and resume handling traffic.

I should be able to re-write that script so that it checks any other machine or location on the net, and failing a response, initiates a reboot. This can be handled a few different ways... either a simple ping utility that times out properly (some dont seem to, and just hang waiting for a ping response) or using something like wGet or Curl to retrieve a small page from someplace with a timeout - and if that timeout occurs, initiate a reboot.

So that brings up the next question... do you have a webserver on another machine that has a small page (or that you can create a small page on) that the script can attempt to access? If so, I can have a script written pretty quickly... it would use some custom stuff in REXX and the GetHTTP library (or wGet) from Hobbes.

But that brings up one final question... what version of REXX are you using? (ObjectREXX or Classic REXX)? ObjectRexx eventually crashes the REXX.DLL after an app is running for a long time using Stem Arrays - there is a better version on Hobbes that doesn't crash as quickly - but you may not need it depending on what version of Warp you are using (WSeB CP2PF and eCS 1.X DO show this problem - but unless you are using lots of REXX scripts that create a lot of Stem Arrays, you should have that problem... and if you are running CRexx and not ORexx, you wont run into the problem at all).

-Robert
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.04, 16:42:21
Hey, Glad you are still with me....

I will get anything you need.

I am using OS\2 Warp 4.0 (Internal Revision 14.062_w4)

There have been no upgrades to the existing Network stack. Here is why, this was an image created by a group that are no longer around for support.

Your Fail over Reboot tool sounds incredible. Not what we need here, but I know if you can make that fail over process work, I feel really confident that you can help me.

We do have a website that it can ping out to. Its an intranet web site.

Hmm, Rexx version...Not sure how to get it.

I REALLY appreciate your time on this BTW, I hope with a little direction, I can make this as easy and less time consuming for you.

Dave

Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.04, 21:52:03
Hey Dave,

OK... for the REXX thing (you definitely HAVE Rexx... it's just a matter of which one you are using - though on Warp 4 I dont think it matters)... all you need to do is open a command window and type the following:

Quoteswitchrx [ENTER]

It will come up with a few lines of info... hit "N" [ENTER] when it asks you to type yes or no... but read the screen... it will say something like this:

QuoteThis program will now replace the current Classic REXX interpreter of OS/2
with the Object REXX interpreter.

Enter 'Y' to continue, any other input will cancel this procedure.

The first line is the relevant one... tell me what that says...


Now, as for the machine and setup itself... you can grab OS/2 Warp 4 disks pretty cheap when you can find them on eBay... you are apparently running standard Warp 4.

There are a bunch of fixes for it, including a new TCP/IP stack... they are mostly all rolled into one package. You can grab Warp 4 FixPack 15 various places on the Internet and installing it is as easy as following the instructions. Then you can upgrade the TCP/IP stack as well - also pretty easily. I can help you through that process if you like - it will probably alleviate all of your issues... and as a backup I can write something to reboot the machine (and even do fail/fallover to another if you have a second machine that can take over). Keep in mind that if you try using a second machine as a backup, you have to be mirroring the data to it so that both machines keep current... without knowing more about your setup, the method of doing that would vary.

Let me know, and I will come up with something... I have a test script in the works. I'll adjust it as necessary.
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.04, 22:52:30
Hey,

OK I followed your instructions and we got the same identical first lines.

QuoteThis program will now replace the current Classic REXX interpreter of OS/2
with the Object REXX interpreter.

Enter 'Y' to continue, any other input will cancel this procedure.


Update, apparently a group of IBM experts could not narrow down this problem. All of the lastest IP stacks were upgraded to the latest version. The final statement was "Just reboot."

So we are back to this script. Hopefully we can automate the reboot and its sounds like you are close. I will say I am impressed with OS\2 and am not sure why it is not more common as an useful OS. Was it the Microsoft machine that hurt it? It seems like it may have been ahead of its time.

Thanks for your assistance with this RobertM.

Let me know if there is anything else you need.

Dave
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.04, 23:14:37
Hi Dave,

I will work on completing the script... though if you and your team are willing, I'd also like to try to resolve this problem. I've sent you a private message with my direct email address with requests for more information if you want to try to resolve this.

Basically, the problem you are having shouldn't be happening. I've run many servers on different OS's and found OS/2's stack to be one of the most reliable - even under horrendously heavy load. I just completed another load test on my Netfinity machine and shoved 100 simultaneous connections down it's throat totaling 140,000 connections when the test was done... neither the machine nor the TCP/IP stack cared in the least bit. All of the servers my company installs are running OS/2 or eCS, and after gigabytes worth of TCP/IP traffic and months of uptime, the only thing I have to go out to do at the clients' are clean dust from the machines. Some of my older machines were as "underpowered" as PII 300's that handled over 200,000 TCP/IP requests a day without issue.

So... basically what I am saying is (as far as TCP/IP is concerned) you should probably never have to reboot your machine. Ever.

So, what I propose is the following... I'll get the script done as a short term fix, and if you are willing, help you track down and resolve the issue so the script later becomes a non-issue.

-Robert
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.04, 23:22:13
Awesome!

As you said, I would prefer to implement the script first as a quick fix so we don't have to monitor these OS\2 boxes after hours. But it sounds like you are up for a challenge and it may be. I will setup a time to work with you on the fix and maybe we can solve the riddle.

Keep in mind that we are not able to provide consulting fees other than a six pack and some cheetoes. LOL.

Thanks again

Dave
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.04, 23:30:45
Quote from: runnindave on 2007.09.04, 22:52:30
Update, apparently a group of IBM experts could not narrow down this problem. All of the lastest IP stacks were upgraded to the latest version. The final statement was "Just reboot."

It IS possible that if JUST the TCP/IP stacks were upgraded, it could either make the situation worse or do nothing to alleviate it... IIRC some of the TCP/IP fixes had pre-requisites (such as updating MPTS, and/or installing fixpacks BEFORE updating the TCP/IP stack).
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.04, 23:37:23
Quote from: runnindave on 2007.09.04, 23:22:13
Awesome!

As you said, I would prefer to implement the script first as a quick fix so we don't have to monitor these OS\2 boxes after hours. But it sounds like you are up for a challenge and it may be. I will setup a time to work with you on the fix and maybe we can solve the riddle.

Keep in mind that we are not able to provide consulting fees other than a six pack and some cheetoes. LOL.

Thanks again

Dave

Don't worry Dave, like you will find of many of my brethren (and sisthren... ;) ) here, we just like to help out when we can... I've been very fortunate to be on the receiving end of that help numerous times, so I try to pay it forward where I can! Also, after experimenting with other Operating Systems - and sticking with Warp because of how it compares as a server... it frustrates me seeing problems like what you are experiencing (and like I have sometimes experiences as well) when I know the OS is capable of faaaar more - with less issues than anything else I have tested. Heck, after 15 years of running OS/2, I am still learning about what it CAN do, and finding that in the networking world, there is little it CANT... I just found out recently that it can be set up to do NAT - along with DHCP, DDNS and so much more... sometimes figuring it out or fixing an issue can be kinda daunting (still trying to figure out how to properly do NAT - and IBM's manual on it is toooooo thorough... a whopping 600 pages if memory serves.

So, to sum it up... not a problem at all... we'll get your machine automatically dealing with the issue first, then we'll get the issue resolved so it never happens again.

Oh... as a side question... are you running NetBIOS, or NetBIOS over TCPIP on the machine? If you aren't sure, I can tell you how to check...

-Robert
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.05, 15:53:01
I really appreciate the help on this. If you give me an address I can sure mail out some warm brewsky and Cheetoes Post haste ;D. I was playing around last night and learned a few more things about the OS. Nothing relevant to this issue other than I can't re-create the problem unless I unplug the NIC.

The goal is to learn more about this OS and the issue since I am sort of two weeks into this problem.

As far as NetBios, I am not sure, I know that my IP is static and DNS does work from it as it will resolve an Host name to IP. It does have a host name but is known primarily on the network as its IP.

So sorry, not sure.
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: Robert Deed on 2007.09.06, 00:10:40
Honestly, I've never seen any OS/2 revision demonstrate the problem you have had, the only thing I can think of (since this same problem is happening on 3 machines with the same configuration) is a bad network driver, or poorly written software causing some sort of problem.

Quote from: runnindave on 2007.09.05, 15:53:01
I really appreciate the help on this. If you give me an address I can sure mail out some warm brewsky and Cheetoes Post haste ;D. I was playing around last night and learned a few more things about the OS. Nothing relevant to this issue other than I can't re-create the problem unless I unplug the NIC.

The goal is to learn more about this OS and the issue since I am sort of two weeks into this problem.

As far as NetBios, I am not sure, I know that my IP is static and DNS does work from it as it will resolve an Host name to IP. It does have a host name but is known primarily on the network as its IP.

So sorry, not sure.
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.06, 01:08:53
Hmmm... or a cable looped on a hub/switch... forgot about that.

I've seen this problem besides on the first TCPIP32 stack... it was caused by having two (or more) switches with 2 cables going to them (effectively creating a sort of infinite loop)... eventually the stack bogs or shuts down...
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: Robert Deed on 2007.09.06, 03:15:57
Quote from: RobertM on 2007.09.06, 01:08:53
Hmmm... or a cable looped on a hub/switch... forgot about that.

I've seen this problem besides on the first TCPIP32 stack... it was caused by having two (or more) switches with 2 cables going to them (effectively creating a sort of infinite loop)... eventually the stack bogs or shuts down...

That should have adverse effects on other systems as well, in fact it usually makes dhcp break as well.

Wow... My first message base post from my iPhone
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.06, 04:17:10
True... but I dont know how his network is segregated or set up...
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.06, 16:01:57

Interesting you mentioned some software bug.....

OK, here's news. We have software that runs on these OS\2 boxes that is proprietary and has been around since 1995. This software communicates to our mainframe and is what is failing. The company that wrote the software was contacted years ago and they pretty much were out of business. So the issue was dropped and then "IBM" was brought in, and they couldnt solve the software issue.

So for the past 12 years, these computers were given Netop and when they failed they were remotely rebooted. There is the history and the mystery. I would have loved to have found this out weeks ago.

Why some automation software was not written to remedy this problem in the past I dont know. However, with your help, I hope we can do some automation.

Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.08, 22:30:43
Dave,

Try this and let me know if it works...

http://www.GeoCodeEngine.com/ReBoot.zip

Follow the (simple) installation instructions in the Zip File.

-Robert
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.10, 16:04:01
 ;D

Hey,

Let me give it a go. I will get back with you.

Thanks again for your time.... Especially on a Saturday. Hope it was raining! LOL.

Dave
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.10, 16:47:29
Well its a start right? Probably something I did... but no go...

First,

I copied and confirmed a copy of webrexx.dll in the C:\OS2\DLL directory

I copied the .exe file to the desktop

I have a parameter setup for the exe ( which I renamed to RONF.exe ) as
" 100 home.hurricanes.com/default.asp"

When I run it the app flashes and dissappears so I ran it in an OS2 Window and the error was:

215 +++ Parse Value SysCurPos() with rw cl;

REXX0043: Error 43 running c:\desktop\ronf.exe, Line 215 Routine Not found

27 +++ rtc = Sys_VioColor('Green Grey');


I tried variations of the URL and the time option but no go.

Dave
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.10, 16:51:47
Oh and let me add, I am running OS\2 as a Virtual PC on a Windows xp Host for testing. Shouldnt be a factor but just in case... ::)
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.10, 22:09:37
Hmmm... I forgot something... which is really sad, since I was just talking about DLL dependencies in another thread... I'm not loading the functions from a needed DLL... and I should be. I forgot they are auto-loaded on my system.

Fixed it... download it again and replace the EXE... the DLL is the same...

http://www.GeoCodeEngine.com/Reboot.Zip (http://www.geocodeengine.com/Reboot.Zip)

-Robert
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.10, 22:12:20
Quote from: runnindave on 2007.09.10, 16:51:47
Oh and let me add, I am running OS\2 as a Virtual PC on a Windows xp Host for testing. Shouldnt be a factor but just in case... ::)

No, I dont think it is a factor... the script simply calls OS/2's Reboot function... if it doesn't reboot your (virtual or otherwise) machine, let me know (some really old versions of OS/2 dont support calling the reboot function in this fashion - but it is rare - and if that is the/your case, there is another way I can get the machine to reboot).

Keep in mind it does not close any open sessions or anything... it just tells OS/2 to shut down the file systems and reboot.
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.10, 22:32:20
Thats Amazing :D We have success!!!

Man you did an awesome job on this. The GUI and all of that looks incredible. All in REXX code?

You have perputated the life of OS\2 in this dept with your help. THANK YOU THANK YOU THANK YOU.

So Who do I send the warm beer and Cheetos to?

Dave
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.10, 23:02:01
Hey Dave,

Glad it works... let me know if you need any additional functionality... also, don't forget to check your message box on the forums here for some more info that I need to help you prevent the need for the app...

And yes, most of it is written in REXX, with some OS/2 CmdLine calls, and calls to OS/2's REXXUTIL.DLL and two calls to Igor Pool's RexxWeb DLL [I didnt have the time to re-write the TCP/IP portion (though REXX does support it out of the box) from scratch, and couldnt find my old code, so Igor's work helped simplify that greatly].

-Robert
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.10, 23:33:17
Thanks I will,

I just figured out what you meant by my message box. I just saw that. I will check it out.

Its good to know there is a community of folks out there that still run this OS.

I can now sleep at night. LOL.

dave
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.11, 03:02:50
Hey Dave,

You might not be out of the woods yet... so let me know if the script successfully reboots your machine once the TCP/IP stack locks...

When the stack is running and there is no route, it will successfully reboot your machine... if the stack locks, I dont know (and cant test it since I cant get my TCPIP stack to lock) - but it is possible the app will wait for a timeout it never receives because of the locked stack condition.

So, let me know...

-Robert
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.11, 15:52:10
Well I have tested this on a single machine about three times.

I have an idea what you are talking about. It works however.

What it does is when I pull the NIC cable out it freezes for about 3 - 5 minutes then the reboot dialog comes up and it reboots. Thought that is what it was supposed to do.

If you think this might be a problem, I of course would be happy to test.

BTW, you should post this on the various utility sites out there, as I am sure this would be very useful to someone.

Dave
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.11, 21:03:54
Hi Dave,

That is exactly what it is supposed to do... it's waiting for a TCP/IP timeout (which isnt configurable in the TCP/IP routines... if I re-write them myself, I'll make them configurable). While waiting for the timeout it "hangs" the interface waiting on a return code... since I am not sure the exact amount of time of the timeout I didnt bother starting the getHTTP request in another thread... if I get bored one day, I may (that way I can have the interface indicate it is waiting for a timeout or response).

The problem that may still arise though, can't be simulated by unplugging the machine... hopefully though, the app will work in your situation... leave one of the machines up and let me know how it goes. If the TCP/IP stack actually hangs, it may never send the timeout (or the getHTTP request may hang waiting for a socket) - in which case the machine may not reboot. (get me a copy of your POPUPLOG.OS2 file so I can see what type of hang we are dealing with)...

If that happens, let me know... then I will rewrite it so that the getHTTP request is in a separate thread or process, and failing a response from that thread/process, initiate a reboot (this method should work no matter what TCP/IP failure there is - but will take a little more work to program).

Once the thing is fully usable (in multiple ways, such as test via ping, test via ftp, and has a full GUI interface, separate threads/processes for the connection test, alias failover support, and reporting to/from another machine support) I'll post it someplace (probably one of my sites or Hobbes).

-Robert
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.12, 16:40:23
Hey,

I have been testing and this thing is solid. It works great. So I thought I would show it to my Boss and she shot some holes into it.

What she wanted to see, is the possiblity of being able to execute the reboot app not all the time but only after hours. Sort of like a scheduled task in Windows. But here is where it gets worse, she wants to know if it can execute at a specific time, like 1 am, for 30 minutes, then turn off. Her argument is that these boxes dont need to be rebooted during the day.

I was not sure if Warp had the ability to execute scheduled tasks. Do you have an idea how to do this in Warp? I was wondering if a tweak might be possible to the app. I dont want to impose on your time and if you dont want to then I would understand.

Any input would be appreciated.

Dave
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: RobertM on 2007.09.12, 23:30:02
Pretty easy if I am understanding you correctly...

You simply want an app where you can tell it "Reboot every day at 01:00" or do you want an app that at 1AM checks for network connectivity for 30 minutes and reboots if needed? Either is doable... just let me know...
Title: Re: OS\2 Warp need to reboot if network connection drops (PWMON utility)
Post by: runnindave on 2007.09.12, 23:38:05
Hey Robert,

Can this app do brain surgery, because thats what I am going to need. LOL.

So I dont waste your extremely valuable time, I want to test the existing app with the production machines and we can see if this makes her happy.

She loves the green color BTW!  :D