[gridengine users] Sorting qhost and choosing qstat columns

MacMullan IV, Hugh hughmac at wharton.upenn.edu
Thu Aug 1 14:39:28 UTC 2019


David,

Best for qhost sort would be to change your 'cluster' names to zero-padded, if you really want that kind of sorting. Or you could create an alias like 'qhost | sort -nk 1.8', assuming 'clusterX' is always true (the 8th character is where you start the sort).

As Skylar says, if you want a custom qstat, you should probably build one from the '-xml' output.

Regards,
-Hugh

-----Original Message-----
From: users-bounces at gridengine.org <users-bounces at gridengine.org> On Behalf Of David Trimboli
Sent: Thursday, August 1, 2019 9:59 AM
To: users Users <users at gridengine.org>
Subject: [gridengine users] Sorting qhost and choosing qstat columns

When I run qhost, the output is sorted alphabetically — which means 
"cluster10" appears before "cluster2," and so on.

Before I go writing bash functions to manually sort this, which might 
lead to output side-effects, is there any way to change the sort to a 
natural number sort, so that "cluster2" would appear before "cluster10," 
etc.?

When I run qstat, the normal wraps to a second line in my terminal set 
to 120 columns. I could fix that by eliminating the "jclass" column, 
which doesn't contain any information, but I can only find ways to add 
columns, not take them away. Is there a way to make this column go away?

_______________________________________________
users mailing list
users at gridengine.org
https://gridengine.org/mailman/listinfo/users



More information about the users mailing list