def syspro():
 import os
 grains = {}
 pids = []
 try:
  for subdir in os.listdir('/proc'):
   if subdir.isdigit():
    pids.append(subdir)
  strlist = len(pids)
 except Exception as e:
  strlist = str(e)
 grains['sysprocessnum'] = str(len(pids))
 return grains

def syspro ( ) : import os grains = { } pids = [ ] try : for subdir in os . listdir ( '/proc' ) : if subdir . isdigit ( ) : pids . append ( subdir ) strlist = len ( pids ) except Exception as e : strlist = str ( e ) grains [ 'sysprocessnum' ] = str ( len ( pids ) ) return grains
return system process number .