aggrstruct.py 2.55 KB
Newer Older
akhuziy's avatar
akhuziy committed
1
2
3
4
5
6
7
class SeqVals:
    delta = None
    seq = []
    def __init__(self, delta=None, seq=None):
        self.delta = delta
        self.seq = seq

8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
22
23
    seq_cpu_usage = None
    seq_mem_rss_sum = None
24
25
    seq_write_sum = None
    seq_read_sum = None
26
27
28
29

    def __init__(self):
        self.seq_cpu_usage = SeqVals()
        self.seq_mem_rss_sum = SeqVals()
30
31
        self.seq_write_sum = SeqVals()
        self.seq_read_sum = SeqVals()
32

akhuziy's avatar
akhuziy committed
33
34
35
36
37
38
39
40
class GPUData:
    bus = None
    power_limit = None
    mem = None
    mem_max = None
    temp_max = None
    power_max = None
    usage_max = None
akhuziy's avatar
akhuziy committed
41
    usage_avg = None
akhuziy's avatar
akhuziy committed
42
43
44
45
46
47
48
49
50
51
52
53
54
    cpu_usage_max = None
    cpu_mem_rss_max = None
    cpu_proc_total = None

    def __init__(self):
        self.seq_mem_avg = SeqVals()
        self.seq_usage_avg = SeqVals()
        self.seq_temp_avg = SeqVals()
        self.seq_power_avg = SeqVals()
        self.seq_cpu_usage_sum = SeqVals()
        self.seq_cpu_mem_rss_sum = SeqVals()
        self.seq_cpu_proc_count = SeqVals()

55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
83
    seq_cpu_usage = None
84
85
    seq_load_avg = None
    seq_load_max = None
86
87
    seq_ib_rcv_max = None
    seq_ib_xmit_max = None
88
    proc = None
89
    alloc_cu = None
90
    alloc_mem = None
91
92
    ib_rcv_max = None
    ib_xmit_max = None
akhuziy's avatar
akhuziy committed
93
94
    beegfs_read_sum = None
    beegfs_write_sum = None
95

96
97
    def __init__(self):
        self.proc = ProcData()
akhuziy's avatar
akhuziy committed
98
        self.gpus = [GPUData()]
99
100
        self.seq_load_avg = SeqVals()
        self.seq_load_max = SeqVals()
101
        self.seq_cpu_usage = SeqVals()
102
103
        self.seq_ib_rcv_max = SeqVals()
        self.seq_ib_xmit_max = SeqVals()
akhuziy's avatar
akhuziy committed
104
105
        self.seq_beegfs_read_sum = SeqVals()
        self.seq_beegfs_write_sum = SeqVals()
106

107
108
109
110

class Aggregator:
    job = JobData()
    nodes = [NodeData()]