aggrstruct.py 1.16 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
class ProcData:
    cpu_time_user = None
    cpu_time_system = None
    cpu_time_idle = None
    cpu_time_iowait = None
    write_bytes = None
    write_count = None
    read_bytes = None
    read_count = None
    mem_rss_max = None
    mem_rss_avg = None
    mem_swap_max = None
    mem_vms = None
    cpu_usage = None

class AllocCUData:
    node_id = None
    cu_count = None
    def __init__(self, node=None, cu=None):
        self.node_id = node
        self.cu_count = cu

class JobData:
    id = None
    user_name = None
    used_queue = None
    submit_time = None
    start_time = None
    end_time = None
    run_time = None
    requested_time = None
    requested_cu = None
    num_nodes = None
    alloc_cu = [AllocCUData()]

class NodeData:
    name = None
    cpu_model = None
    sockets = None
    cores_per_socket = None
    virt_thr_core = None
    phys_thr_core = None
    main_mem = None
    proc = ProcData()

class ProcSeq:
    cpu_time_user_avg = []
    cpu_time_sys_avg = []
    mem_rss_avg = []

class NodeSeq:
    cpu_usage = []
    mem_usage = []

class Aggregator:
    job = JobData()
    nodes = [NodeData()]
    proc_seq = ProcSeq()
    node_seq = NodeSeq()