-
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
Parse OSX process details correctly #64
base: master
Are you sure you want to change the base?
Parse OSX process details correctly #64
Conversation
@neekey have you had time to look at this yet? |
Hi @milankinen thanks for your PR. Your way of parsing the output is quite the same as the original version of this module, which works in this case but will fail in other cases as well, so I won't accept this as a solution, though it works in your case. you can take a look at this discussion neekey/table-parser#3 (comment), there are more cases like the discussion mentioned. Actually table-parser has done its best already (since it tries to catch as much edge cases as it can), but it can't work well if the input's format is very hard to predict, there is a boundary needs to be set for table-parser's ability. So instead of improving table-parser itself, I am thinking if there's any way to regulate the output format of |
yes, I think I can definitely narrow down the metrics to only |
I coudn't find those cases (not even from the table parser thread you posted). Could you provide a link to them?
Yes that's definitely the right way, although it'd introduce non-backwards compatible API changes. The purpose of this PR is to fix the parsing without breaking the backwards compatibility so that's why I thought it could be the first step. |
Hello, when will this commit be merged into the release branch? I am dealing with an error and this is the solution needed.. I am currently using this commit in order to work now. would appreciate it if we could get in though.. |
I believe you could run the
|
On mac, the ps output can be misaligned, e.g. when some VSZ field is longer than expected. The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the default fields of ps. neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
`ps x -o pid,command` rather than `ps lx` The default ps-node lookup is via ps lx, which includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the `ps l` output can be misaligned, e.g. when some VSZ field is longer than expected. Many of these fields are unnecessary because we're looking up by name only, so we can lookup using only the command fields of ps. https://gist.github.com/ivankovacevic/9918272 More on the issue with ps-node: neekey/table-parser#11 neekey/ps#64
Hello!
Here is a fix for #62.
TableParser
was a bit too generic so I tailored the parsing logic forps
in order to improve robustness. I added a test case based on the given example output from #62.I hope we can get this fix released asap. Our testing pipeline needs this fix because
testcafe
(which depends on this package) can't parse browser PID correctly, hence leaving the browser process open after every test run. 😕