More robust machine_type and pid detection

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Merge pull request #142 from ceph/wip-6342

More robust machine_type and pid detection