SystemProcesses

SystemProcesses[]

gives a list of processes that you are running on your computer system.

SystemProcesses[All]

gives a list of all processes that are running on your computer system.

SystemProcesses[patt]

gives a list of all processes whose names match the string pattern patt.

SystemProcesses[propval]

gives a list of all processes for which property prop has value val.

SystemProcesses[{prop1val1,}]

gives a list of all processes for which property propi has value vali.

Details

  • SystemProcesses returns a list of ProcessObject objects.
  • SystemProcesses returns processes sorted by PID.
  • SystemProcesses[All] gives different processes on different computer systems:
  • Windowsall unelevated processes
    Macprocesses only for the current user
    Linuxall non-kernel processes for all users
  • In SystemProcesses[prop->val], properties that can be used include:
  • "PID"process ID
    "PPID"parent process ID
    "Memory"memory the process is using
    "StartTime"date the process was started
    "RealTime"time since the process started
    "SystemTime"CPU time spent in kernel space
    "UserTime"CPU time spent in user space
    "Threads"number of threads
    "User"the user the process belongs to
    "Program"name of the program
    "Path"full file path of the program
    "Dataset"dataset of all properties and values

Examples

open allclose all

Basic Examples  (1)

List processes for the current user:

List processes for any user:

List any process with "Wolfram" in its path:

Scope  (2)

Find processes that use more than 100 megabytes:

Find processes by searching for a keyword in the path:

Search with multiple conditions:

Get a process object:

Return the memory used by the process:

Applications  (1)

Many of the processes retrieved can be terminated using KillProcess:

Make a histogram of the process thread count:

Properties & Relations  (1)

Normally, system processes are returned for the current user:

Possible Issues  (1)

SystemProcesses uses StringContainsQ and string expressions to look for processes:

The * wildcard will not work here:

Wolfram Research (2018), SystemProcesses, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemProcesses.html.

Text

Wolfram Research (2018), SystemProcesses, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemProcesses.html.

CMS

Wolfram Language. 2018. "SystemProcesses." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SystemProcesses.html.

APA

Wolfram Language. (2018). SystemProcesses. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SystemProcesses.html

BibTeX

@misc{reference.wolfram_2024_systemprocesses, author="Wolfram Research", title="{SystemProcesses}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/SystemProcesses.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_systemprocesses, organization={Wolfram Research}, title={SystemProcesses}, year={2018}, url={https://reference.wolfram.com/language/ref/SystemProcesses.html}, note=[Accessed: 21-November-2024 ]}