MT#6817 add pid_watcher.py

Use inotify in order to monitor the pid change for some services

(cherry picked from commit f5b9fda5c4f2313b09add0fdb4754492675f9416)
MT#7109 Add mem stats

Initial and final stats are created on mem dir.

(cherry picked from commit ef20e93dffdfb3b48b54ca710826a1f0f4be3ce2)

This was squashed from
ea6c1b49490117332ac50670ee02d4fa6aa1684a..75bd40d1a2f1575ac8a32a23530d63770fa8bc7a
in master

(cherry picked from commit f1755d3a257bef5a5cff2a05990c5efffba1e64b)