Function: proced

proced is an autoloaded, interactive and byte-compiled function defined in proced.el.gz.

Signature

(proced &optional ARG)

Documentation

Generate a listing of UNIX system processes.

If invoked with optional non-negative ARG, do not select the window displaying the process information.

If proced-show-remote-processes is non-nil or the command is invoked with a negative ARG C-u (universal-argument) M-- (negative-argument), and default-directory points to a remote host, the system processes of that host are shown.

This function runs the normal hook proced-post-display-hook.

See proced-mode for a description of features available in Proced buffers.

Probably introduced at or before Emacs version 23.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/proced.el.gz
;;;###autoload
(defun proced (&optional arg)
  "Generate a listing of UNIX system processes.
\\<proced-mode-map>
If invoked with optional non-negative ARG, do not select the
window displaying the process information.

If `proced-show-remote-processes' is non-nil or the command is
invoked with a negative ARG `\\[universal-argument] \\[negative-argument]', \
and `default-directory'
points to a remote host, the system processes of that host are shown.

This function runs the normal hook `proced-post-display-hook'.

See `proced-mode' for a description of features available in
Proced buffers."
  (interactive "P")
  (unless proced-available
    (error "Proced is not available on this system"))
  (let ((buffer (get-buffer-create "*Proced*")) new)
    (set-buffer buffer)
    (when (and (file-remote-p default-directory)
               (not
                (or proced-show-remote-processes
                    (eq arg '-))))
      (setq default-directory temporary-file-directory))
    (setq new (zerop (buffer-size)))
    (when new
      (proced-mode)
      ;; `proced-update' runs `proced-post-display-hook' only if the
      ;; Proced buffer has been selected.  Yet the following call of
      ;; `proced-update' is for an empty Proced buffer that has not
      ;; yet been selected.  Therefore we need to call
      ;; `proced-post-display-hook' below.
      (proced-update t))
    (if arg
        (progn
          (display-buffer buffer)
          (with-current-buffer buffer
            (proced-update t)))
      (pop-to-buffer buffer)
      (proced-update t)
      (message
       (substitute-command-keys
        "Type \\<proced-mode-map>\\[quit-window] to quit, \\[proced-help] for help")))))