Discussion:
[hercules-390] hyperion cleaning
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-09 22:38:01 UTC
Permalink
Hi Ivan,
Please do a netstat -anp
I restored an original copy of hyperion so, I can do it now.

22:28:31 Stop 3270 TSO

On console:
S SHUTALL
$P JES2
Z EOD
QUIESCE

22::43:12 Stop 3270 CONSOLE

22:45:00 first netstat : http://www.stben.net/hercules/netstat1.txt

22:47:26 QUIT on hyperion console (nothing more on screen than in the log)
Log : http://www.stben.net/hercules/h1.txt

23:14:00 second netstat : http://www.stben.net/hercules/netstat2.txt

If you wish anything else ask; I'll keep this version for a couple of days.

- Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-09 23:07:04 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan,
Please do a netstat -anp
I restored an original copy of hyperion so, I can do it now.
22:28:31 Stop 3270 TSO
S SHUTALL
$P JES2
Z EOD
QUIESCE
22::43:12 Stop 3270 CONSOLE
22:45:00 first netstat : http://www.stben.net/hercules/netstat1.txt
22:47:26 QUIT on hyperion console (nothing more on screen than in the log)
Log : http://www.stben.net/hercules/h1.txt
23:14:00 second netstat : http://www.stben.net/hercules/netstat2.txt
If you wish anything else ask; I'll keep this version for a couple of days.
- Jean-Louis
Jean-Louis,

Between the 1st and 2nd netstat, the process id of the hercules process
has changed.

So it is safe to assume hercules was restarted by you or some automated
process.

--Ivan



[Non-text portions of this message have been removed]
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-09 23:30:19 UTC
Permalink
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
So it is safe to assume hercules was restarted by you or some automated
process.

Messages doesn't show any restart but I can show you what remains :

2442 tty1 S 0:00 hercules -f conf/zos.cnf
2444 tty1 S 0:00 /usr/local/bin/prt1403d /var/ibm/zos/prt/clD/ prt
2445 tty1 S 0:00 hercules -f conf/zos.cnf
2446 tty1 S 0:00 /usr/local/bin/prt1403h /var/ibm/zos/prt/clH/ prt
2447 tty1 S 0:00 hercules -f conf/zos.cnf
2448 tty1 S 0:00 /usr/local/bin/prt1403j /var/ibm/zos/prt/clJ/ prt
2449 tty1 S 0:00 hercules -f conf/zos.cnf
2451 tty1 S 0:00 hercules -f conf/zos.cnf
2452 tty1 S 0:00 /usr/local/bin/prt1403l /var/ibm/zos/prt/clL/ prt
2453 tty1 S 0:00 hercules -f conf/zos.cnf
2454 tty1 S 0:00 /usr/local/bin/prt1403o /var/ibm/zos/prt/clO/ prt
2455 tty1 S 0:00 hercules -f conf/zos.cnf

And it's impossible to connect using a 3270 emulation to those ghosts.

- Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-10 00:53:22 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
So it is safe to assume hercules was restarted by you or some automated
process.
2442 tty1 S 0:00 hercules -f conf/zos.cnf
2444 tty1 S 0:00 /usr/local/bin/prt1403d /var/ibm/zos/prt/clD/ prt
2445 tty1 S 0:00 hercules -f conf/zos.cnf
2446 tty1 S 0:00 /usr/local/bin/prt1403h /var/ibm/zos/prt/clH/ prt
2447 tty1 S 0:00 hercules -f conf/zos.cnf
2448 tty1 S 0:00 /usr/local/bin/prt1403j /var/ibm/zos/prt/clJ/ prt
2449 tty1 S 0:00 hercules -f conf/zos.cnf
2451 tty1 S 0:00 hercules -f conf/zos.cnf
2452 tty1 S 0:00 /usr/local/bin/prt1403l /var/ibm/zos/prt/clL/ prt
2453 tty1 S 0:00 hercules -f conf/zos.cnf
2454 tty1 S 0:00 /usr/local/bin/prt1403o /var/ibm/zos/prt/clO/ prt
2455 tty1 S 0:00 hercules -f conf/zos.cnf
And it's impossible to connect using a 3270 emulation to those ghosts.
- Jean-Louis
Jean-Louis,

What are those /usr/local/bin/prt1403 processes ?

--Ivan



[Non-text portions of this message have been removed]
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-10 07:41:50 UTC
Permalink
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
What are those /usr/local/bin/prt1403 processes ?
#********************************************************************
# Printers *
#********************************************************************
000E 1403 "| /usr/local/bin/prt1403a /var/ibm/zos/prt/clA/ prt"
000B 1403 "| /usr/local/bin/prt1403c /var/ibm/zos/prt/clC/ prt"
0004 1403 "| /usr/local/bin/prt1403d /var/ibm/zos/prt/clD/ prt"
0005 1403 "| /usr/local/bin/prt1403h /var/ibm/zos/prt/clH/ prt"
0006 1403 "| /usr/local/bin/prt1403j /var/ibm/zos/prt/clJ/ prt"
0007 1403 "| /usr/local/bin/prt1403k /var/ibm/zos/prt/clK/ prt"
0008 1403 "| /usr/local/bin/prt1403l /var/ibm/zos/prt/clL/ prt"
0009 1403 "| /usr/local/bin/prt1403o /var/ibm/zos/prt/clO/ prt"
000A 1403 "| /usr/local/bin/prt1403x /var/ibm/zos/prt/clX/ prt"

- Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-10 08:06:01 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
What are those /usr/local/bin/prt1403 processes ?
#********************************************************************
# Printers *
#********************************************************************
000E 1403 "| /usr/local/bin/prt1403a /var/ibm/zos/prt/clA/ prt"
000B 1403 "| /usr/local/bin/prt1403c /var/ibm/zos/prt/clC/ prt"
0004 1403 "| /usr/local/bin/prt1403d /var/ibm/zos/prt/clD/ prt"
0005 1403 "| /usr/local/bin/prt1403h /var/ibm/zos/prt/clH/ prt"
0006 1403 "| /usr/local/bin/prt1403j /var/ibm/zos/prt/clJ/ prt"
0007 1403 "| /usr/local/bin/prt1403k /var/ibm/zos/prt/clK/ prt"
0008 1403 "| /usr/local/bin/prt1403l /var/ibm/zos/prt/clL/ prt"
0009 1403 "| /usr/local/bin/prt1403o /var/ibm/zos/prt/clO/ prt"
000A 1403 "| /usr/local/bin/prt1403x /var/ibm/zos/prt/clX/ prt"
- Jean-Louis
Jean-Louis,

I am asking... *WHAT* are those commands ? Where do they come from ?
What do they achieve ?

--Ivan



[Non-text portions of this message have been removed]
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-10 08:36:42 UTC
Permalink
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Where do they come from ?
http://www.timpinkawa.net/hercules/prtspool.html

-Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-10 08:56:50 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Where do they come from ?
http://www.timpinkawa.net/hercules/prtspool.html
-Jean-Louis
Jean-Louis,

These are visibly modified versions of the use of prtspool. Where do
these modified versions come from ?

--Ivan



[Non-text portions of this message have been removed]
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-10 09:21:46 UTC
Permalink
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
These are visibly modified versions of the use of prtspool.
Where do these modified versions come from ?
Only the name has been modified and a copy for each printer.

-Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-10 12:16:13 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
These are visibly modified versions of the use of prtspool.
Where do these modified versions come from ?
Only the name has been modified and a copy for each printer.
-Jean-Louis
Jean-Louis

Odd.. Because that's not the command format for the prtspool command !

--Ivan



[Non-text portions of this message have been removed]
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-10 13:22:13 UTC
Permalink
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Odd.. Because that's not the command format for the prtspool command !
Do you like this one better?

On use :

22305 tty1 S+ 0:00 hercules -f conf/zos.cnf
22307 tty1 S+ 0:00 /usr/local/bin/prtd D /var/ibm/zos/prt/clD/ prt
22308 tty1 S+ 0:00 hercules -f conf/zos.cnf
22309 tty1 S+ 0:00 /usr/local/bin/prth H /var/ibm/zos/prt/clH/ prt
22310 tty1 S+ 0:00 hercules -f conf/zos.cnf
22311 tty1 S+ 0:00 /usr/local/bin/prtj J /var/ibm/zos/prt/clJ/ prt
22312 tty1 S+ 0:00 hercules -f conf/zos.cnf
22313 tty1 S+ 0:00 hercules -f conf/zos.cnf
22314 tty1 S+ 0:00 /usr/local/bin/prtk K /var/ibm/zos/prt/clK/ prt
22315 tty1 S+ 0:00 hercules -f conf/zos.cnf
22316 tty1 S+ 0:00 /usr/local/bin/prtl L /var/ibm/zos/prt/clL/ prt
22317 tty1 S+ 0:00 hercules -f conf/zos.cnf
22318 tty1 S+ 0:00 /usr/local/bin/prto O /var/ibm/zos/prt/clO/ prt
22319 tty1 S+ 0:00 hercules -f conf/zos.cnf
22320 tty1 S+ 0:00 hercules -f conf/zos.cnf
22321 tty1 S+ 0:00 /usr/local/bin/prta A /var/ibm/zos/prt/clA/ prt

After issuing quit:

