PS command is not listing Windows processes
-
Your Windows build number: Microsoft Windows [Version 10.0.15063]
-
What you're doing and what's happening: When you use the PS command, it doesn't list the Windows processes
-
What's wrong / what should be happening instead: I should be able to see the Windows processes on the list as well
-
Strace of the failing command, if applicable: use command ps on ubuntu terminal
@rrezino - Yes, it is, as expected.
@rezzino: I guess it would help your case if you would provide a use case. E.g. do you need this functionality for your build setup to work?
"Use case" -- fair question. Interesting though, Cygwin/MSYS2 has a -W option in their ps implementation, that includes Windows processes in the list. Presumably not for their health, but I couldn't tell you why exactly. Shrug. Could be for their health, I guess.
Here's a use case. I have a Windows program that takes a while to run and uses memory. I want to use ps to monitor the process size via ps --pid <windows-pid> -o vsz= . I do this on Linux, but would like to use the same script to monitor the Windows processes.
To be honest, I'd rather use windows tools to monitor windows processes, but I can understand your desire to use the same script everywhere.
lacking this feature (ability to monitor windows processes) will prevent migration from cygwin for anything that needs to launch and control windows processes. I've got a couple of candidate applications that are preventing me from migrating.
Call tasklist.exe inside WSL using interop. You can "launch and control" windows processes with ease with WSL (this is part of its charm). Bearing in mind that the PID namespace for the Windows process and your WSL processes will be different.
when you "control", do you mean by using windows cli tools (e.g., taskkill.exe)?
Yes. You aren't going to get Cygwin equivalence because Cygwin ps is not Linux ps (anymore than you can with say Real Linux in a VM). But you can invoke anything in Windows from a WSL instance, be it tasklist.exe, taskkill.exe, or notepad.exe with impunity using interop as of Creators Update 15063.
I know this issue has been closed, but the proper solution to this had been if the microsoft windows processes had been presented as it's own namespace in the WSL, most of the GNU tools would have without modification been able to handle this and allowed computer users to get a full control of the game os too.
I know there's tasklist and wmic but having to call these within a wsl linux distro means having to parse 2 more program ouput instead of just one. Making any custom script tools I create ( actually already have on cigwin ) more complex. Not all windows programs are launched from wsl!!
Ps yet another reason migrating from cygwin is proving tricky! :(
the feature has been completed?