1. Locate and check the size of the current ERRLOG.SYS file:
$ SET DEFAULT SYS$ERRORLOG $ DIRECTORY /SIZE /DATE /PROTECTION ERRLOG*.* Directory SYS$SYSROOT:[SYSERR] ERRLOG.OLD;15 4374 22-DEC-2017 11:26:05.97 (RWED,RWED,RE,) ERRLOG.OLD;14 97 8-DEC-2017 11:26:04.89 (RWED,RWED,RE,) ERRLOG.OLD;13 219 17-MAY-2010 16:42:34.30 (RWED,RWED,RE,) ERRLOG.SYS;1 282 9-NOV-2018 09:50:42.14 (RWED,RWED,RE,) Total of 4 files, 4972 blocks.
2. Create a new version of the ERRLOG.SYS logfile simply by
RENAME-ing the ERRLOG.SYS file – Don't worry, VMS will notice and create a new version of ERRLOG.SYS the very next time it needs to write-out a buffer of errlog information:
$ RENAME /LOG ERRLOG.SYS *.OLD %RENAME-I-RENAMED, SYS$SYSROOT:[SYSERR]ERRLOG.SYS;1 renamed to SYS$SYSROOT:[SYSERR]ERRLOG.OLD;16
3. Purge old file versions to free up space – keep as many recent versions as you like, but consider whether you'll ever actually need to investigate events in those older files (it hardly ever happens, but again, YMMV).
$ PURGE /KEEP=2 ERRLOG.OLD
The practical, forensic or diagnostic utility of any version of ERRLOG.OLD drops rapidly beyond the top-version of that file, so don't keep more than a couple of these file-versions.
Different systems and business environments have different operational requirements, but here are a few rules of thumb, and your own specific requirement is likely a combination of two or more of these: