Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bf7994b
test
1daidai1 Sep 3, 2025
0271348
change cplugin
1daidai1 Sep 9, 2025
5d4cd94
fix cgroup date
1daidai1 Sep 15, 2025
24e4f61
fix log
1daidai1 Sep 15, 2025
5ad06c8
bulk opt
1daidai1 Sep 16, 2025
3c1fb3c
use P/C thread
1daidai1 Sep 19, 2025
d5ed4f5
change stream out
1daidai1 Sep 22, 2025
fd3c72b
change stream size
1daidai1 Sep 22, 2025
841e435
opt code
1daidai1 Sep 23, 2025
72e1e68
use thread pool
1daidai1 Sep 23, 2025
9f1e9cb
add cpu_alloc_level
1daidai1 Sep 24, 2025
099df6e
opt code
1daidai1 Sep 26, 2025
4c2c8e3
add hour timer
1daidai1 Sep 29, 2025
d011006
add wckeyprocess
1daidai1 Oct 9, 2025
b10d326
add jobsize cmd
1daidai1 Oct 10, 2025
67ace70
change code style
1daidai1 Oct 13, 2025
25a130e
use one table
1daidai1 Oct 15, 2025
ac03985
use mongodb func
1daidai1 Oct 20, 2025
dcb3d04
opt code
1daidai1 Oct 21, 2025
08c4f8d
opt code
1daidai1 Oct 21, 2025
9161aec
opt query
1daidai1 Oct 23, 2025
7d4ec14
add time
1daidai1 Oct 24, 2025
c7e8813
add nodenamelist
1daidai1 Oct 28, 2025
654589b
opt code
1daidai1 Oct 28, 2025
c501a79
change query
1daidai1 Oct 29, 2025
249d8e5
opt code
1daidai1 Nov 3, 2025
f7fe0b9
rebase
1daidai1 Nov 4, 2025
ba42d14
opt code
1daidai1 Nov 4, 2025
efbf03a
opt rolltype
1daidai1 Nov 5, 2025
9312c12
fix name
1daidai1 Nov 7, 2025
727e0b5
opt code
1daidai1 Nov 10, 2025
2fd48bf
style: auto format with clang-format.
github-actions[bot] Nov 10, 2025
2e8dd79
fix comments
1daidai1 Nov 12, 2025
cc79aa5
add creport cmd help
1daidai1 Nov 18, 2025
caf1ce1
opt active agg
1daidai1 Nov 18, 2025
85add56
fix comments
1daidai1 Nov 27, 2025
e54ed84
style: auto format with clang-format.
github-actions[bot] Nov 27, 2025
58b6136
fix comments
1daidai1 Nov 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/en/command/cacct.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,4 @@ cacct -o="%.8j %20n %-10P %.15U %t"
- [cbatch](cbatch.md) - Submit batch jobs
- [ccancel](ccancel.md) - Cancel jobs
- [ceff](ceff.md) - View job efficiency statistics
- [creport](creport.md) - Query job-related statistics
1 change: 1 addition & 0 deletions docs/en/command/cbatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,4 @@ cbatch --wrap "echo Hello && sleep 10 && echo Done"
- [ccancel](ccancel.md) - Cancel jobs
- [cacct](cacct.md) - View job accounting information
- [ccontrol](ccontrol.md) - Control jobs and system resources
- [creport](creport.md) - Query job-related statistics
1 change: 1 addition & 0 deletions docs/en/command/ccancel.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,4 @@ Common errors:
- [cqueue](cqueue.md) - View job queue
- [cacct](cacct.md) - View job accounting information
- [ccontrol](ccontrol.md) - Control jobs and system resources
- [creport](creport.md) - Query job-related statistics
1 change: 1 addition & 0 deletions docs/en/command/ceff.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,4 @@ Memory Efficiency shows how much of the allocated memory was actually used:
- [cqueue](cqueue.md) - View active jobs in the queue
- [cbatch](cbatch.md) - Submit batch jobs
- [crun](crun.md) - Run interactive jobs
- [creport](creport.md) - Query job-related statistics
1 change: 1 addition & 0 deletions docs/en/command/cqueue.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,4 @@ cqueue --json
- [calloc](calloc.md) - Allocate resources
- [ccancel](ccancel.md) - Cancel jobs
- [cacct](cacct.md) - Query completed jobs
- [creport](creport.md) - Query job-related statistics
361 changes: 361 additions & 0 deletions docs/en/command/creport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,361 @@
# creport - Query Job-Related Statistics

**creport is mainly used to query job statistics related to users and accounts within a specified time range in the cluster.**

```bash
creport [<OPTION>] [<COMMAND>]
```

## Display User Resource Consumption Ranking
```bash
creport user topusage [--start-time=...] [--end-time=...] [--account=...] ...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

学习下ccontorl的文档结构吧

```
### Sample Output

![creport](../../images/creport/topusr.png)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

将图片的文字内容用代码块格式展示,不再上传原始图片


### Output Fields

- **CLUSTER**: Cluster name
- **LOGIN**: Username
- **PROPER NAME**: Full Linux system name
- **ACCOUNT**: Account name
- **USED**: The sum of total CPUs * runtime for each job under the user

### Command Line Options

#### Filtering Options
- **-A, --account string**: Specify accounts to query, use commas to separate multiple accounts
- **-u, --user string**: Specify users to query, use commas to separate multiple users
- **--group bool**: Group all accounts of each user together (default is separate entries for each user-account reference)
- **-t, --time string**: Specify the time unit for output job data (default is minutes)
- **--topcount uint32**: Specify the number of output entries (default is 10)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Display Account-User Resource Utilization
```bash
creport cluster accountutilizationbyuser [--start-time=...] [--end-time=...] [--account=...] ...
```
### Sample Output

![creport](../../images/creport/accountutilizationbyuser.png)

### Output Fields

- **CLUSTER**: Cluster name
- **ACCOUNT**: Account name
- **LOGIN**: Username
- **PROPER NAME**: Full Linux system name
- **USED**: The sum of total CPUs * runtime for each job under the user
- **ENERGY**: Energy consumed by jobs

### Command Line Options

#### Filtering Options
- **-A, --account string**: Specify accounts to query, use commas to separate multiple accounts
- **-u, --user string**: Specify users to query, use commas to separate multiple users
- **-t, --time string**: Specify the time unit for output job data (default is minutes)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Display User-Account Resource Utilization
```bash
creport cluster userutilizationbyaccount [--start-time=...] [--end-time=...] [--user=...] ...
```
### Sample Output

![creport](../../images/creport/userutilizationbyaccount.png)

### Output Fields

- **CLUSTER**: Cluster name
- **LOGIN**: Username
- **PROPER NAME**: Full Linux system name
- **ACCOUNT**: Account name
- **USED**: The sum of total CPUs * runtime for each job under the user
- **ENERGY**: Energy consumed by jobs

### Command Line Options

#### Filtering Options
- **-A, --account string**: Specify accounts to query, use commas to separate multiple accounts
- **-u, --user string**: Specify users to query, use commas to separate multiple users
- **-t, --time string**: Specify the time unit for output job data (default is minutes)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Display User-WCKEY Resource Utilization
```bash
creport cluster userutilizationbywckey [--start-time=...] [--end-time=...] [--user=...] ...
```
### Sample Output

![creport](../../images/creport/userutilizationbywckey.png)

### Output Fields

- **CLUSTER**: Cluster name
- **LOGIN**: Username
- **PROPER NAME**: Full Linux system name
- **WCKEY**: wckey name
- **USED**: The sum of total CPUs * runtime for each job under the user

### Command Line Options

#### Filtering Options
- **-u, --user string**: Specify users to query, use commas to separate multiple users
- **-t, --time string**: Specify the time unit for output job data (default is minutes)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Display WCKEY-User Resource Utilization
```bash
creport cluster wckeyutilizationbyuser [--start-time=...] [--end-time=...] [--wckeys=...] ...
```
### Sample Output

![creport](../../images/creport/wckeyutilizationbyuser.png)

### Output Fields

- **CLUSTER**: Cluster name
- **WCKEY**:wckey name
- **LOGIN**: Username
- **PROPER NAME**: Full Linux system name
- **USED**: The sum of total CPUs * runtime for each job under the user

### Command Line Options

#### Filtering Options
- **-w, --wckeys string**: Specify WCKEYs to query, use commas to separate multiple WCKEYs
- **-t, --time string**: Specify the time unit for output job data (default is minutes)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Display Account-QOS Resource Utilization
```bash
creport cluster accountutilizationbyqos [--start-time=...] [--end-time=...] [--account=...] [--qos=...] ...
```
### Sample Output

