Arne Schwabe wrote:
> If there is currently no ways to see which processes allocates how much
> swap space are there any pointers where to look to implement such a feature?

The problem is that there is no one-to-one relationship
between memory pages (including those paged out to swap)
and processes. Some pages belong to multiple processes,
i.e. they're shared (e.g. libraries, IPC shared memory).
Therefore it is very non-trivial to specify exactly the
amount of memory (or swap space) allocated to a process.

Part of the problem is that different people often mean
different things when talking about "memory" or "swap".
Also note that swapping and paging are different things.

If your goal is to find out which process is causing the
exhaustion of swap, the best way is to record the SIZE
("RSS" in ps) of all processes in order to see which one
keeps growing. Usually it's rather easy to find.

Best regards

Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:

"One of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination
of their C programs."
-- Robert Firth
_______________________________________________ mailing list
To unsubscribe, send any mail to ""