0

I have a system which sends an email to a user twice a day, confirming that a specific daemon is still running and doing something. This has historically run for over a year without a restart, but the code has now changed, and I need to confirm that it's not leaking memory (minimally, without profiling/etc).

The user isn't technical, and I don't want to supply too much information, because it will be ignored, so I'm planning on adding a single line to the mail that says something like 'Current memory usage is x'.

Question: what number do I use for 'x'? The obvious choices are the drs, rsz, vsz, and size numbers from ps. pmap and the various proc values appear to produce a number which is basically vsz.

More specifically, if the (C++) code is leaking memory, then that memory may be unreachable, and so will have been swapped out, and so won't appear in the resident set. If this is the case, will the memory ever 'fill' and cause a crash anyway? And presumably drs and rsz have no value in this case? size looks like it may be appropriate but the man page says that it's not particularly reliable.

QF0
  • 47
  • 4

0 Answers0