Feature/psutil compat

cherry-picked from debian branch