-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No such process found! #7
Comments
Weird, I am also having this issue. It just doesn't work! ps.lookup {command: 'node'}, (err,res) ->
console.log 'ps.lookup', err, res # always null, [] OSX 10.10 |
This doesn't work at all for me in Winows either. No processes are ever returned. |
I believe issue is with the TableParser.parse method. On Mac, I run However, when running ps.lookup, that process isn't found. |
@sleman you're correct - it seemed to be a problem with TableParse - it wasn't parsing the PID correctly @neekey please see neekey/table-parser#3 any comment? |
Hi, guys, I'm sure this is caused by neekey/table-parser#3 , I will fix it soon. |
Does not work for me on windows. Actually there is this forked version that seems to work : https://www.npmjs.com/package/ps-nodejs |
Yep TableParse is the issue. It is expecting line endings to be \n when they can be \r (even on windows). |
👍 |
Or just use sindre sorhus' package which works: https://github.com/sindresorhus/ps-list I'm all for alternatives, but this code has been broken since I first tried it 6 months ago. You should make a note in the readme that it doesn't work so people don't keep wasting time, until if/when it is fixed. |
Awesome, thanks for the suggestion @jamietre! |
On the |
i noticed, i don't get a result when calling with an interger as pid paremeter, but converting it to a string it works just well. i looked into the code and at // 若限定了id列表
if( idList && idList.indexOf( String( p.pid ) ) < 0 ){
return;
} you are casting |
ping @neekey. |
well, i sent @neekey an email, but so far no response. i implemented the functionality i needed myself in this module, feel free to use it. |
Does this work for Windows 10 64-bit? |
(It doesn't seem to work for me in Windows 10 64-bit..is not finding any processes by ID (using the first example in the help) |
@PaulTerryGameDev this uses the |
Sorry guys! I'm back! I just rewrite table-parser with connected-domain, and I create a new branch of PS using the latest version of table-parser. The parser problem should be fixed, but I need you to help me test with it, install it through github:
@yetzt your PR is included @PaulTerryGameDev I haven't got a chance to try win 10, can you open a new issue for it? |
Hi guys, I have published version 0.1.0, and I will focus on these two issues( neekey/table-parser#4, #10 ) ,feel free to reopen this issue if you encounter any problem related. |
I'm having this issue now with latest version |
Hi @Luiz-N, could you please provide more details like:
thank you 2016年5月7日星期六,Luiz-N [email protected] 写道:
发自移动版 Gmail |
I have the same issue with latest version
I'm using code from first example with my existsting pid |
@cloudtaxi ps-node has already passed test on Mac and Linux through https://travis-ci.org/neekey/ps, and I tested it with NodeJS 6.1.0 on my Mac, it works. Can you install the latest version of 0.1.1, run its test cases with Thank you |
I have the same issue as @cloudtaxi .
|
It may be much more easy to parse result if you use formatted output as https://github.com/yibn2008/find-process/blob/master/lib/find_process.js#L27 |
@summerwish if your problem is caused by multiple-byte characters, then it is a know issue with table-parser neekey/table-parser#4 However, the link you provided does not help much as you can see from the manual for -w Use 132 columns to display information, instead of the default which is your window size. If the -w option is specified more than once, ps will use as many columns as necessary without regard for your
window size. When output is not to a terminal, an unlimited number of columns are always used.
-o Display information associated with the space or comma separated list of keywords specified. Multiple keywords may also be given in the form of more than one -o option. Keywords may be appended with
an equals (`=') sign and a string. This causes the printed header to use the specified string instead of the standard header. If all keywords have empty header texts, no header line is written.
Another idea I just came out is maybe there's a way I can enforce the PS command to output a specified language like English, but I am not sure if it can be done. How this can give you a little help : ) |
Hi, thanks for your explanation! How about just split each row by whitespace? Since you can use |
@summerwish the situation is much more complicated than you may have thought, for example, for some rows their certain field may be blank, and another case is that for COMMAND filed, they will include space to separate their command and arguments like:
and in windows you may not be able to control the position for COMMAND field, and not even in some case you will encounter strings like below:
Hope this makes sense to you |
Besides, ps.lookup({ psargs: 'ux' }, ...); outputs: { pid: 'Breezewish',
command: 'node',
arguments: [ 't.js' ],
ppid: undefined } which is not correct |
Wow. Windows is a problem that I didn't considered :( |
Hi @neekey, I had this issue now: Attempt to found an active process by its name: NearoHostServer.exe - Fail each time and got My code:
Not Working:
Windows 10 x64, table-parser version 0.1.1, ps-node version 0.1.1. |
@MikiDavid thanks for submiting this bug, it seems like a problem caused by string matching, should be fixed easily. |
@MikiDavid I just published 0.1.2, it should fix this bug. |
not working |
Following the code:
Why it didn't work? I also randomly picked pid from
ps -A
and it still didn't work.The text was updated successfully, but these errors were encountered: