Is there a "built-in" way to list all MS Windows tasks currently running?
I've googled a bit and found a workaround via shell("tasklist")
, but I don't really like the structure of the resulting R object as its pretty "captured-output-only" like (i.e. the resulting object is a character vector containing things like line numbers etc.) and I would have to fire some regular expressions at it to turn it into something like a data frame or the like:
value <- shell("tasklist", intern=TRUE)
> value
[1] ""
[2] "Abbildname PID Sitzungsname Sitz.-Nr. Speichernutzung"
[3] "========================= ======== ================ =========== ==============="
[4] "System Idle Process 0 Services 0 24 K"
[5] "System 4 Services 0 9.404 K"
[...]
[96] "tasklist.exe 6876 Console 1 6.040 K"