× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello Marc,

Am 02.03.2023 um 17:51 schrieb Marc Rauzier <marc.rauzier@xxxxxxxxx>:

I have used another way in the past to check IP stack status. It was required in order to start inetd service, which is used by PowerHA. If IP stack is not active, inetd did not want to start. However I am not sure that my way works properly in the context of a 150 system pretty slow ;-) .

:-)

In a modified QSTRUP program, I was using a ping with a high number of packets and wait time (time out on each packet). Something like PING NBRPKT(999) WAITTIME(5). I was pinging the default gateway IP address (which, of course, was allowing icmp requests).

On a side note, I think it's *very* bad habit to block ICMP for ostensibly security.

The PING command was running until both IP stack and interface are active, once the ping succeeds, or once 999 packets were sent. 5*999 is about 5000 seconds which sounds reasonable for IP and interface to get ready.

More than one hour should suffice, indeed. :-)

It can be changed however. The interest is that you do not have to write any loop for that.

Well, of course: The loop is happening inside the ping command. :-)

When the gateway becomes reachable, remaining of 999 packets will be sent quickly, and the ping command will end. You can, immediately after, start QSPL subsystem and start the writers with QSYS/QWCSWTRS program and start your applications.

I'd have expected ping to exit with an error immediately if TCP/IP isn't started. So this is a very interesting approach!! Need to tinker around with that idea! Thanks a lot for that!

There are API to help (for instance Retrieve TCP status), but a lot of them were introduced with V5R1.

Probably need to have a look. To not hard code any values, it would be nice to obtain the default gateway address but that's for sure contained in a PF. :-)

QWCSWTRS is doing a lot of things, when looking at it's source. :-)

Basically, using APIs, it produces a list of printers devices in a user space, browses this user space to retrieve the status of the device, and with some retries and delays, it starts the printer writer when the device is varied on. There is nothing inside related to IP.

I see. Thanks for the explanation!

:wq! PoC




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.