Add example code from psutils for use from C