Skip to content
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

Only include the required output in ps #69

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Empact
Copy link

@Empact Empact commented Dec 25, 2017

On mac, ps l 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 output can be misaligned, e.g. when some VSZ field is
longer than expected.

VSZ and many others of these fields are unnecessary because we're looking
up by name, pid, ppid, or arguments only. Here I select those directly.

@Empact
Copy link
Author

Empact commented Dec 25, 2017

Another attempt to fix #62. Only tested on mac.

@Empact
Copy link
Author

Empact commented Dec 25, 2017

Removed the [] because with it in place, I got the following:

screen shot 2017-12-25 at 02 22 31

@Empact
Copy link
Author

Empact commented Dec 25, 2017

See also #64

@Empact
Copy link
Author

Empact commented Dec 26, 2017

Seems like the output is not being properly parsed by table-parser

@Empact
Copy link
Author

Empact commented Dec 26, 2017

Fixing this required making a fix to table-parser: neekey/table-parser#12

@Empact
Copy link
Author

Empact commented Jan 19, 2018

Mac build delays on Travis, fyi: https://www.traviscistatus.com/incidents/mc9x2wmpnvhg

@neekey
Copy link
Owner

neekey commented Apr 7, 2018

@Empact Hi, you can now use [email protected]

Can you try using the new version of table-parser first instead of change the default lx, which might have impact for linux

@neekey neekey changed the base branch from master to develop April 8, 2018 00:14
On mac, lx 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 output can be misaligned, e.g. when some VSZ field is
longer than expected.

VSZ and many others of these fields are unnecessary because we're looking
up by name, pid, ppid, or arguments only. Here I select those directly.

This requires neekey/table-parser#12 which was released in table-parser 1.0.0+
@Empact
Copy link
Author

Empact commented Apr 8, 2018

@neekey rebased and updated dependency 👍

@neekey
Copy link
Owner

neekey commented Apr 8, 2018

@Empact can you revert the change of var exeArgs = query.psargs || ['lx']; to see if it works for you?

@Empact
Copy link
Author

Empact commented Apr 8, 2018 via email

@Empact
Copy link
Author

Empact commented Jun 6, 2018

@neekey Can confirm that this does not work without the change to ['lx']. The problem is that the ps output becomes misaligned due to poor handling of data on ps's side. The fix works by excluding the columns that are likely to overflow.

Agree we need to test for impact against linux. FWIW ubuntu man page is consistent with this use: http://manpages.ubuntu.com/manpages/xenial/man1/ps.1.html

@Empact
Copy link
Author

Empact commented Aug 17, 2018

@neekey Thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants