|
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).
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.
It can be changed however. The interest is that you do not have to write any loop for that.
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.
There are API to help (for instance Retrieve TCP status), but a lot of them were introduced with V5R1.
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.
As an Amazon Associate we earn from qualifying purchases.
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.