sebhildebrandt / systeminformation

System Information Library for Node.JS
MIT License
2.72k stars 309 forks source link

Processes state unkwon on Windows #393

Open araujo-luis opened 4 years ago

araujo-luis commented 4 years ago

Describe the bug

When List processes on windows return unknown state on all processes. On Mac works.

To Reproduce Steps to reproduce the behavior:

const si = require('systeminformation');
si.processes().then(data => console.log(data));

Current Output Return state unknown on all processes.

 {
      pid: 5480,
      parentPid: 5360,
      name: 'conhost.exe',
      pcpu: 0.000004135774156953456,
      pcpuu: 0.0000013785913856511521,
      pcpus: 0.0000027571827713023043,
      pmem: 0.008473429779580094,
      priority: 8,
      mem_vsz: 6420,
      mem_rss: 1408,
      nice: 0,
      started: '2020-07-30 10:00:15',
      state: 'unknown',
      tty: '',
      user: '',
      command: 'conhost.exe',
      path: '',
      params: ''
    }

Expected behavior Correct state processes

Environment (please complete the following information):

sebhildebrandt commented 4 years ago

@l222p ... According to MSDN (https://docs.microsoft.com/de-at/windows/win32/cimwin32prov/win32-process), status is not implemented. I need to think how I can get information about process status ...

sebhildebrandt commented 3 years ago

@araujo-luis ... I found this one https://stackoverflow.com/questions/25078819/status-of-the-process-in-powershell (leaving it here as a reference) and need to think how to implement this ...