Conservative SmartOS global-zone memory pressure guard with dry-run-first policy and SMF integration.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
1.4 KiB

  1. # o6h-memory-guard 1.0.2 -- whitespace-separated, no shell evaluation.
  2. # Restart required for configuration changes. Duplicate scalar keys are errors.
  3. ACTION_MODE dry-run
  4. PRE_SECONDS 3
  5. PRESSURE_SECONDS 10
  6. CRITICAL_SECONDS 2
  7. RECOVERY_SECONDS 15
  8. TERM_GRACE_SECONDS 5
  9. NORMAL_SCAN_SECONDS 5
  10. SCAN_BUDGET_MS 200
  11. COOLDOWN_SECONDS 10
  12. MAX_VICTIMS_EPISODE 4
  13. MAX_VICTIMS_MINUTE 4
  14. MIN_RSS_KIB 65536
  15. LOG_MAX_MIB 10
  16. LOG_KEEP 5
  17. # Explicit additional protected processes: exact pr_fname (max 15 characters).
  18. # The global zone, zone init, essential names, missing/unknown UUIDs and all
  19. # zones without an allow rule are ALWAYS excluded. See README.
  20. protect_process sshd
  21. protect_process postgres
  22. protect_process mysqld
  23. protect_process mariadbd
  24. protect_process redis-server
  25. protect_process zabbix_agentd
  26. # protect_pid 12345
  27. # Inventory supplied by the operator, from vmadm list (outside the daemon).
  28. # Add REAL UUIDs and aliases. No active allow rules are shipped.
  29. # Grammar: zone <lowercase-UUID> <safe-alias-without-spaces> <allow|protect|observe>
  30. # allow: eligible in simulations, and in armed only when both arming gates open.
  31. # protect / observe / absent: never eligible for signals, including floor.
  32. # Examples (replace the entire UUID; these are comments, not authorizations):
  33. # zone YOUR-REAL-WEB-ZONE-UUID web5 allow
  34. # zone YOUR-REAL-DB-ZONE-UUID database protect
  35. # zone YOUR-REAL-MONITOR-ZONE-UUID monitoring protect