+
Skip to content

Feature request: GECOS -> GECOS and Group #299

@stetner

Description

@stetner

Hi Sotiris,

Lately I have been adding this to my qtop.py:

d.stetner 18619 $ diff qtopnew/qtop.py  qtopdgs/qtop.py
1536c1536
<               '      GECOS field or Grid certificate DN |'}
---
>               '      GECOS field        |               Group |'}
1546a1547,1550
>             dgs_cmd = "id -nG " + str(user) + " | awk '{print $1}'"
>             _command = subprocess.Popen(dgs_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
>             dgs_name, dgs_err = _command.communicate()
>
1551c1555
<                             '{5:<{width40}} {sep}').format(
---
>                             '{5:<{width25}}{sep}{7:>{width20}} {sep}').format(
1558a1563
>                 colorize(dgs_name.strip(), pattern=userid_pat),
1565a1571,1572
>                 width25=25 + conditional_width,
>                 width20=20 + conditional_width,

Which splits the GECOS field into a GECOS and Group field and gives me this output (qtop -aGF) that I find useful to see what group is dominating the cluster.

Any chance of getting something similar added into the official line? There is probably a more efficient way of doing it...

Doug

screen shot 2017-06-29 at 11 18 50

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载