vtop icon indicating copy to clipboard operation
vtop copied to clipboard

Missing process list and other oddities in Windows

Open hyperlink opened this issue 11 years ago • 16 comments

This is what it looks like in Windows 7.

windows vtop

  • braille characters are drawn with an offset
  • process list is empty
  • other info doesn't line up

hyperlink avatar Jun 10 '14 18:06 hyperlink

You might wanna try cygwin, I think it supports Unicode, and also should install the 'ps' tool we use for the process list.

MrRio avatar Jun 10 '14 18:06 MrRio

And this is PowerShell on Windows 8. cmd.exe looks about the same.

vtop

branneman avatar Jun 11 '14 12:06 branneman

If I use an app like Console, the braille characters do work, but still no normal lines. Those should be easy to fix, right?

vtop

branneman avatar Jun 11 '14 12:06 branneman

I dont know of a version of ps for windows. The best alternative that i know of is tasklist.

cmc19 avatar Jun 11 '14 16:06 cmc19

Does Windows cygwin not ship with ps?

MrRio avatar Jun 11 '14 16:06 MrRio

ps can be easily added to windows, and tools like Git actually do this. There's a ps.exe inside my C:\Program Files (x86)\Git\bin, this is an example output:

┌─bvandermeer@laptop-work C:\Users\bvandermeer\Source
└─$ ps

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
     75       7     1120       3932    44     0,02   1056 armsvc
     66       7      932       3760    23     0,03   1480 AsLdrSrv
    132      10     1576       4972    59     0,03   2628 Ath_CoexAgent
     81       9     1360       5404    73     0,00   4984 ATKOSD2
     94       8     6748       8032    37     0,53   6824 audiodg
    341      31     8292      14852   165     1,19   4980 BtvStack
    866      38    13700      27336   111     2,73   2660 CcmExec
    302      19     6544      10252    72     0,11   2704 ccmsetup
    157      21    31392      23536   215     0,28    600 chrome
    158      21    29508      22720   212     0,30    904 chrome
    178      29    90788      22844   295     8,67   1756 chrome
...
     96       8     1272       4540    22     0,09   2308 svchost
    146      11     2024       6816    43     0,05   2516 svchost
    213      14     2264       5840    37     0,19   3096 svchost
    869       0      124        848     4    47,41      4 System
     72       8      884       3644    44     0,14    584 wininit
    161       9     1912       6440    58     0,33    656 winlogon
    121      11     3272       7220    38     0,14   3684 WmiPrvSE
    180      14     5092      10624    49     0,76   3872 WmiPrvSE
    134      10     2648       6368    31     0,03   6664 WmiPrvSE
    211      10     1432       5588    42     0,02   3264 WUDFHost

There's also projects like MinGW and GnuWin32, so there's multiple options for windows users to have stuff like ps.

branneman avatar Jun 13 '14 08:06 branneman

On the other hand there's the command tasklist on windows, which will always work. I think that's always a better option.

branneman avatar Jun 13 '14 08:06 branneman

I will build a new module to abstract away the os-specifics to get a list of currently running processes. This ought to be easy for me, since I have a windows system, and have got a lot of linux experience.

branneman avatar Jun 13 '14 08:06 branneman

Perfect :)

MrRio avatar Jun 13 '14 08:06 MrRio

FYI: Work In Progress here: https://github.com/branneman/current-processes

Once I'll get myself a FreeBSD and Solaris VM, I can finish and npm publish. Should be soon.

branneman avatar Jun 15 '14 20:06 branneman

Nice work :+1:

Can you paste me the output of

SET >> vars.txt

I'll see if I can tackle this term issue for the boxes.

MrRio avatar Jun 15 '14 21:06 MrRio

I think the term issue should be something that blessed should fix. Issue https://github.com/chjj/blessed/issues/28 describes this exact problem.

But here's your paste from my SET output. I censored some lines, but most of it is here:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\Users\bvandermeer>set
ALLUSERSPROFILE=C:\ProgramData
ANT_HOME=C:\Program Files (x86)\WinAnt
APPDATA=C:\Users\bvandermeer\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=**censored**
ComSpec=C:\WINDOWS\system32\cmd.exe
EDITOR=notepad.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\bvandermeer
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_25
LOCALAPPDATA=C:\Users\bvandermeer\AppData\Local
LOGONSERVER=**censored**
NODIST_X64=1
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\Program Files\ImageMagick-6.8.9-Q16;C:\Program Files\Python27\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\
v1.0\;C:\Program Files (x86)\Apache24\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Windows Imaging\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn
\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\svn-win32-1.7.10\bin;C:\users\bvandermeer\strawberry-perl\c\bin;C:\users\bvandermeer
\strawberry-perl\perl\site\bin;C:\users\bvandermeer\strawberry-perl\perl\bin;C:\Program Files\WinRAR\;C:\Program Files\MongoDB\bin;C:\Program Files (x86)\scala\\bin;
C:\Users\bvandermeer\.nodist\bin;C:\Program Files\dart\dart-sdk\bin;C:\Ruby200\bin;C:\Program Files (x86)\WinAnt\bin;C:\Program Files (x86)\Git\bin;C:\Program Files\
Java\jre7\bin;C:\Program Files\nssm
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3a09
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\Users\BVANDE~1\AppData\Local\Temp
TERM=dumb
TMP=C:\Users\BVANDE~1\AppData\Local\Temp
UATDATA=C:\Windows\SysWOW64\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77
USERDNSDOMAIN=**censored**
USERDOMAIN=**censored**
USERDOMAIN_ROAMINGPROFILE=**censored**
USERNAME=bvandermeer
USERPROFILE=C:\Users\bvandermeer
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
VS100COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
windir=C:\WINDOWS

branneman avatar Jun 16 '14 08:06 branneman

If I run SET TERM=windows-ansi before running vtop, I do get the correct lines. Maybe the solution could be as easy as upgrading blessed? Or do what the note on Windows says, add this:

if (process.platform === 'win32') {
    var screen = blessed.screen({ term: 'windows-ansi' });
}

branneman avatar Jun 16 '14 08:06 branneman

weird .. it doesnt even start on my machine (win 10 x64, node 5.4.1) citing: The system cannot find the path specified. not the vtop.cmd mind you, it can find that fine, but vtop.cmd is using /bin/sh.exe ? which obviously doesnt exist. reason being the bin/vtop file wanting to execute in a /bin/shinstead of in node (which would be correct for cross platform)

matthiasg avatar Jan 29 '16 11:01 matthiasg

Likewise same problem as @matthiasg . However on Windows 10 you can install the Linux subsystem (Ubuntu bash for Windows) and just install it from there. Works perfectly, even the ncurses style formatting. Downside is you only see processes within the subsystem, not Windows processes.

tjmoore avatar May 11 '17 08:05 tjmoore

I'm not able to get this started on Windows too...

Windows 10, Creators Update

'/bin/sh' is not recognized as an internal or external command,
operable program or batch file.

image

kumarharsh avatar Jun 22 '17 10:06 kumarharsh