Aren't most HTTP server jobs using the same name as the configuration member in QUSRSYS/QATMHINSTC? Those jobs are usually running in subsystem QHTTPSVR (that CAN be changed, of course).
And those config members each have a record like this -
-apache -d /www/apachedft -f conf/httpd.conf -AutoStartN
This says it is using Apache, there is an absolute path to the directory that has all that Apache needs, then a relative path inside that directory to the full configuration. Finally, whether the server starts automatically.
And isn't there an SQL service that has TCP/IP info? Yes, a few, under communications. Here's the NETSTAT_JOB_INFO view - you don't need to use the WHERE - if you don't have any IPV6 connections, no big dea.
SELECT * FROM QSYS2.NETSTAT_JOB_INFO
WHERE JOB_NAME like '%INSTANCENM%' ;
You will see local and remote port and IP address if a job is connected, and I think otherwise, the job is listening. If there's nothing there, you can probably start the thing up.
This is much easier than using the NETSTAT CL command.
This is just a quick remembrance - others will perhaps be able to give more info.
Regards
Vern
On Wed, 3 Apr, 2024 at 8:34 AM, Bryan Dietz <bdietz400@xxxxxxxxx> wrote:
To: midrange systems technical discussion
along with checking if the http jobs are running, maybe using this would
be an option to see if the port is listening...
https://www.scottklement.com/chksvr/
--
Bryan
gio.cot via MIDRANGE-L wrote on 4/3/2024 7:48 AM:
Hi all
I would need to check with a program, if an instance http is active or not ,
and then (if not active) start it; can some suggest me how to do this check
?
Thanks in adcance
Gio
As an Amazon Associate we earn from qualifying purchases.