Hello all,
To do a self-exec or self-restart of a process when it crosses the threshold memory limit, I use the value of virtual memory size field from /proc/$pid/stat file and do a self-exec.
According to man 5 proc
vsize %lu
Virtual memory size in bytes.
I just want to know, whether calculating vmsize of the process is the right way to identify total memory consumption of a process? Should resident set size be taken into account or per process swap usage?
Pointers please.