22305 tty1 S 0:00 hercules -f conf/zos.cnf
22307 tty1 S 0:00 /usr/local/bin/prtd D /var/ibm/zos/prt/clD/ prt
22308 tty1 S 0:00 hercules -f conf/zos.cnf
22309 tty1 S 0:00 /usr/local/bin/prth H /var/ibm/zos/prt/clH/ prt
22310 tty1 S 0:00 hercules -f conf/zos.cnf
22311 tty1 S 0:00 /usr/local/bin/prtj J /var/ibm/zos/prt/clJ/ prt
22312 tty1 S 0:00 hercules -f conf/zos.cnf
22313 tty1 S 0:00 hercules -f conf/zos.cnf
22314 tty1 S 0:00 /usr/local/bin/prtk K /var/ibm/zos/prt/clK/ prt
22315 tty1 S 0:00 hercules -f conf/zos.cnf
22316 tty1 S 0:00 /usr/local/bin/prtl L /var/ibm/zos/prt/clL/ prt
22317 tty1 S 0:00 hercules -f conf/zos.cnf
22318 tty1 S 0:00 /usr/local/bin/prto O /var/ibm/zos/prt/clO/ prt
22319 tty1 S 0:00 hercules -f conf/zos.cnf

-Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-10 13:32:43 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Odd.. Because that's not the command format for the prtspool command !
Do you like this one better?
22305 tty1 S+ 0:00 hercules -f conf/zos.cnf
22307 tty1 S+ 0:00 /usr/local/bin/prtd D /var/ibm/zos/prt/clD/ prt
22308 tty1 S+ 0:00 hercules -f conf/zos.cnf
22309 tty1 S+ 0:00 /usr/local/bin/prth H /var/ibm/zos/prt/clH/ prt
22310 tty1 S+ 0:00 hercules -f conf/zos.cnf
22311 tty1 S+ 0:00 /usr/local/bin/prtj J /var/ibm/zos/prt/clJ/ prt
22312 tty1 S+ 0:00 hercules -f conf/zos.cnf
22313 tty1 S+ 0:00 hercules -f conf/zos.cnf
22314 tty1 S+ 0:00 /usr/local/bin/prtk K /var/ibm/zos/prt/clK/ prt
22315 tty1 S+ 0:00 hercules -f conf/zos.cnf
22316 tty1 S+ 0:00 /usr/local/bin/prtl L /var/ibm/zos/prt/clL/ prt
22317 tty1 S+ 0:00 hercules -f conf/zos.cnf
22318 tty1 S+ 0:00 /usr/local/bin/prto O /var/ibm/zos/prt/clO/ prt
22319 tty1 S+ 0:00 hercules -f conf/zos.cnf
22320 tty1 S+ 0:00 hercules -f conf/zos.cnf
22321 tty1 S+ 0:00 /usr/local/bin/prta A /var/ibm/zos/prt/clA/ prt
22305 tty1 S 0:00 hercules -f conf/zos.cnf
22307 tty1 S 0:00 /usr/local/bin/prtd D /var/ibm/zos/prt/clD/ prt
22308 tty1 S 0:00 hercules -f conf/zos.cnf
22309 tty1 S 0:00 /usr/local/bin/prth H /var/ibm/zos/prt/clH/ prt
22310 tty1 S 0:00 hercules -f conf/zos.cnf
22311 tty1 S 0:00 /usr/local/bin/prtj J /var/ibm/zos/prt/clJ/ prt
22312 tty1 S 0:00 hercules -f conf/zos.cnf
22313 tty1 S 0:00 hercules -f conf/zos.cnf
22314 tty1 S 0:00 /usr/local/bin/prtk K /var/ibm/zos/prt/clK/ prt
22315 tty1 S 0:00 hercules -f conf/zos.cnf
22316 tty1 S 0:00 /usr/local/bin/prtl L /var/ibm/zos/prt/clL/ prt
22317 tty1 S 0:00 hercules -f conf/zos.cnf
22318 tty1 S 0:00 /usr/local/bin/prto O /var/ibm/zos/prt/clO/ prt
22319 tty1 S 0:00 hercules -f conf/zos.cnf
-Jean-Louis
Jean-Louis,

Why do you rename the program ? This is introducing extra confusion...
Why not simply "| /usr/local/bin/prtspool X <dir> <pgm>" ?

--Ivan




[Non-text portions of this message have been removed]
Maarten Hoes hoes.maarten@gmail.com [hercules-390]
2017-03-10 15:39:43 UTC
Permalink
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Why do you rename the program ? This is introducing extra confusion...
Why not simply "| /usr/local/bin/prtspool X <dir> <pgm>" ?
--Ivan
Although I'm not a mind-reader, I fully assume it's because he doesn't
realize you dont *need* to rename the *executable* in order to have
multiple instances of it running concurrently.


