| Lesson 7 | The Process Monitor (PMON) |
| Objective | Identify the purpose of the PMON process. |
PMON (Process MONitor) is an Oracle background process that keeps the instance tidy and available. It cleans up after failed sessions, releases resources, and keeps the listener informed about services so clients can connect reliably. PMON starts with the instance and runs until shutdown.
listener.ora entries.In RAC, PMON’s core duties remain the same (local process cleanup and dynamic registration). Cluster membership, global locks, and instance failover are handled by Clusterware and GES/GCS. Ensure correct service registration across SCAN listeners so connections load-balance and fail over cleanly.
SERVICE_NAMES appropriately (may be multiple, e.g., OLTP/REPORTING).LOCAL_LISTENER (host:port or a TNS alias).REMOTE_LISTENER to your SCAN (e.g., scan-cluster:1521 or a TNS alias).-- Inspect current values
SHOW PARAMETER service_names
SHOW PARAMETER local_listener
SHOW PARAMETER remote_listener
-- Example: use a TNS alias for LOCAL_LISTENER (single-instance)
ALTER SYSTEM SET local_listener = 'LISTENER_DB1' SCOPE=BOTH;
-- Example: RAC uses SCAN for REMOTE_LISTENER
ALTER SYSTEM SET remote_listener = 'SCAN_LISTENERS' SCOPE=BOTH;
-- After changes, PMON will re-register; or prompt it:
ALTER SYSTEM REGISTER;
lsnrctl status: verify SERVICE_NAMES, LOCAL_LISTENER/REMOTE_LISTENER; run ALTER SYSTEM REGISTER.V$LOCK/DBA_BLOCKERS/DBA_WAITERS.-- Show PMON background process (naming varies by platform)
SELECT p.pid, p.spid, p.pname
FROM v$bgprocess b
JOIN v$process p ON b.paddr = p.addr
WHERE b.name = 'PMON';
-- Sessions recently killed or dead (investigate lingering locks/resources)
SELECT sid, serial#, status, username, program
FROM v$session
WHERE status IN ('KILLED','SNIPED')
ORDER BY status;
-- Locks held/waited (high-level view)
SELECT s.sid, s.serial#, l.type, l.mode_held, l.mode_requested, l.block
FROM v$lock l
JOIN v$session s ON s.sid = l.sid
ORDER BY l.block DESC, s.sid;
-- Dispatcher and Shared Server health (Shared Server only)
SELECT name, paddr, status, (busy/(busy+idle)) AS busy_ratio
FROM v$dispatcher;
SELECT name, status, requests
FROM v$shared_server;
Key takeaway: PMON is your automatic janitor and service herald-cleaning up failed sessions and keeping listeners in sync-while SMON handles instance recovery and RECO resolves distributed transactions.