![creport](../../images/creport/accountutilizationbyqos.png)

### Output Fields

- **CLUSTER**: Cluster name
- **ACCOUNT**: Account name
- **QOS**: Qos name
- **USED**: The sum of total CPUs * runtime for each job under the user
- **ENERGY**: Energy consumed by jobs

### Command Line Options

#### Filtering Options
- **-A, --account string**: Specify accounts to query, use commas to separate multiple accounts
- **-q, --qos string**: Specify QOS to query, use commas to separate multiple QOS
- **-t, --time string**: Specify the time unit for output job data (default is minutes)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Display Overall Cluster Utilization
```bash
creport cluster utilization [--start-time=...] [--end-time=...] ...
```
### Sample Output

![creport](../../images/creport/utilization.png)

### Output Fields

- **CLUSTER**: Cluster name
- **ALLOCATE**: Total resources actually allocated by all jobs during the statistics interval (CPU minutes), i.e., sum of allocated cores × runtime minutes
- **QOWN**: Total downtime caused by node failures, maintenance, etc. during the statistics interval (CPU minutes), i.e., sum of down cores × downtime minutes
- **PLANEED**: Time when jobs are queued but resources are not allocated (CPU minutes), usually indicates resource shortage or queue overflow
- **REPORTED**: Theoretical maximum available time for all resources during the statistics interval (CPU minutes), i.e., total cluster cores × time span

### Command Line Options

#### Filtering Options
- **-t, --time string**: Specify the time unit for output job data (default is minutes)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Display Job Size Distribution Grouped by Account
```bash
creport job sizesbyaccount [--start-time=...] [--end-time=...] [--account=...] ...
```
### Sample Output

![creport](../../images/creport/sizesbyaccount.png)

### Output Fields

- **CLUSTER**: Cluster name
- **ACCOUNT**: Account name
- **0-49 CPUs**: CPU minutes in the 0-49 CPUs range
- **50-249 CPUs**: CPU minutes in the 50-249 CPUs range
- **250-499 CPUs**:CPU minutes in the 250-499 CPUs range
- **500-999 CPUs**: CPU minutes in the 500-999 CPUs range
- **>= 1000 CPUs**: CPU minutes in the ≥1000 CPUs range
- **TOTAL CPU TIME**: Total CPU minutes for all jobs under the specific account
- **% OF CLUSTER**: Percentage of total cluster job CPU minutes occupied

### Command Line Options

#### Filtering Options
- **-A, --account string**: Specify accounts to query, use commas to separate multiple accounts
- **--gid string**: Specify the gid to query, use commas to separate multiple gids
- **--grouping string**: Comma-separated list of size groupings (default: 50,100,250,500,1000)
- **--printjobcount bool**: Report will print the number of jobs in the range instead of the used time
- **-j, --jobs string**: Specify job IDs to query, use commas to separate multiple IDs (e.g., -j=2,3,4)
- **-n, --nodes string**: Specify node names to query, use commas to separate multiple nodes
- **-p, --partition string**: Specify partitions to query, use commas to separate multiple partitions
- **-t, --time string**: Specify the time unit for output job data (default is minutes)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Display Job Size Distribution Grouped by WCKEY
```bash
creport job sizesbywckey [--start-time=...] [--end-time=...] [--wckeys=...] ...
```
### Sample Output

![creport](../../images/creport/sizesbywckey.png)

### Output Fields

- **CLUSTER**: Cluster name
- **ACCOUNT**: Account name
- **0-49 CPUs**: CPU minutes in the 0-49 CPUs range
- **50-249 CPUs**: CPU minutes in the 50-249 CPUs range
- **250-499 CPUs**:CPU minutes in the 250-499 CPUs range
- **500-999 CPUs**: CPU minutes in the 500-999 CPUs range
- **>= 1000 CPUs**: CPU minutes in the ≥1000 CPUs range
- **TOTAL CPU TIME**: Total CPU minutes for all jobs under the specific account
- **% OF CLUSTER**: Percentage of total cluster job CPU minutes occupied

### Command Line Options

