From 14d90ef1e1c5e58b854b2126167d44df4a482e72 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Wed, 30 Mar 2011 18:35:02 +0000 Subject: [PATCH] Add example devd.conf entry. --- etc/devd.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/devd.conf b/etc/devd.conf index c36138acca25..807ec05ffb2b 100644 --- a/etc/devd.conf +++ b/etc/devd.conf @@ -301,6 +301,7 @@ detach 10 { # Button: Button pressed (0 for power, 1 for sleep) # CMBAT: ACPI battery events # Lid: Lid state (0 is closed, 1 is open) +# RCTL: Resource limits # Suspend, Resume: Suspend and resume notification # Thermal: ACPI thermal zone events # @@ -313,4 +314,13 @@ notify 10 { match "subsystem" "ACAD"; action "/etc/acpi_ac $notify"; }; + +# This example works around a memory leak in PostgreSQL, restarting +# it when "user:pgsql:swap:devctl=1G" rctl(8) rule gets triggered. +notify 0 { + match "system" "RCTL"; + match "rule" "user:70:swap:.*"; + action "/usr/local/etc/rc.d/postgresql restart" +}; + */