list_instances#

ansys.mapdl.core.cli.list_instances.list_instances(instances=False, long=False, cmd=False, location=False)#

Render a table with the MAPDL processes running on this machine.

Parameters:
instancesbool, default: False

Whether to list only the main processes (the instances), hiding their children.

longbool, default: False

Whether to include every available field. Implies cmd and location.

cmdbool, default: False

Whether to include the command line each process was started with.

locationbool, default: False

Whether to include the working directory of each process.

Returns:
str

Table ready to be printed. The table is empty when no MAPDL process is running.

Return type:

str

Examples

Print the running MAPDL instances:

>>> from ansys.mapdl.core.cli.list_instances import list_instances
>>> print(list_instances(instances=True))
Name          Status      gRPC port    PID
------------  --------  -----------  -----
ANSYS241.exe  running         50052  41644