Spool management using log monitor utility

PopUp provides a utility, the log monitor, that manages JES spool usage. It sends an email alert when the spool reaches a configurable threshold.



How it works

The monitor reads the z/OS log (/home/ibmsys1/z1090/logs/popup.log) as new lines are written. When z/OS reports a SPOOL RESOURCE SHORTAGE above the alert level (75% by default), the monitor emails the addresses you configure.

  • Shortages at or below the alert level, and all other log lines, are ignored.
  • While the spool stays high, at most one email is sent per interval (15 minutes by default).
  • If the spool usage rises above the level in the last email, a new email is sent immediately.
  • The monitor reads only lines written after it starts. Older log lines never trigger an email.



What is installed

All files are installed in /usr/local/bin/, which is on the PATH.

File Type Purpose Edit?
logMonitor Program The monitor No
encrypt_password Program Encrypts your mailbox password for the settings file No, run only
logmonitor_config Text file The monitor's settings. Each setting is explained by a comment in the file. Yes
email_template Text file The wording of the alert email Optional

The logmonitor systemd service is also created by default on every PopUp. It is enabled to start at boot but not started, because it needs your settings first (see Step 3).

Note: /usr/local/bin/ belongs to root, so editing the two text files there requires sudo.



Before you start

Check How
Valid PopUp license The machine must have a valid PopUp license, otherwise the monitor
will not start. Contact PopUp support for a license.
z/OS is running and popup.log is available z/OS must have been started (IPL), because zD&T writes popup.log
only while z/OS is running. You check the file in Step 3.3.
A mailbox to send from A mailbox that can send email over SMTP, and its password.
Alert recipients One or more email addresses that will receive the alerts.



Step 1: Encrypt your mailbox password

The settings file accepts only an encrypted password. If a plain-text password is entered, the monitor will not start.

cd /usr/local/bin
./encrypt_password

Enter your mailbox password when prompted. The program prints one line of encrypted text. Copy the whole line for Step 2.

Important: Do not edit the encrypted value by hand. If it is changed, the monitor cannot decrypt it.



Step 2: Update the settings file

Mandatory before starting the service. The service is enabled at boot. Until logmonitor_config contains your mailbox details and the encrypted password, the monitor cannot run. It will fail, retry every 30 seconds, and log the error each time. Complete this step first.

sudo vi /usr/local/bin/logmonitor_config

Replace the example values with your own. Change only the values; do not rename or remove a setting.

The mailbox settings (userName, password, to, smtpServer, port, tls) need your own values. The remaining settings come with defaults that work as they are. Keep them, or change them to suit your environment. For example, you can change threshold and alertIntervalMinutes to control when and how often alerts are sent.

Microsoft 365 mailboxes: SMTP login (SMTP AUTH) must be enabled for the mailbox, otherwise the login is refused.

Optional: change the email wording

To change the alert email, edit /usr/local/bin/email_template.txt:

sudo vi /usr/local/bin/email_template.txt
  • The first line is the subject and must start with Subject:.
  • Names that start with $ are filled in automatically when the email is sent. Keep them as written.

Changes apply to the next email. You do not need to restart the monitor.



Step 3: Start the service

3.1 Confirm the service is installed

systemctl cat logmonitor

This prints the service definition. The ExecStart line should point to /usr/local/bin/logMonitor.

3.2 Check its current state

systemctl is-enabled logmonitor
systemctl is-active logmonitor
Output Meaning
enabled The service starts at boot. This is the default.
disabled Run sudo systemctl enable logmonitor
inactive Not running yet. This is expected before the first start.
activating It is failing and retrying. Check the settings file (Step 2) and the log.

3.3 Confirm the z/OS log is available

The monitor reads popup.log, which exists only after z/OS has been started (IPL). Check it before starting the service:

ls -l /home/ibmsys1/z1090/logs/popup.log

If the file is missing, start z/OS first with ./ipl as ibmsys1 from the home directory, then check again. If the monitor is started without the file, it reports Log file not found and retries every 30 seconds until the file appears.

3.4 Start it

Only start the service after completing Step 2 and confirming popup.log is available.

sudo systemctl start logmonitor
To Run
Check it is running systemctl status logmonitor
See its messages journalctl -u logmonitor -f
Stop it sudo systemctl stop logmonitor

Other options: logMonitor --version shows the version and logMonitor --help shows usage.

To validate logMonitor is working as expected, check the monitor's messages include:

Valid license file

This confirms the license is valid, the password can be decrypted, the email template is correct, and the monitor is watching the z/OS log. Each time an alert is sent, the monitor logs Alert email sent: spool at NN%.



Changing settings later

What changed Action
email_template Nothing. The next email uses the new text.
logmonitor_config Restart the monitor: sudo systemctl restart logmonitor
Mailbox password Run encrypt_password, paste the new line into password, then restart.
Renewed license Restart the monitor.



Troubleshooting

Message Cause Action
License expired. License has expired. Renew the license.
WARNING: Your PopUp license has expired. In the 7-day grace period.
The monitor still runs.
Renew before the date shown.
Invalid license file
License expiry date missing
License file is not valid for this machine. Get a valid license file.
LOGMONITOR_CONFIG is not set or the file does not exist Settings file not found. Set LOGMONITOR_CONFIG to
/usr/local/bin/logmonitor_config.
Could not decrypt the password in logmonitor_config… Password is missing, edited, or plain text.
Common on a first start before Step 2.
Run encrypt_password, paste the new line into
password, then restart.
Email template problem (…) Template is missing, or its first line does
not start with Subject:.
Fix email_template.
Log file not found: …/popup.log z/OS is not running yet. Start z/OS (see Step 3.3). The monitor retries by itself.
Error, couldn't launch child (exec): Permission denied /tmp is mounted noexec.
The monitor unpacks itself at start.
The service uses /var/tmp.
When run manually, set TMPDIR=/var/tmp.
Login refused (535) Mail server rejected the login. Check userName.
If the password changed, encrypt it again.
Microsoft 365: see the SMTP AUTH note in Step 2.
Every alert arrives twice More than one monitor is running. List them with
ps -ef \| grep logMonitor \| grep -v grep
and stop all but one.
No email above the alert level Monitor not running, or email blocked. Run systemctl status logmonitor.
Check the log and your spam folder.



Page last revised on: 2026-11-25