Route Linux Quota Warnings with quota_nld
You will choose where quota_nld sends quota warnings, understand which messages reach a user's terminal, and test the installed command without accidentally starting a second daemon. The examples use quota tools 4.06, installed here as Debian package quota 4.06-1build6.
The route
Jump straight to the step you need, or tick off Done means at the end.
Allow about fifteen minutes. You need the quota package, a shell, and a machine using filesystem quotas. Starting or replacing a daemon is an operational change, so coordinate it with whoever manages the host. The checks in the first half are read-only and normally need no elevated privileges.
1. Check the installed command
Confirm which executable your shell will use and record its version:
$ command -v quota_nld
/usr/sbin/quota_nld
$ quota_nld --version
Quota utilities version 4.06.
Compiled with: USE_LDAP_MAIL_LOOKUP EXT2_DIRECT HOSTS_ACCESS RPC RPC_SETQUOTA BSD_BEHAVIOUR
$ dpkg-query -W -f='${Package} ${Version}\n' quota
quota 4.06-1build6
The exact compiled-feature line and package version are host-specific. Keep this information with your service configuration. The installed binary accepts both short and long option names, which makes the long forms easier to review in a unit file or maintenance note.
Checkpoint: inspect the local option list before copying a command into a service definition:
$ quota_nld --help
quota_nld: Usage: quota_nld [options]
Options are:
-h --help shows this text
-V --version shows version information
-C --no-console do not try to write messages to console
-b --print-below write to console also information about getting below hard/soft limits
-D --no-dbus do not try to write messages to DBUS
-F --foreground run daemon in foreground
2. Check the kernel prerequisite
quota_nld listens for quota messages on a netlink socket. The kernel must have quota-message support enabled; the manual identifies this as the Filesystems -> Quota kernel configuration area. This is a build or kernel-selection prerequisite, not a quota_nld flag.
Do not treat an installed executable as proof that the running kernel can send these messages. If your distribution supplies kernel configuration information, inspect that through your normal read-only tooling. If the support is absent, stop there and involve the kernel or platform owner. Rebuilding or replacing a production kernel is outside this guide and needs a rollback plan.
There is no quota_nld configuration file described by this installed manual. Its routing policy is selected with command-line options, normally by the service definition that launches it.
3. Choose the warning destinations
With no routing switches, the daemon forwards warnings to both destinations:
- the system D-Bus, so a desktop manager can display a dialog;
- the user's last-accessed terminal.
The option names are easy to reverse accidentally. --no-dbus disables D-Bus forwarding, while --no-console disables terminal output. They do not enable either destination; both are enabled by default.
For a host where desktop notifications are irrelevant but terminal warnings are wanted, the routing portion is:
quota_nld --no-dbus
For a host where terminal writes are undesirable, use:
quota_nld --no-console
Using both switches leaves no destination for a warning, so do that only if another monitoring path is known to handle quota events. Do not assume that a silent terminal means quota checks are healthy.
4. Decide whether below-limit messages belong on terminals
Terminal output is deliberately narrower than D-Bus output. By default, terminal messages do not include warnings about falling below hard or soft limits. Add --print-below when those messages must reach the user's last-accessed terminal:
quota_nld --no-dbus --print-below
This does not add a new quota limit and does not change enforcement. It changes which received warnings are printed to terminals. D-Bus receives all quota messages regardless of --print-below, unless --no-dbus is also set.
Checkpoint: write down the intended policy in plain language before editing the service command. For example: "D-Bus warnings enabled, terminal warnings enabled, below-limit terminal messages suppressed." That policy maps to no routing switches. "Terminal warnings only, including below-limit messages" maps to --no-dbus --print-below.
5. Test in the foreground, carefully
--foreground keeps the daemon attached to your shell and is useful for debugging. It does not create a background service or detach from the terminal. Starting a second instance can conflict with the instance already managed by your system, so first check how the host currently launches it through your service-management process.
In a maintenance window, with any existing instance stopped according to your normal runbook, a terminal-only foreground test would be:
$ sudo quota_nld --foreground --no-dbus
There may be no startup text. A successful foreground run can simply wait for netlink messages. Keep this shell visible, generate only a safe test event approved for the host, and stop the test with Ctrl-C. The exact warning text depends on the quota event and the affected user.
Warning
Do not use this command as a second copy while a production daemon is already running, and do not generate quota pressure by filling a filesystem just to obtain output. A full filesystem can disrupt services and damage applications. If the test has changed no persistent service configuration, the undo is simply Ctrl-C and restoring the previously running instance through the host's normal procedure.
6. Put the chosen flags under service control
Once the foreground test has established the routing you want, place the same flags in the existing service definition or package-provided launch mechanism. Preserve the package's executable path and any distribution-specific privilege, dependency, restart and logging settings. This guide does not invent a unit name or service file because those details are not specified by the quota_nld manual and vary between systems.
After the service is reloaded or restarted through your normal procedure, verify its status with that procedure and confirm the effective command line. A useful read-only check on Linux is:
$ pgrep -a quota_nld
If the process is present, compare its arguments with the policy you recorded. An absent process is not evidence of a kernel problem by itself; inspect the service log and launch status before changing flags. If you need to roll back, restore the previous command line and restart the service using the same controlled procedure.
7. Separate routing failures from quota failures
Keep these questions separate when diagnosing an alert:
- Is the daemon running and listening for netlink messages?
- Does the running kernel include quota netlink support?
- Was the warning routed to D-Bus, the last-accessed terminal, or both?
- Was the event a below-limit message that terminal output suppresses by default?
A desktop user seeing no dialog may be affected by --no-dbus, by the lack of a desktop D-Bus session, or by the absence of a quota event. A user seeing no terminal warning may be using a different or inactive terminal, or the event may be below a limit and --print-below may not have been selected. Avoid "fixing" an ambiguous symptom by enabling every destination on a production host.
Done means
- You recorded the installed quota tools version and verified the executable path.
- You confirmed that the running kernel is intended to provide quota netlink messages.
- You can explain the difference between
--no-dbusand--no-console. - You selected
--print-belowonly when terminal users need those extra messages. - You tested in the foreground without starting a duplicate daemon or filling a filesystem.
- The service command line matches the written routing policy, with a tested rollback.