def _ps(osdata):
 grains = {}
 bsd_choices = ('FreeBSD', 'NetBSD', 'OpenBSD', 'MacOS')
 if (osdata['os'] in bsd_choices):
  grains['ps'] = 'ps auxwww'
 elif (osdata['os_family'] == 'Solaris'):
  grains['ps'] = '/usr/ucb/ps auxwww'
 elif (osdata['os'] == 'Windows'):
  grains['ps'] = 'tasklist.exe'
 elif (osdata.get('virtual', '') == 'openvzhn'):
  grains['ps'] = 'ps -fH -p $(grep -l "^envID:[[:space:]]*0\\$" /proc/[0-9]*/status | sed -e "s=/proc/\\([0-9]*\\)/.*=\\1=")  | awk \'{ $7=""; print }\''
 else:
  grains['ps'] = 'ps -efHww'
 return grains

def _ps ( osdata ) : grains = { } bsd_choices = ( 'FreeBSD' , 'NetBSD' , 'OpenBSD' , 'MacOS' ) if ( osdata [ 'os' ] in bsd_choices ) : grains [ 'ps' ] = 'ps auxwww' elif ( osdata [ 'os_family' ] == 'Solaris' ) : grains [ 'ps' ] = '/usr/ucb/ps auxwww' elif ( osdata [ 'os' ] == 'Windows' ) : grains [ 'ps' ] = 'tasklist.exe' elif ( osdata . get ( 'virtual' , '' ) == 'openvzhn' ) : grains [ 'ps' ] = 'ps -fH -p $(grep -l "^envID:[[:space:]]*0\\$" /proc/[0-9]*/status | sed -e "s=/proc/\\([0-9]*\\)/.*=\\1=")  | awk \'{ $7=""; print }\'' else : grains [ 'ps' ] = 'ps -efHww' return grains
return the ps grain .