code: def proc_info(pid, attrs=None):
      '''
      Return a dictionary of information for a process id (PID).
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' ps.proc_info 2322
          salt '*' ps.proc_info 2322 attrs='["pid", "name"]'
  
      pid
          PID of process to query.
  
      attrs
          Optional list of desired process attributes.  The list of possible
          attributes can be found here:
          http://pythonhosted.org/psutil/#psutil.Process
      '''
      try:
          proc = psutil.Process(pid)
          return proc.as_dict(attrs)
      except (psutil.NoSuchProcess, psutil.AccessDenied, AttributeError) as exc:
          raise CommandExecutionError(excf proc_info(pid, attrs=None):
      '''
      Return a dictionary of information for a process id (PID).
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' ps.proc_info 2322
          salt '*' ps.proc_info 2322 attrs='["pid", "name"]'
  
      pid
          PID of process to query.
  
      attrs
          Optional list of desired process attributes.  The list of possible
          attributes can be found here:
          http://pythonhosted.org/psutil/#psutil.Process
      '''
      try:
          proc = psutil.Process(pid)
          return proc.as_dict(attrs)
      except (psutil.NoSuchProcess, psutil.AccessDenied, AttributeError) as exc:
          raise CommandExecutionError(exc)
docs: Return a dictionary of information for a process id (PID).
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' ps.proc_info 2322
          salt '*' ps.proc_info 2322 attrs='["pid", "name"]'
  
      pid
          PID of process to query.
  
      attrs
          Optional list of desired process attributes.  The list of possible
          attributes can be found here:
          http://pythonhosted.org/psutil/#psutil.Process