This is an IBM Automation portal for Cloud Platform products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
Shape the future of IBM!
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Search existing ideas
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updateson them if they matter to you. If you can't find what you are looking for,
Post your ideas
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Specific links you will want to bookmark for future use
java JPS implementation on AIX should be changed for urgent performance reasons
we use standard java JPS (java print system) functionality to print to devices from WebSphere Application Server 9.0 on AIX. Implementation of JPS on AIX uses native AIX commands which finally end up in calling rembak command which has a default timeout of 90seconds (no influence on this from JPS and even when calling directly 60seconds would be the minimum). This happens already while looking up a printerqueue from JPS which is absolutly unneccesary. The remote device can be switched off or temporaryly unavailable on the network - to get a queue defined on AIX the printerstate is absolutely unneccesary. But even thought further: when actually printing to a queue I would assume the document is sent to the (local) queue and the request returns immediatly even when the remote printer is remporyrily unavailable.
In May 2019 I already did some research based on code available on github. Below are my findings and suggestions on that. Sadly the links don't work anymore as something in the repo changed - they may help you either to find what I mean...:
In the meantime I tried to figure out what is performed in https://github.com/ibmruntimes/openj9-openjdk-jdk8/blob/openj9/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java https://github.com/ibmruntimes/openj9-openjdk-jdk8/blob/openj9/jdk/src/solaris/classes/sun/print/UnixPrintService.java (I assume that are the relevant classes involved when using JPS on AIX, see my code example in the last mail below).
In UnixPrintServiceLookup.java line 848ff e.g. I found the private method named “getNamedPrinterNameAIX”. There the command “/usr/bin/lpstat -W –v” is used. If I execute this on the commandline of AIX with queue pointing to a remote printer which has some trouble or just is switched off, then it takes 90seconds for the command to return. In the output you can see an error from underlying rembak: bash-4.3$ /usr/bin/lpstat -W -vITAE_2_P Queue Dev Status Job Files User PP % Blks Cp Rnk -------------------- -------------- --------- ------ ------------------ ---------- ---- --- ----- --- --- ITAE_2_P @192 READY
: (WARNING) Connection to server failed. rembak: errno = 4: Interrupted system call ITAE_2_P raw HOST_DOWN
This seems to be “as designed” as the feedback from AIX-team and the manpage of lpstat says: “When a status command communicates with a remote host, the display occasionally appears to hang while the command waits for a response from the remote machine. The command eventually times out if no connection is established between the two machines.” The result of this command is further passed on to “UnixPrintService.filterPrinterNamesAIX()” which aims on filtering out the headers and the “bogus entries added by remote printers”. Finally the name is simply used as a parameter when calling the constructor of UnixPrintService. To summarize: lpstat command is executet with all the underlying remote printer communication which may take lot's of time just to filter the remote entries out in the next step and validate the name is an existing printerqueue (local one).
I would suggest to use “enq -sW -P ” instead (important is parameter “s”). With this command the remote communication seems not to be done. The command returns immediately even when a remote device behind a queue is switched off at the moment! bash-4.3$ enq -sW -P ITAE_2_P Queue Dev Status Job Files User PP % Blks Cp Rnk -------------------- -------------- --------- ------ ------------------ ---------- ---- --- ----- --- --- ITAE_2_P @192 READY As a sideeffect of this in the output the “bogus entries added by remote printers” are already omitted so there is less to filter out…
To list all available queues “enq -sWA” could be a suitable replacement. Maybe adding option “L” would make it even simpler to parse the output in Java as it generates a semicolon separated format without unnecessary whitespaces.
As mentioned I don't have very deep knowledge of AIX and am more a java programmer pointing out what I experienced while fiddling around with this. But from my point of view my suggested changes probably should work and even more important: I guess they would solve our problems as rembak isn't needed/used anymore for looking up one/all printers.
Do not place IBM confidential, company confidential, or personal information into any field.