Default config error
kirkov opened this issue · 6 comments
kirkov commented
Hi, I get the following error when I use the default config file.
Monitoring local server
C:\Users\Mark\AppData\Roaming\npm\node_modules\monjs\perfmon.js:42
var host = counters.length > 0 ? /\\\\(\w+)\\/.exec(counters[0])[1] : "";
^
TypeError: Cannot read property '1' of null
at C:\Users\Mark\AppData\Roaming\npm\node_modules\monjs\perfmon.js:42:71
at null.<anonymous> (C:\Users\Mark\AppData\Roaming\npm\node_modules\monjs\node_modules\csv-parse\lib\index.js:63:16)
at emit (events.js:117:20)
at _stream_readable.js:938:16
at process._tickCallback (node.js:419:13)
`
soheilpro commented
@kirkov Could you please run this command and send me the output?
typeperf -sc 1 "\Processor(_Total)\% Processor Time"
Deleted user commented
I get the same error.
C:>typeperf -sc 1 "\Processor(_Total)% Processor Time"
"(PDH-CSV 4.0)","\MYDESKTOP\Processor(_Total)% Processor Time"
"11/10/2014 09:15:37.733","29.041660"
The command completed successfully.
C:>
soheilpro commented
@dendory Thanks. It's fixed now.
Deleted user commented
Still crashes for me. Perhaps because my machine name has a '-' in it? I changed line 42 to the following and now it works:
var host = counters.length > 0 ? counters[0].split('\\')[2] : "";
soheilpro commented
Thanks. Fixed it again.
kirkov commented
Works now, thanks!
and thanks @dendory, for following up :)