If you caught yesterday’s meltdown video, you know I had a rough time with abnormal ends, full-on crashes, and what felt like nuclear-level explosions on the system. All thanks to IBM BOB struggling to chat properly with my IBM i box. Today, we are bouncing back with some smart tweaks to our CLRBOBLOG command. We will run it to purge those pesky Java dump log files, drop disk utilization back to a healthy 30 percent, and get things stable again. Along the way, Java 17 popped up as a likely troublemaker, so we will outline steps to uninstall it, test the waters, and maybe upgrade to the latest Java version. These are perfect hooks for a follow-up video…
Recap of Yesterday’s Chaos: Why We Need This Cleanup
Quick reminder for context: Our IBM i system locked up hard due to unchecked log growth in the IFS, pushing ASP usage into the danger zone. We used BOB to generate a CL script on the fly, which helped delete old logs and avert a total crash. But the root cause traced back to communication hiccups between BOB and the system, especially around Java-related processes. Java dumps were everywhere, bloating directories and causing jobs to abnormal end. If you have ever seen JAVADUMP files stacking up in /QIBM/UserData/Java400 or similar paths, you know the pain. These are heap dumps, thread dumps, and snap traces from JVM failures, and they eat space fast.
On IBM i, Java environments like JDK 17 can generate these logs during errors, and without proper rotation, your disk fills up. WRKSYSSTS showed us hitting 90 percent plus, triggering slowdowns and potential IPLs. Today, we refine our approach to prevent repeats.
Tweaking the CLRBOBLOG Command: Building a Better Cleanup Tool
Our original CLRBOBLOG was a simple CL program using QSH to find and delete old logs. But after yesterday, we need it smarter: target Java-specific dumps, add safety checks, and maybe parameterize paths and ages. Here is how I tweaked it. Start with CRTCLPGM to compile, and run it from a command line or scheduler.
Updated CL script example:
/* Program: CLRBOBLOG */
/* Purpose: List and delete specific log files from home directory */
/* Author: Nick Litten and a very naughty IBM BOB */
/* Date: 2026-02-20 */
/* This program lists all files in specified directory and deletes */
/* files matching these patterns: */
/* - core.* */
/* - javacore.* */
/* - jitdump.* */
/* - Snap.* */
/* Modification History: */
/* v.001 2026-02-20 - IBM Bob - Initial creation */
/* v.002 2026-02-21 - IBM Bob - Added HOMEDIR parameter support */
PGM PARM(&HOMEDIR)
DCL VAR(&HOMEDIR) TYPE(*CHAR) LEN(256)
DCL VAR(&CMD) TYPE(*CHAR) LEN(512)
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7)
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(512)
DCL VAR(&MSGF) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10)
/* Monitor for errors */
MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR))
/* Display header message */
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA('CLRBOBLOG: Starting cleanup of log +
files in ' *CAT &HOMEDIR) TOPGMQ(*EXT) +
MSGTYPE(*INFO)
/* List all files in the directory */
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA('Listing files in ' *CAT &HOMEDIR +
*TCAT ':') TOPGMQ(*EXT) MSGTYPE(*INFO)
CHGVAR VAR(&CMD) VALUE('ls -la ' *CAT &HOMEDIR)
QSH CMD(&CMD)
MONMSG MSGID(QSH0000) EXEC(DO)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA('Warning: Could not list directory +
contents') TOPGMQ(*EXT) MSGTYPE(*INFO)
ENDDO
/* Delete core.* files */
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA('Deleting core.* files...') +
TOPGMQ(*EXT) MSGTYPE(*INFO)
CHGVAR VAR(&CMD) VALUE('rm -f ' *CAT &HOMEDIR *TCAT +
'/core.*')
QSH CMD(&CMD)
MONMSG MSGID(QSH0000)
/* Delete javacore.* files */
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA('Deleting javacore.* files...') +
TOPGMQ(*EXT) MSGTYPE(*INFO)
CHGVAR VAR(&CMD) VALUE('rm -f ' *CAT &HOMEDIR *TCAT +
'/javacore.*')
QSH CMD(&CMD)
MONMSG MSGID(QSH0000)
/* Delete jitdump.* files */
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA('Deleting jitdump.* files...') +
TOPGMQ(*EXT) MSGTYPE(*INFO)
CHGVAR VAR(&CMD) VALUE('rm -f ' *CAT &HOMEDIR *TCAT +
'/jitdump.*')
QSH CMD(&CMD)
MONMSG MSGID(QSH0000)
/* Delete Snap.* files */
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA('Deleting Snap.* files...') +
TOPGMQ(*EXT) MSGTYPE(*INFO)
CHGVAR VAR(&CMD) VALUE('rm -f ' *CAT &HOMEDIR *TCAT +
'/Snap.*')
QSH CMD(&CMD)
MONMSG MSGID(QSH0000)
/* Display completion message */
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA('CLRBOBLOG: Cleanup completed +
successfully') TOPGMQ(*EXT) MSGTYPE(*COMP)
GOTO CMDLBL(ENDPGM)
ERROR: /* Error handling */
RCVMSG MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) +
MSGF(&MSGF) SNDMSGFLIB(&MSGFLIB)
SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA('CLRBOBLOG: Error occurred - ' *CAT +
&MSGID *CAT ' - ' *CAT &MSGDTA) +
TOPGMQ(*PRV) MSGTYPE(*COMP)
ENDPGM: ENDPGM
Running the Cleanup: Dropping Disk Usage to 30 Percent
With tweaks done, I fired up CLRBOBLOG on the system. First, check current status with WRKSYSSTS to confirm high ASP. Mine was still lingering at 60ish percent post-crash recovery. Ran the command targeting Java 17 paths, and it zapped hundreds of old dumps. Post-run, WRKSYSSTS showed us back at 30 percent, right where my healthy IBM i should sit for headroom.
Why Java 17? During the run, logs pointed to JDK 17 as the dump generator. Maybe a compatibility issue with BOB or recent PTFs?
IBM i supports multiple Java versions via /QOpenSys/QIBM/ProdData/JavaVM, but conflicts arise if paths overlap.
The latest versions of Java on IBM i as of today, are:
- Java SE 21 64 bit (supported on IBM i 7.6, 7.5, and 7.4)
- Java SE 17 64 bit (supported on IBM i 7.6, 7.5, and 7.4)
Next Steps: Uninstall Java 17 See if that solves the issue. Then Upgrade to Java21 and try again. But these are topics for the next video covering LICENSED PROGRAMS and uninstalling, and installing them
Wrapping up, this tweak session saved the day and highlighted Java management on IBM i. Automate cleanups, monitor Java versions, and use tools like BOB wisely for code gen. If your system is bloating, start with IFS checks via WRKLNK.
Stay technical, stay stable, not mentally unstable like me.
