@@ -414,10 +414,7 @@ func ShowJobs(jobIds string, queryAll bool) util.CraneCmdError {
414
414
"\t StartTime=%v EndTime=%v Partition=%v NodeList=%v ExecutionHost=%v\n " +
415
415
"\t CmdLine=\" %v\" Workdir=%v\n " +
416
416
"\t Priority=%v Qos=%v CpusPerTask=%v MemPerNode=%v\n " +
417
- "\t ReqRes=node=%d cpu=%.2f mem=%v gres=%s\n " +
418
- "\t AllocRes=node=%d cpu=%.2f mem=%v gres=%s\n " +
419
- "\t ReqNodeList=%v ExecludeNodeList=%v\n " +
420
- "\t Exclusive=%v Comment=%v\n " ,
417
+ "\t ReqRes=node=%d cpu=%.2f mem=%v gres=%s\n " ,
421
418
taskInfo .TaskId , taskInfo .Name , craneUser .Username , taskInfo .Uid , group .Name , taskInfo .Gid ,
422
419
taskInfo .Account , taskInfo .Status .String (), runTimeStr , timeLimitStr , timeSubmitStr ,
423
420
timeStartStr , timeEndStr , taskInfo .Partition , formatHostNameStr (taskInfo .GetCranedList ()),
@@ -428,13 +425,22 @@ func ShowJobs(jobIds string, queryAll bool) util.CraneCmdError {
428
425
taskInfo .NodeNum , taskInfo .ReqResView .AllocatableRes .CpuCoreLimit * float64 (taskInfo .NodeNum ),
429
426
util .FormatMemToMB (taskInfo .ReqResView .AllocatableRes .MemoryLimitBytes * uint64 (taskInfo .NodeNum )),
430
427
formatDeviceMap (taskInfo .ReqResView .DeviceMap ),
431
- taskInfo .NodeNum , taskInfo .AllocatedResView .AllocatableRes .CpuCoreLimit ,
428
+ )
429
+
430
+ if taskInfo .Status == protos .TaskStatus_Running {
431
+ fmt .Printf ("\t AllocRes=node=%d cpu=%.2f mem=%v gres=%s\n " ,
432
+ taskInfo .NodeNum ,
433
+ taskInfo .AllocatedResView .AllocatableRes .CpuCoreLimit ,
432
434
util .FormatMemToMB (taskInfo .AllocatedResView .AllocatableRes .MemoryLimitBytes ),
433
435
formatDeviceMap (taskInfo .AllocatedResView .DeviceMap ),
434
- formatHostNameStr (util .HostNameListToStr (taskInfo .GetReqNodes ())),
435
- formatHostNameStr (util .HostNameListToStr (taskInfo .GetExcludeNodes ())),
436
- strconv .FormatBool (taskInfo .Exclusive ), formatJobComment (taskInfo .ExtraAttr ),
437
- )
436
+ )
437
+ }
438
+
439
+ fmt .Printf ("\t ReqNodeList=%v ExecludeNodeList=%v\n " +
440
+ "\t Exclusive=%v Comment=%v\n " ,
441
+ formatHostNameStr (util .HostNameListToStr (taskInfo .GetReqNodes ())),
442
+ formatHostNameStr (util .HostNameListToStr (taskInfo .GetExcludeNodes ())),
443
+ strconv .FormatBool (taskInfo .Exclusive ), formatJobComment (taskInfo .ExtraAttr ))
438
444
}
439
445
440
446
// If any job is requested but not returned, remind the user
0 commit comments