PsList - CMD


Overview

PsList is a command-line utility tool that displays detailed information about processes running on a Microsoft Windows system. It’s useful in monitoring system performance, troubleshooting issues, and providing a snapshot of the current processes, making it essential for system administrators and advanced users when managing system resources or debugging applications.

Syntax

The basic syntax for PsList is:

PsList [options] [[\\Computer [-u Username [-p Password]]] Name|Pid]
  • \\Computer specifies the target computer. Local machine is the default.
  • Name specifies the process name to list.
  • Pid is the Process Identifier.
  • -u Username specifies the user context under which the command should execute.
  • -p Password is the password for the user context.

Options/Flags

  • -t : Shows the process tree.
  • -x : Shows processes, threads, and CPU usage; basically extends the information.
  • -m : Displays memory usage information.
  • -d : Only show processes with disk time.
  • -e : Show elapsed time in HH:MM format.
  • -a : List all information available about a process.
  • -r : Repeat the interval of display, in seconds.

Default behavior without arguments is to list information about all processes on the system.

Examples

  1. List all processes:
    PsList
    
  2. List details of a specific process by PID:
    PsList 1234
    
  3. View the process tree of the local system:
    PsList -t
    
  4. Monitor a specific process repeatedly every 5 seconds:
    PsList -r 5 notepad
    
  5. Display extended information about all processes:
    PsList -x
    

Common Issues

  • Access Denied: Ensure you have administrative privileges or correct credentials if accessing a remote computer.
  • Process Not Found: Double-check the process name or PID provided. The process might have terminated before or just after invoking the command.

Integration

PsList can be integrated with other commands like findstr for filtering output. For example, to find a process named “chrome”:

PsList | findstr chrome

Combine with taskkill to stop a troublesome process:

PsList | findstr example | for /f "tokens=2" %i in ('findstr PID') do taskkill /PID %i
  • PsKill – Used to terminate processes.
  • PsInfo – Provides system information.
  • PsLoggedOn – Shows users logged on to a system.

For more information, refer to the official Microsoft documentation or Sysinternals website.

This manual provides a comprehensive guide to using PsList effectively for managing and troubleshooting processes in a Windows environment.