@@ -300,7 +300,7 @@ func ProcessAccount(task *protos.TaskInfo) string {
300
300
301
301
// 'c' group
302
302
func ProcessAllocCpus (task * protos.TaskInfo ) string {
303
- return strconv .FormatFloat (task .ReqResView .AllocatableRes .CpuCoreLimit , 'f' , 2 , 64 )
303
+ return strconv .FormatFloat (task .AllocatedResView .AllocatableRes .CpuCoreLimit * float64 ( task . NodeNum ) , 'f' , 2 , 64 )
304
304
}
305
305
306
306
// 'C' group
@@ -348,11 +348,8 @@ func ProcessNodeList(task *protos.TaskInfo) string {
348
348
349
349
// 'm' group
350
350
func ProcessAllocMemPerNode (task * protos.TaskInfo ) string {
351
- if task .NodeNum == 0 {
352
- return "0"
353
- }
354
- return strconv .FormatUint (task .ReqResView .AllocatableRes .MemoryLimitBytes /
355
- uint64 (task .NodeNum ) / (1024 * 1024 ) , 10 )
351
+ return strconv .FormatUint (
352
+ task .AllocatedResView .AllocatableRes .MemoryLimitBytes / (1024 * 1024 ), 10 )
356
353
}
357
354
358
355
// 'M' group
@@ -383,7 +380,7 @@ func ProcessQoS(task *protos.TaskInfo) string {
383
380
return task .Qos
384
381
}
385
382
386
- // 'Q' groupProcessReqCpus
383
+ // 'Q' group
387
384
func ProcessReqCPUs (task * protos.TaskInfo ) string {
388
385
return strconv .FormatFloat (task .ReqResView .AllocatableRes .CpuCoreLimit * float64 (task .NodeNum ), 'f' , 2 , 64 )
389
386
}
@@ -596,9 +593,9 @@ func FormatData(reply *protos.QueryTasksInfoReply) (header []string, tableData [
596
593
field = strings .ToLower (field )
597
594
}
598
595
599
- //a/ Account, c/ AllocCPUs, C/ ReqCpus, e/ ElapsedTime, h/ Held, j/ JobID, l/ TimeLimit, L/ NodeList, k/ Comment,
600
- //m/ AllocMemPerNode, M/ ReqMemPerNode, n/ Name, N/ NodeNum, p/ Priority, P/ Partition, q/ Qos, Q/ ReqCpuPerNode, r/ ReqNodes,
601
- //R/ Reason, s/ SubmitTime, S/ StartTime, t/ State, T/ JobType, u/ User, U/ Uid, x/ ExcludeNodes, X/ Exclusive.
596
+ //a- Account, c- AllocCPUs, C- ReqCpus, e- ElapsedTime, h- Held, j- JobID, l- TimeLimit, L- NodeList, k- Comment,
597
+ //m- AllocMemPerNode, M- ReqMemPerNode, n- Name, N- NodeNum, p- Priority, P- Partition, q- Qos, Q- ReqCpuPerNode, r- ReqNodes,
598
+ //R- Reason, s- SubmitTime, S- StartTime, t- State, T- JobType, u- User, U- Uid, x- ExcludeNodes, X- Exclusive.
602
599
fieldProcessor , found := fieldMap [field ]
603
600
if ! found {
604
601
log .Errorf ("Invalid format specifier or string : %s, string unfold case insensitive, reference:\n " +
0 commit comments