-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
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