@@ -54,11 +54,9 @@ parser.add_argument('--gpu', action = 'store_true', help = 'show gpu resources')
54
54
parser .add_argument ('--license' , action = 'store_true' , help = 'show available licenses' )
55
55
parser .add_argument ('--reserve' , action = 'store_true' , help = 'show reservation' )
56
56
parser .add_argument ('--topusage' , action = 'store_true' , help = 'show top usage users' )
57
- if os .popen ('which ldapsearch 2> /dev/null' ).read ():
58
- parser .add_argument ('--whodat' , help = 'show users informations by uid' , metavar = 'UID' )
59
- parser .add_argument ('--whodat2' , help = 'show users informations by name' , metavar = 'UNAME' )
60
- if os .popen ('which ssh-agent 2> /dev/null' ).read ():
61
- parser .add_argument ('--agent' , choices = ['start' ,'stop' ,'list' ], help = 'start/stop/list ssh-agents on the current host' )
57
+ parser .add_argument ('--whodat' , help = 'show users informations by uid' , metavar = 'UID' )
58
+ parser .add_argument ('--whodat2' , help = 'show users informations by name' , metavar = 'UNAME' )
59
+ parser .add_argument ('--agent' , choices = ['start' ,'stop' ,'list' ], help = 'start/stop/list ssh-agents on the current host' )
62
60
args = parser .parse_args ()
63
61
64
62
if len (sys .argv ) == 1 :
@@ -181,6 +179,7 @@ if args.ncpu:
181
179
if len (part_cpu ) == 0 :
182
180
print ('No CPU partition found in the config file!' )
183
181
sys .exit (1 )
182
+
184
183
print (' Number of CPUs ' .center (90 ,'-' ))
185
184
for p in part_cpu :
186
185
idle = os .popen (f"""
@@ -194,6 +193,7 @@ if args.ngpu:
194
193
if len (part_gpu ) == 0 :
195
194
print ('No GPU partition found in the config file!' )
196
195
sys .exit (1 )
196
+
197
197
print (' Number of GPUs ' .center (90 ,'-' ))
198
198
for g in part_gpu :
199
199
unavail = os .popen (f"""
@@ -275,6 +275,7 @@ if args.quota:
275
275
if len (disk_quota ) == 0 :
276
276
print ('No disk found in the config file!' )
277
277
sys .exit (1 )
278
+
278
279
gpn = os .popen (f"""
279
280
echo $(groups { args .user } | grep -Po "(?<=: ).*")
280
281
""" ).read ().strip ().split ()
0 commit comments