- Maarten
somitcw@yahoo.com [hercules-390]
2017-03-10 15:47:36 UTC
Permalink
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
22305 tty1 S+ 0:00 hercules -f conf/zos.cnf
22307 tty1 S+ 0:00 /usr/local/bin/prtd D /var/ibm/zos/prt/clD/ prt
22308 tty1 S+ 0:00 hercules -f conf/zos.cnf
22309 tty1 S+ 0:00 /usr/local/bin/prth H /var/ibm/zos/prt/clH/ prt
22310 tty1 S+ 0:00 hercules -f conf/zos.cnf
22311 tty1 S+ 0:00 /usr/local/bin/prtj J /var/ibm/zos/prt/clJ/ prt
22312 tty1 S+ 0:00 hercules -f conf/zos.cnf
22313 tty1 S+ 0:00 hercules -f conf/zos.cnf
22314 tty1 S+ 0:00 /usr/local/bin/prtk K /var/ibm/zos/prt/clK/ prt
22315 tty1 S+ 0:00 hercules -f conf/zos.cnf
22316 tty1 S+ 0:00 /usr/local/bin/prtl L /var/ibm/zos/prt/clL/ prt
22317 tty1 S+ 0:00 hercules -f conf/zos.cnf
22318 tty1 S+ 0:00 /usr/local/bin/prto O /var/ibm/zos/prt/clO/ prt
22319 tty1 S+ 0:00 hercules -f conf/zos.cnf
22320 tty1 S+ 0:00 hercules -f conf/zos.cnf
22321 tty1 S+ 0:00 /usr/local/bin/prta A /var/ibm/zos/prt/clA/ prt
Why do you rename the program ? This is introducing extra confusion...
Why not simply "| /usr/local/bin/prtspool X <dir> <pgm>" ?
--Ivan
Although I'm not a mind-reader, I fully assume it's because he doesn't
realize you dont *need* to rename the *executable* in order to have
multiple instances of it running concurrently.
- Maarten
Is he running nine copies of:
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
at the same time without rename?
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-10 16:16:48 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
at the same time without rename?
These processes are the consequence of the Piped printer procedure (not
separate instances of hercules)... And could be the root cause of the
problem.

