aggrstruct.py 1.64 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
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
60

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
61
    seq_cpu_usage = None
62
63
    seq_load_avg = None
    seq_load_max = None
64
    proc = None
65
    alloc_cu = None
66

67
68
    def __init__(self):
        self.proc = ProcData()
69
70
        self.seq_load_avg = SeqVals()
        self.seq_load_max = SeqVals()
71
72
        self.seq_cpu_usage = SeqVals()

73
74
75
76

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