Page 1 of 1

get list of running applications

Posted: Thu Jan 19, 2023 6:09 pm
by adventuresofgreg
Hey there:

Is there a windows shell command (or other command) that will return a list of the currently running applications? Specifically, I would like to get a list of which LC standalones that are currently running. My stack exports multiple versions of itself as standalones, then another stack launches each SA, 1 per core, then runs the program (processes data), and quits when finished. I need to monitor when the SA quits so that I can launch another SA - the idea is I want to always be using an available core. Any ideas?

Thanks!
Greg

Re: get list of running applications

Posted: Thu Jan 19, 2023 8:14 pm
by stam
Not sure on windows (the Mac way was discussed on the forums not so long ago I think).
Perhaps look here https://superuser.com/questions/914782/ ... in-windows ?

Re: get list of running applications

Posted: Thu Jan 19, 2023 9:42 pm
by mrcoollion
The Windows tasklist command will return a list of currently running applications, including the process ID of each.

Example:
C:\> tasklist
This will return the list of running processes.
Example 2:
C:\> tasklist /fi "imagename eq notepad.exe"
This will return the list of running processes with the image name of "notepad.exe".

Here are all the windows tasklist command options. And an explainion of each option.

1. tasklist /v: Displays the list of tasks and additional information such as the memory usage, CPU time, startup time and the user name of each task.

2. tasklist /s: Displays the tasks on the specified remote computer.

3. tasklist /fi: Filters the tasks list using a given criteria.

4. tasklist /m: Displays the loaded modules for each task.

5. tasklist /svc: Displays the services used by each task.

6. tasklist /fo: Formats the output in the specified format.

7. tasklist /nh: Hides the list header.

8. tasklist /vhd: Displays the virtual memory size of each task.

9. tasklist /tr: Displays the full path of each task.

10. tasklist /sfi: Displays the list of tasks and additional information such as the image name, process ID, session ID and the number of threads used by each task

Regards,

Paul

Re: get list of running applications

Posted: Fri Jan 20, 2023 12:31 am
by adventuresofgreg
perfect! that works. Thanks!

Re: get list of running applications

Posted: Fri Jan 20, 2023 8:25 am
by FourthWorld
Good to see you taking a break here from your travels, Greg.

Another thought: If the spawned instances connected with the launching app via sockets then the launcher would not only know about them, but could communicate with them, control them, pass them data as needed. And you'd always have them running, no need to quit when a given task is done and then relaunch for the next task.

Re: get list of running applications

Posted: Fri Jan 20, 2023 8:01 pm
by jacque
Would the openProcesses function work? The clones would have to be started with "open process".

Re: get list of running applications

Posted: Fri Jan 20, 2023 11:43 pm
by adventuresofgreg
Richard that's actually a really good suggestion, but I would still have to spawn these SA's because much of the processing rules for the data is contained in them, and that changes all the time.. unless I can pass the processing data to each one.. hmm.. thinking about that. Great suggestion.

Greg
FourthWorld wrote:
Fri Jan 20, 2023 8:25 am
Good to see you taking a break here from your travels, Greg.

Another thought: If the spawned instances connected with the launching app via sockets then the launcher would not only know about them, but could communicate with them, control them, pass them data as needed. And you'd always have them running, no need to quit when a given task is done and then relaunch for the next task.

Re: get list of running applications

Posted: Fri Jan 20, 2023 11:47 pm
by FourthWorld
If you wanna brainstorm any of this give me a call. It's always fun catching up with you. I'll tell you LC tales and you can tell me hiking tales.