Apparently (but I haven't looked at the source yet), for a piped
printer, hercules forks (probably to establish the pipe file
descriptors), then forks again, the 3rd level process finally doing the
exec() (or one of the variants).

If any of those processes fails to see the pipe on the server side is
closed, the processes could linger forever, holding the file descriptors
initially opened by the server (including the bound sockets in listen mode).

--Ivan



[Non-text portions of this message have been removed]
Maarten Hoes hoes.maarten@gmail.com [hercules-390]
2017-03-10 16:30:14 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
22305 tty1 S+ 0:00 hercules -f conf/zos.cnf
22307 tty1 S+ 0:00 /usr/local/bin/prtd D /var/ibm/zos/prt/clD/ prt
22308 tty1 S+ 0:00 hercules -f conf/zos.cnf
22309 tty1 S+ 0:00 /usr/local/bin/prth H /var/ibm/zos/prt/clH/ prt
22310 tty1 S+ 0:00 hercules -f conf/zos.cnf
22311 tty1 S+ 0:00 /usr/local/bin/prtj J /var/ibm/zos/prt/clJ/ prt
22312 tty1 S+ 0:00 hercules -f conf/zos.cnf
22313 tty1 S+ 0:00 hercules -f conf/zos.cnf
22314 tty1 S+ 0:00 /usr/local/bin/prtk K /var/ibm/zos/prt/clK/ prt
22315 tty1 S+ 0:00 hercules -f conf/zos.cnf
22316 tty1 S+ 0:00 /usr/local/bin/prtl L /var/ibm/zos/prt/clL/ prt
22317 tty1 S+ 0:00 hercules -f conf/zos.cnf
22318 tty1 S+ 0:00 /usr/local/bin/prto O /var/ibm/zos/prt/clO/ prt
22319 tty1 S+ 0:00 hercules -f conf/zos.cnf
22320 tty1 S+ 0:00 hercules -f conf/zos.cnf
22321 tty1 S+ 0:00 /usr/local/bin/prta A /var/ibm/zos/prt/clA/ prt
Why do you rename the program ? This is introducing extra confusion...
Why not simply "| /usr/local/bin/prtspool X <dir> <pgm>" ?
--Ivan
Although I'm not a mind-reader, I fully assume it's because he doesn't
realize you dont *need* to rename the *executable* in order to have
multiple instances of it running concurrently.
- Maarten
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
hercules -f conf/zos.cnf
at the same time without rename?
I highly doubt that, but even *if* you would want to run 9 different
instances of Hercules at the same time, you could still easily do it
*without* renaming the executable binary: the magic that makes each
instance unique is in the settings in the different configuration files,
not in the name of the executable. So if you really wanted to, you could
easily do something like this :

hercules -f conf/zos1.cnf
hercules -f conf/zos2.cnf
hercules -f conf/zos3.cnf
hercules -f conf/zos4.cnf
hercules -f conf/zos5.cnf
hercules -f conf/zos6.cnf
hercules -f conf/zos7.cnf
hercules -f conf/zos8.cnf
hercules -f conf/zos9.cnf

Assuming that the actual settings in the all the configuration files
(zos1.cnf - zos9.cnf) differ in all the right places (directories, files,
ports, etc.) to make them unique (and don't conflict with each other).



- Maarten
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-10 13:52:35 UTC
Permalink
Hi Ivan
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Why not simply "| /usr/local/bin/prtspool X <dir> <pgm>" ?
Because I guess that prtspool isn't a reentrant program.

-Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-10 16:30:41 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Why not simply "| /usr/local/bin/prtspool X <dir> <pgm>" ?
Because I guess that prtspool isn't a reentrant program.
-Jean-Louis
Jean-Louis,

every process lives in its own address space so the program it runs
doesn't need to be reentrant to be able to run multiple copies.
Functions in programs only need to be reentrant if they are run by
multiple threads in the same address space, if the function is
recursive, etc... but prtspool is a very simple program (no multi
threading, no recursive calls, etc..)

the Windows/Unix/Linux way of seeing things is VERY different from the
MVS ways !

--Ivan



[Non-text portions of this message have been removed]
Maarten Hoes hoes.maarten@gmail.com [hercules-390]
2017-03-10 16:37:42 UTC
Permalink
Hi,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Jean-Louis,
every process lives in its own address space so the program it runs
doesn't need to be reentrant to be able to run multiple copies.
Functions in programs only need to be reentrant if they are run by
multiple threads in the same address space, if the function is
recursive, etc... but prtspool is a very simple program (no multi
threading, no recursive calls, etc..)
the Windows/Unix/Linux way of seeing things is VERY different from the
MVS ways !
--Ivan
Now I am actually intrigued. I'm only aware of the 'Windows/Unix/Linux'
('CreateProcess', 'fork'/'exec') way. How does MVS do this, then ?


- Maarten
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-10 16:53:18 UTC
Permalink
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Hi,
Jean-Louis,
every process lives in its own address space so the program it runs
doesn't need to be reentrant to be able to run multiple copies.
Functions in programs only need to be reentrant if they are run by
multiple threads in the same address space, if the function is
recursive, etc... but prtspool is a very simple program (no multi
threading, no recursive calls, etc..)
the Windows/Unix/Linux way of seeing things is VERY different from the
MVS ways !
--Ivan
Now I am actually intrigued. I'm only aware of the
'Windows/Unix/Linux' ('CreateProcess', 'fork'/'exec') way. How does
MVS do this, then ?
ATTACH Macro I think... Whether the new subtask runs in it's own address
space is dependent on parameters and possible authorization.

Basically in Windows : CreateProcess (fork+exec())
In Unix/Linux : fork() creates a new process (child process is identical
except for the return code of fork() - but with it's own copy of
everything) , exec() overwrites the process image, heap, stack, etc...
In MVS : ATTACH (create a thread or process) or LOAD (load a program)
and then ATTACH starting at the entry point loaded.

--Ivan


[Non-text portions of this message have been removed]
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-10 16:02:02 UTC
Permalink
Hi Maarten,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Although I'm not a mind-reader, I fully assume it's because he doesn't
realize you dont *need* to rename the *executable* in order to have
multiple instances of it running concurrently.
If I don't do it there is a problem.
It's with an intreq and a sense but don't ask more precision z/OS doesn't
like it.

-Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-10 16:24:23 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Maarten,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Although I'm not a mind-reader, I fully assume it's because he doesn't
realize you dont *need* to rename the *executable* in order to have
multiple instances of it running concurrently.
If I don't do it there is a problem.
It's with an intreq and a sense but don't ask more precision z/OS doesn't
like it.
-Jean-Louis
Jean-Louis,

But we'd LIKE some precision ! Otherwise solving your problem is going
to be more than a challenge than it already is.

A sense, a hercules trace (t+cuu), an error message when you use the
*normal* setup

There is absolutely NO reason whatsoever to not use the same program
name for all piped printer instances.

Jean-Louis.... So far we've been trying to see where the issue lies, but
you are providing only VERY little information at the time, so it
doesn't help. It's better to provide TOO much information than us having
to ask every time for extra information.

--Ivan



[Non-text portions of this message have been removed]
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-10 16:45:44 UTC
Permalink
Hi Maarten,

I don't try to run that many instances of hercules.
I just start Hercules once!

I declared different names for the prtspool and it's Hercules itself
that starts one instance with each declared printer not me.

#********************************************************************
# Printers *
#********************************************************************
000E 1403 "| /usr/local/bin/prta A /var/ibm/zos/prt/clA/ prt"
000B 1403 "| /usr/local/bin/prtc C /var/ibm/zos/prt/clC/ prt"
0004 1403 "| /usr/local/bin/prtd D /var/ibm/zos/prt/clD/ prt"
0005 1403 "| /usr/local/bin/prth H /var/ibm/zos/prt/clH/ prt"
0006 1403 "| /usr/local/bin/prtj J /var/ibm/zos/prt/clJ/ prt"
0007 1403 "| /usr/local/bin/prtk K /var/ibm/zos/prt/clK/ prt"
0008 1403 "| /usr/local/bin/prtl L /var/ibm/zos/prt/clL/ prt"
0009 1403 "| /usr/local/bin/prto O /var/ibm/zos/prt/clO/ prt"
000A 1403 "| /usr/local/bin/prtx X /var/ibm/zos/prt/clX/ prt"

-Jean-Louis
Maarten Hoes hoes.maarten@gmail.com [hercules-390]
2017-03-10 18:00:20 UTC
Permalink
Hi,
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Maarten,
I don't try to run that many instances of hercules.
I just start Hercules once!
I fully realize that, I was just responding to the post 'somitcw' (what is
his real name, anyway ?) made.
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
I declared different names for the prtspool and it's Hercules itself
that starts one instance with each declared printer not me.
#********************************************************************
# Printers *
#********************************************************************
000E 1403 "| /usr/local/bin/prta A /var/ibm/zos/prt/clA/ prt"
000B 1403 "| /usr/local/bin/prtc C /var/ibm/zos/prt/clC/ prt"
0004 1403 "| /usr/local/bin/prtd D /var/ibm/zos/prt/clD/ prt"
0005 1403 "| /usr/local/bin/prth H /var/ibm/zos/prt/clH/ prt"
0006 1403 "| /usr/local/bin/prtj J /var/ibm/zos/prt/clJ/ prt"
0007 1403 "| /usr/local/bin/prtk K /var/ibm/zos/prt/clK/ prt"
0008 1403 "| /usr/local/bin/prtl L /var/ibm/zos/prt/clL/ prt"
0009 1403 "| /usr/local/bin/prto O /var/ibm/zos/prt/clO/ prt"
000A 1403 "| /usr/local/bin/prtx X /var/ibm/zos/prt/clX/ prt"
But I think (and I may be wildly mistaken here, sorry for that) the point
people were trying to make was this :


Why are you doing this :


| /usr/local/bin/prta
| /usr/local/bin/prtc
| /usr/local/bin/prtd
| /usr/local/bin/prth
| /usr/local/bin/prtj
| /usr/local/bin/prtk
| /usr/local/bin/prtl
| /usr/local/bin/prto
| /usr/local/bin/prtx


When you could be doing this :


| /usr/local/bin/prtspool
| /usr/local/bin/prtspool
| /usr/local/bin/prtspool
| /usr/local/bin/prtspool
| /usr/local/bin/prtspool
| /usr/local/bin/prtspool
| /usr/local/bin/prtspool
| /usr/local/bin/prtspool
| /usr/local/bin/prtspool



As that *should* work ?



- Maarten
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-10 19:04:04 UTC
Permalink
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
But we'd LIKE some precision !
7208 tty1 S+ 0:00 hercules -f conf/zos2.cnf
7210 tty1 S+ 0:00 /usr/local/bin/prtspool D /var/ibm/zos/prt/clD/
prt
7211 tty1 S+ 0:00 hercules -f conf/zos2.cnf
7212 tty1 S+ 0:00 /usr/local/bin/prtspool H /var/ibm/zos/prt/clH/
prt
7213 tty1 S+ 0:00 hercules -f conf/zos2.cnf
7214 tty1 S+ 0:00 /usr/local/bin/prtspool J /var/ibm/zos/prt/clJ/
prt
7215 tty1 S+ 0:00 hercules -f conf/zos2.cnf
7216 tty1 S+ 0:00 /usr/local/bin/prtspool K /var/ibm/zos/prt/clK/
prt
7217 tty1 S+ 0:00 hercules -f conf/zos2.cnf
7219 tty1 S+ 0:00 hercules -f conf/zos2.cnf
7220 tty1 S+ 0:00 /usr/local/bin/prtspool O /var/ibm/zos/prt/clO/
prt
7221 tty1 S+ 0:00 hercules -f conf/zos2.cnf
7222 tty1 S+ 0:00 hercules -f conf/zos2.cnf
7223 tty1 S+ 0:00 /usr/local/bin/prtspool X /var/ibm/zos/prt/clX/
prt
7224 tty1 S+ 0:00 /usr/local/bin/prtspool C /var/ibm/zos/prt/clC/
prt
7225 tty1 S+ 0:00 hercules -f conf/zos2.cnf
7226 tty1 S+ 0:00 /usr/local/bin/prtspool A /var/ibm/zos/prt/clA/
prt

On the z/OS console:
19.44.04 IOS075E 0008,RECURRING MIH CONDITION FOR THIS DEVICE
19.44.10 IOS077E 0008,00,*MASTER*, CLEAR SUBCHANNEL INTERRUPT
MISSING
19.44.10 IOS075E 0008,RECURRING MIH CONDITION FOR THIS DEVICE
19.44.16 IOS077E 0008,00,*MASTER*, CLEAR SUBCHANNEL INTERRUPT
MISSING
...
19.45.04 IOS075E 0008,RECURRING MIH CONDITION FOR THIS DEVICE
19.45.10 IOS077E 0008,00,*MASTER*, CLEAR SUBCHANNEL INTERRUPT
MISSING
19.45.10 IOS075E 0008,RECURRING MIH CONDITION FOR THIS DEVICE
19.45.16 IOS077E 0008,00,*MASTER*, CLEAR SUBCHANNEL INTERRUPT
MISSING

And what remains after the quit:
7208 tty1 S 0:00 hercules -f conf/zos2.cnf
7210 tty1 S 0:00 /usr/local/bin/prtspool D /var/ibm/zos/prt/clD/
prt
7211 tty1 S 0:00 hercules -f conf/zos2.cnf
7212 tty1 S 0:00 /usr/local/bin/prtspool H /var/ibm/zos/prt/clH/
prt
7213 tty1 S 0:00 hercules -f conf/zos2.cnf
7214 tty1 S 0:00 /usr/local/bin/prtspool J /var/ibm/zos/prt/clJ/
prt
7215 tty1 S 0:00 hercules -f conf/zos2.cnf
7216 tty1 S 0:00 /usr/local/bin/prtspool K /var/ibm/zos/prt/clK/
prt
7217 tty1 S 0:00 hercules -f conf/zos2.cnf

Printers 1 and 7 were initialized (JES2 asked for them $s prt1 et $s prt7)
it means class A and L.
I used t+ 4-f
The file : http://www.stben.net/hercules/h2.txt

-Jean-Louis
somitcw@yahoo.com [hercules-390]
2017-03-10 20:46:37 UTC
Permalink
- - - In hercules-***@yahoogroups.com, <***@...> wrote:
- - - beginning snipped - - -
19.44.04 IOS075E 0008,RECURRING MIH CONDITION FOR THIS DEVICE
19.44.10 IOS077E 0008,00,*MASTER*, CLEAR SUBCHANNEL INTERRUPT
MISSING
19.44.10 IOS075E 0008,RECURRING MIH CONDITION FOR THIS DEVICE
19.44.16 IOS077E 0008,00,*MASTER*, CLEAR SUBCHANNEL INTERRUPT
MISSING
... ending snipped - - -

Could the print program have been stopped or be still initializing?
Is your system busy?
Could linux limits have been exceeded.
How much lower is the zOS priority than the print program?

What do you have MIH in PARMLIB set for device X'0008'.
The one minute setting could be adjusted, as in tripled.
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-11 10:44:53 UTC
Permalink
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
But we'd LIKE some precision !
More precision:
You have the syslog from z/OS at :
http://www.stben.net/hercules/SYSLOG.+MASTER+.j02839cL.pdf
The MIH for the printers are:
IOS086I 11.36.16 MIH DEVICE TIMES FRAME LAST F E SYS=ADCD
0004=03:00, 0005=03:00, 0006=03:00, 0007=03:00, 0008=03:00,
0009=03:00, 000A=03:00, 000B=03:00, 000C=03:00, 000D=03:00,
000E=03:00, 000F=03:00.

Linux charge:
Memory without Hercules 30% with Hercules running 46%
Processor :
0.27 0.37 0.18 during z/OS initialization
0.27 0.21 0.18 after

[hercules #9653 -- limits]
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 62896 62896
processes
Max open files 1024 4096 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 62896 62896 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us

And with a different name for each "virtual printer" z/OS is happy.
Why, I really don't care as soon as it works!

-Jean-Louis
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-11 15:16:17 UTC
Permalink
Hi Ivan,

And for the sake of clarity take a look at :
https://searchcode.com/file/39204586/uClinux-dist/user/pppd-2.3/pppd/plugins
/tacacs.c

Bye,
Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-11 15:26:48 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan,
https://searchcode.com/file/39204586/uClinux-dist/user/pppd-2.3/pppd/plugins
/tacacs.c
Bye,
Jean-Louis
Jean-Louis,

I have no idea what relation this may have to do with the problem at hand...

--Ivan



[Non-text portions of this message have been removed]
'Jean-Louis Noel' jln@stben.net [hercules-390]
2017-03-12 16:23:36 UTC
Permalink
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
what relation this may have to do with the problem at hand
So, back to the problemS (classed from easy to difficult to fix) :

1) The interface PTP adds a route for the IPV4 address not for the IPV6.

2) The cleaned up : I downgraded to only one printer under printspool
the others use the direct output in txt format and everything seems OK so
far.
Is the cleaned up problem due to a surge during the closing of that many
children or
not it's very difficult to determine but, if it is hercules could temporise
a bit between
those closing.

N.B. It would be nice to have a possibility to ask hercules to rotate those
printer.txt files.

-Jean-Louis
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-12 16:58:25 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
what relation this may have to do with the problem at hand
N.B. It would be nice to have a possibility to ask hercules to rotate those
printer.txt files.
Jean-Louis,

What would be the condition for rotating the file ?

--Ivan



[Non-text portions of this message have been removed]
'John P. Hartmann' jphartmann@gmail.com [hercules-390]
2017-03-12 17:10:33 UTC
Permalink
Will someone kindly explain to me in easily understood language what
relevance this apparently never-ending thread has to Hercules per se?

Would an MVS forum not be more appropriate?

Thanks, j.



------------------------------------

------------------------------------

Community email addresses:
Post message: hercules-***@yahoogroups.com
Subscribe: hercules-390-***@yahoogroups.com
Unsubscribe: hercules-390-***@yahoogroups.com
List owner: hercules-390-***@yahoogroups.com

Files and archives at:
http://groups.yahoo.com/group/hercules-390

Get the latest version of Hercules from:
http://www.hercules-390.org


------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/hercules-390/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/hercules-390/join
(Yahoo! ID required)

<*> To change settings via email:
hercules-390-***@yahoogroups.com
hercules-390-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
hercules-390-***@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-12 17:34:10 UTC
Permalink
Post by 'John P. Hartmann' ***@gmail.com [hercules-390]
Will someone kindly explain to me in easily understood language what
relevance this apparently never-ending thread has to Hercules per se?
Would an MVS forum not be more appropriate?
Thanks, j.
John,

Jean-Louis is obviously encountering issues when he has multiple
1403/3203 instances piped through a program (for example CCUU 1403
"|SomeProgram SomeParameters ...")

- When using the same piping program, some of those instances are not
behaving as expected (Missing interrupt on CSCH for example)....
- When renaming the piping program, things operate as expected, but when
hercules terminate, some of the pipe processes are left alive, including
hercules processes, meaning some of the resources are not released
(memory, file descriptors, sockets, etc...) when the initial hercules
process terminates. These are NOT zombie processes, but alive processes
which should terminate when the writing half side of the pipe is closed.
- (The 2 issues MAY be related)

So although the issues he is describing seem OS centric (by his
description), these are actually hercules issues and could occur on any
other OS.

Therefore I think this is the appropriate forum.

--Ivan



[Non-text portions of this message have been removed]
dwegscheid@sbcglobal.net [hercules-390]
2017-03-13 14:47:37 UTC
Permalink
If you want to do log rotation, look at the 'rotatelogs' program that comes with Aapche. It's designed to be piped into and takes care of rotating logs.

https://httpd.apache.org/docs/2.4/programs/rotatelogs.html https://httpd.apache.org/docs/2.4/programs/rotatelogs.html
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-13 15:49:55 UTC
Permalink
Post by ***@sbcglobal.net [hercules-390]
If you want to do log rotation, look at the 'rotatelogs' program that
comes with Aapche. It's designed to be piped into and takes care of
rotating logs.
https://httpd.apache.org/docs/2.4/programs/rotatelogs.html
It might help. But these are actual program output files, not logs per se.

--Ivan


[Non-text portions of this message have been removed]
dwegscheid@sbcglobal.net [hercules-390]
2017-03-14 20:43:54 UTC
Permalink
Jean-Louis asked for "N.B. It would be nice to have a possibility to ask hercules to rotate those
printer.txt files.". rotatelogs will do that (though not burst output); it doesn't care if the files are printer output or log files.
Post by ***@sbcglobal.net [hercules-390]
If you want to do log rotation, look at the 'rotatelogs' program that
comes with Aapche. It's designed to be piped into and takes care of
rotating logs.
https://httpd.apache.org/docs/2.4/programs/rotatelogs.html https://httpd.apache.org/docs/2.4/programs/rotatelogs.html
It might help. But these are actual program output files, not logs per se.

--Ivan


[Non-text portions of this message have been removed]

Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-12 17:16:45 UTC
Permalink
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
Hi Ivan,
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
what relation this may have to do with the problem at hand
1) The interface PTP adds a route for the IPV4 address not for the IPV6.
Jean-Louis,

We'd have to see the how the related tunX interface looks like, a dump
of your routing table, the addresses used, how the IPv6 addresses are
obtained, what it is you expect, etc...

(Note, I don't think the PTP interface adds the route... The route is
added by the underlying IP stack because it is a Point To Point interface).

Again... we are sorely missing information !
Post by 'Jean-Louis Noel' ***@stben.net [hercules-390]
2) The cleaned up : I downgraded to only one printer under printspool
the others use the direct output in txt format and everything seems OK so
far.
Is the cleaned up problem due to a surge during the closing of that many
children or
not it's very difficult to determine but, if it is hercules could temporise
a bit between
those closing.
How does one determine the time to wait ? Is it the actual issue ? why
specifying multiple "prtspool" directly - as it should be - instead of
aliases which doesn't work for you (these issues *MAY* very well be
related).

About "prtspool" not working for you - if we can figure this out, then
the rest of the problems using printer through pipes may be solved as well.

--Ivan



[Non-text portions of this message have been removed]
Loading...