zk-phi / symon

Tiny graphical system monitor
289 stars 26 forks source link

Not functional on Windows 7 Enterprise (German) #16

Closed theldoria closed 9 years ago

theldoria commented 9 years ago

Still only get N/A for all values. The tool wmic is available and works, with following output:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

C:\>wmic
wmic:root\cli>path Win32_ComputerSystem get TotalPhysicalMemory
TotalPhysicalMemory
8542261248

wmic:root\cli>path Win32_OperatingSystem get FreePhysicalMemory
FreePhysicalMemory
837644

wmic:root\cli>path Win32_Battery get EstimatedChargeRemaining
Keine Instanzen verfügbar.

wmic:root\cli>path Win32_PageFileUsage get CurrentUsage
CurrentUsage
5180

wmic:root\cli>
"/?" zeigt die Hilfe an, mit QUIT wird das Programm beendet.
wmic:root\cli>exit
zk-phi commented 9 years ago

please confirm that following command is available on your command prompt :

powershell -command (gwmi Win32_ComputerSystem).TotalPhysicalMemory
theldoria commented 9 years ago

It is, with following output:

C:\>powershell -command (gwmi Win32_ComputerSystem).TotalPhysicalMemory
8542261248
zk-phi commented 9 years ago

hmm... how about this one ?

(shell-command-to-string
 (concat "powershell -command "
         "echo ----;"
         "(gwmi Win32_ComputerSystem).TotalPhysicalMemory;"
         "(gwmi Win32_OperatingSystem).FreePhysicalMemory;"
         "(gwmi Win32_Battery).EstimatedChargeRemaining;"
         "(gwmi Win32_PageFileUsage).CurrentUsage"))
theldoria commented 9 years ago

Got the following using C-u C-x C-e at end of sexp:

(shell-command-to-string
           (concat "powershell -command " symon--powershell-wmi-command))
"----
8542261248
2310708
4805
"
theldoria commented 9 years ago

Guessed it is the missing battery, so I did this for you:

(shell-command-to-string
(concat "powershell -command "
         "echo ----;"
         "(gwmi Win32_ComputerSystem).TotalPhysicalMemory;"
         "echo -0;"
         "(gwmi Win32_OperatingSystem).FreePhysicalMemory;"
         "echo -1;"
         "(gwmi Win32_Battery).EstimatedChargeRemaining;"
         "echo -2;"
         "(gwmi Win32_PageFileUsage).CurrentUsage"))"----
8542261248
-0
2271036
-1
-2
4803
"
zk-phi commented 9 years ago

ah, (gwmi Win32_Battery).EstimatedChargeRemaining; seems not available on your system. maybe I can fix it in the next version.

zk-phi commented 9 years ago

thanks. exactly.