#### Filtering Options
- **-w --wckeys string**: Specify WCKEYs to query, use commas to separate multiple WCKEYs
- **--gid string**: Specify the gid to query, use commas to separate multiple gids
- **--grouping string**: Comma-separated list of size groupings (default: 50,100,250,500,1000)
- **--printjobcount bool**: Report will print the number of jobs in the range instead of the used time
- **-j, --jobs string**: Specify job IDs to query, use commas to separate multiple IDs (e.g., -j=2,3,4)
- **-n, --nodes string**: Specify node names to query, use commas to separate multiple nodes
- **-p, --partition string**: Specify partitions to query, use commas to separate multiple partitions
- **-t, --time string**: Specify the time unit for output job data (default is minutes)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Display Job Size Distribution Grouped by WCKEY and Account
```bash
creport job sizesbyaccountandwckey [--start-time=...] [--end-time=...] [--wckeys=...] ...
```
### Sample Output

![creport](../../images/creport/sizesbyaccountandwckey.png)

### Output Fields

- **CLUSTER**: Cluster name
- **ACCOUNT**: Account name
- **0-49 CPUs**: CPU minutes in the 0-49 CPUs range
- **50-249 CPUs**: CPU minutes in the 50-249 CPUs range
- **250-499 CPUs**:CPU minutes in the 250-499 CPUs range
- **500-999 CPUs**: CPU minutes in the 500-999 CPUs range
- **>= 1000 CPUs**: CPU minutes in the ≥1000 CPUs range
- **TOTAL CPU TIME**: Total CPU minutes for all jobs under the specific account
- **% OF CLUSTER**: Percentage of total cluster job CPU minutes occupied

### Command Line Options

#### Filtering Options
- **-A, --account string**: Specify accounts to query, use commas to separate multiple accounts
- **-w, --wckeys string**: Specify WCKEYs to query, use commas to separate multiple WCKEYs
- **--gid string**: Specify the gid to query, use commas to separate multiple gids
- **--grouping string**: Comma-separated list of size groupings (default: 50,100,250,500,1000)
- **--printjobcount bool**: Report will print the number of jobs in the range instead of the used time
- **-j, --jobs string**: Specify job IDs to query, use commas to separate multiple IDs (e.g., -j=2,3,4)
- **-n, --nodes string**: Specify node names to query, use commas to separate multiple nodes
- **-p, --partition string**: Specify partitions to query, use commas to separate multiple partitions
- **-t, --time string**: Specify the time unit for output job data (default is minutes)

#### Time Range Filtering
- **-S, --start-time string**: Specify the query start time (default is 00:00:00 of the previous day), format: `2023-03-14T10:00:00`
- **-E, --end-time string**: Specify the query end time (default is 23:59:59 of the previous day), format: `2023-03-14T10:00:00`

#### Other Options
- **-C, --config string**: Path to configuration file (default: `/etc/crane/config.yaml`)
- **-h, --help**: Show help information

## Manually Trigger Data Aggregation

**Used to manually trigger data aggregation. Only the root user is allowed to perform this operation.**

```bash
creport active
```

## Related Commands

- [cqueue](cqueue.md) - View job queue (current/pending jobs)
- [cbatch](cbatch.md) - Submit batch jobs
- [ccancel](ccancel.md) - Cancel jobs
- [ceff](ceff.md) - View job efficiency statistics
- [cacct](cacct.md) - Query completed jobs
Binary file added docs/images/creport/accountutilizationbyqos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/creport/accountutilizationbyuser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/creport/sizesbyaccount.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/creport/sizesbyaccountandwckey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/creport/sizesbywckey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/creport/topusr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/creport/userutilizationbyaccount.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/creport/userutilizationbywckey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/creport/utilization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/creport/wckeyutilizationbyuser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/zh/command/cacct.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,4 @@ cacct -o="%.8j %20n %-10P %.15U %t"
- [cbatch](cbatch.md) - 提交批处理作业
- [ccancel](ccancel.md) - 取消作业
- [ceff](ceff.md) - 查看作业效率统计
- [creport](creport.md) - 查询作业相关统计信息
1 change: 1 addition & 0 deletions docs/zh/command/cbatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,4 @@ cbatch --wrap "echo Hello && sleep 10 && echo Done"
- [ccancel](ccancel.md) - 取消作业
- [cacct](cacct.md) - 查看作业统计信息
- [ccontrol](ccontrol.md) - 控制作业和系统资源
- [creport](creport.md) - 查询作业相关统计信息
Loading