running many instances of jps concurrently produce strage output like: 8081 -- process information unavailable 8091 -- process information unavailable 8050 -- process information unavailable 8065 -- process information unavailable 8086 -- process information unavailable This output can provoke failures in scripts that use jps output with grep and awk postprocessing. Output of jps shouldn't include any diagnostic messages, only discovered proccesses and requested information about them. Please find the output below - with the suggested flags (-J-Djps.debug=true -J-Djps.printStackTrace=true) : 8120 -- process information unavailable 8120 not found sun.jvmstat.monitor.MonitorException: 8120 not found at sun.jvmstat.perfdata.monitor.protocol.local.PerfDataBuffer.<init>(PerfDataBuffer.java:66) at sun.jvmstat.perfdata.monitor.protocol.local.LocalMonitoredVm.<init>(LocalMonitoredVm.java:51) at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:60) at sun.tools.jps.Jps.main(Jps.java:65) Caused by: java.lang.IllegalArgumentException: Process not found at sun.misc.Perf.attach(Native Method) at sun.misc.Perf.attachImpl(Perf.java:253) at sun.misc.Perf.attach(Perf.java:183) at sun.jvmstat.perfdata.monitor.protocol.local.PerfDataBuffer.<init>(PerfDataBuffer.java:46) ... 3 more ============================================================= Used the below script to reproduce/ get the above exception : #!/bin/ksh which java java -version i=0 while [ i -le 10 ] do jps -J-Djps.debug=true -J-Djps.printStackTrace=true > jps${i}.log 2>&1 & i=`expr $i + 1` done ================================= At least one of the log files (out of 10 above) did have this exception.
|