Esempio n. 1
0
 def n_open_files_src(self, gen):
     path = "/proc/{}/fd/".format(self.pid)
     N = self.pid + gen
     ret = []
     for i in range(0, N):
         _p = path + "/" + str(i)
         _c = str(i)
         ret.append( Src(_p, _c) )
     return ret
Esempio n. 2
0
 def io_src(self, gen):
     path = "/proc/{}/io".format(self.pid)
     data = [
         ("rchar", self.pid + gen + 7),
         ("wchar", self.pid + gen + 6),
         ("syscr", self.pid + gen + 5),
         ("syscw", self.pid + gen + 4),
         ("read_bytes", self.pid + gen + 3),
         ("write_bytes", self.pid + gen + 2),
         ("cancelled_write_bytes", self.pid + gen + 1),
     ]
     content = "".join( "{}: {}\n".format(k, v) for k, v in data )
     return [ Src(path, content) ]
Esempio n. 3
0
 def syscall_src(self, gen):
     path = "/proc/{}/syscall".format(self.pid)
     if gen == 0:
         content = "running"
     else:
         content = "{:d} {:x} {:x} {:x} {:x} {:x} {:x} {:x} {:x}".format(
                     self.pid + gen + 10,
                     self.pid + gen + 11,
                     self.pid + gen + 12,
                     self.pid + gen + 13,
                     self.pid + gen + 14,
                     self.pid + gen + 15,
                     self.pid + gen + 16,
                     self.pid + gen + 17,
                     self.pid + gen + 18,
                 )
     return [ Src(path, content) ]
Esempio n. 4
0
 def status_src(self, gen):
     _state = "R (running)" if gen else "S (sleeping)"
     _data = [
         "Name:\tprog{}\n".format(self.pid),
         "Umask:\t0022\n",
         "State:\t{}\n".format(_state),
         "Tgid:\t{}\n".format(self.pid + 70),
         "Ngid:\t{}\n".format(self.pid + 71),
         "Pid:\t{}\n".format(self.pid),
         "PPid:\t{}\n".format(self.pid + 100),
         "TracerPid:\t0\n",
         "Uid:\t1000\t1000\t1000\t1000\n",
         "Gid:\t2000\t2000\t2000\t2000\n",
         "FDSize:\t{}\n".format(self.pid + 105),
         "Groups:\t4 24 27 30 46 115 127 1000\n",
         "NStgid:\t{}\n".format(self.pid + 106),
         "NSpid:\t{}\n".format(self.pid + 107),
         "NSpgid:\t{}\n".format(self.pid + 108),
         "NSsid:\t{}\n".format(self.pid + 109),
         "VmPeak:\t{:8} kB\n".format(self.pid + (gen + 1)*4096),
         "VmSize:\t{:8} kB\n".format(self.pid + (gen + 2)*4096),
         "VmLck:\t{:8} kB\n".format(self.pid + 112 + gen),
         "VmPin:\t{:8} kB\n".format(self.pid + 113 + gen),
         "VmHWM:\t{:8} kB\n".format(self.pid + 114 + gen),
         "VmRSS:\t{:8} kB\n".format(self.pid + 115 + gen),
         "RssAnon:\t{:8} kB\n".format(self.pid + 116 + gen),
         "RssFile:\t{:8} kB\n".format(self.pid + 117 + gen),
         "RssShmem:\t{:8} kB\n".format(self.pid + 118 + gen),
         "VmData:\t{:8} kB\n".format(self.pid + 119 + gen),
         "VmStk:\t{:8} kB\n".format(self.pid + 120 + gen),
         "VmExe:\t{:8} kB\n".format(self.pid + 121 + gen),
         "VmLib:\t{:8} kB\n".format(self.pid + 122 + gen),
         "VmPTE:\t{:8} kB\n".format(self.pid + 123 + gen),
         "VmPMD:\t{:8} kB\n".format(self.pid + 223 + gen),
         "VmSwap:\t{:8} kB\n".format(self.pid + 124 + gen),
         "HugetlbPages:\t{:8} kB\n".format(self.pid + 125 + gen),
         "CoreDumping:\t{:d}\n".format(bool(gen)),
         "Threads:\t{}\n".format(self.pid + gen),
         "SigQ:\t{}/126175\n".format(self.pid + gen),
         "SigPnd:\t{:16x}\n".format(self.pid + 128 + gen),
         "ShdPnd:\t{:16x}\n".format(self.pid + 129 + gen),
         "SigBlk:\t{:16x}\n".format(self.pid + 130 + gen),
         "SigIgn:\t{:16x}\n".format(self.pid + 131 + gen),
         "SigCgt:\t{:16x}\n".format(self.pid + 132 + gen),
         "CapInh:\t{:16x}\n".format(self.pid + 133 + gen),
         "CapPrm:\t{:16x}\n".format(self.pid + 134 + gen),
         "CapEff:\t{:16x}\n".format(self.pid + 135 + gen),
         "CapBnd:\t{:16x}\n".format(self.pid + 136 + gen),
         "CapAmb:\t{:16x}\n".format(self.pid + 137 + gen),
         "NoNewPrivs:\t{}\n".format(self.pid + 138 + gen),
         "Seccomp:\t{}\n".format(self.pid + 139 + gen),
         "Speculation_Store_Bypass:\t{}\n".format("vulnerable" if gen else "not vulnerable"),
         "Cpus_allowed:\tff\n",
         "Cpus_allowed_list:\t0-7\n",
         "Mems_allowed:\tff000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001\n",
         "Mems_allowed_list:\t0,1015-1023\n",
         "voluntary_ctxt_switches:\t{}\n".format(self.pid + 150 + gen),
         "nonvoluntary_ctxt_switches:\t{}\n".format(self.pid + 151 + gen),
     ]
     content = "".join(_data)
     return [ Src( "/proc/{}/status".format(self.pid), content) ]
Esempio n. 5
0
 def oom_score_adj_src(self, gen):
     return [ Src("/proc/{}/oom_score_adj".format(self.pid),
                  str(self.pid + gen + 9) ) ]
Esempio n. 6
0
 def stat_src(self, gen):
     path = "/proc/{}/stat".format(self.pid)
     state = 'S' if gen == 0 else 'R'
     _lead = "{0} (/bin/prog{0}) {1} ".format(self.pid, state)
     _nums = " ".join( str(10 + self.pid + gen + x) for x in range(0, 49) )
     return [ Src(path, _lead + _nums) ]
Esempio n. 7
0
HOSTNAME = socket.gethostname()
LDMSD_PREFIX = HOSTNAME + ":" + str(LDMSChrootTest.PORT)
INST_NAME = LDMSD_PREFIX + "/test"
SCHEMA_NAME = "edac"
DIR = "test_edac"  # a work directory for this test, so that everything is in
# one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src("/sys/devices/system/edac/mc/mc0/ce_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/ce_noinfo_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/ue_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/ue_noinfo_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow0/ce_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow0/ue_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow1/ce_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow1/ue_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow2/ce_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow2/ue_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow3/ce_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow3/ue_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow4/ce_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow4/ue_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow5/ce_count", "0"),
            Src("/sys/devices/system/edac/mc/mc0/csrow5/ue_count", "0"),
Esempio n. 8
0
HOSTNAME = socket.gethostname()
LDMSD_PREFIX = HOSTNAME + ":" + str(LDMSChrootTest.PORT)
INST_NAME = LDMSD_PREFIX + "/test"
SCHEMA_NAME = "XXX_NAME"
DIR = "XXX"  # a work directory for this test, so that everything is in
# one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src("/sys/PATH_XXX_0", "data0.0"),
            Src("/sys/PATH_XXX_1", "data1.0"),
        ],
        [
            # 1 LDMSData() per set
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": {
                    "NAME": _VALUE_
                }
            }),
        ]),
    # More SrcData() record for 2nd ldms update
]
Esempio n. 9
0
        if not os.path.exists(_path):
            continue
        ret[patch_metric_name(prefix + "status" + suffix)] = 1
        mx = lstats_parse(_path, fltr)
        ret.update({
            patch_metric_name(prefix + k + suffix): v
            for k, v in mx.iteritems()
        })
    return ret

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src(x, open(x.replace("/proc/fs/lustre", "proc-fs-lustre-server0"))) \
                    for x in PROCFILES
        ],
        [
            # 1 LDMSData() per set
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": mds_metrics("proc-fs-lustre-server0")
            }),
        ]
    ),
    # More SrcData() record for 2nd ldms update
    SrcData(
        [
            # 1 Src() per source file
Esempio n. 10
0
    Src(
        "/proc/interrupts", """\
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7
  0:          9          0          0          0          0          0          0          0   IO-APIC   2-edge      timer
  8:          0          0          0          0          0          1          0          0   IO-APIC   8-edge      rtc0
  9:          0          4          0          0          0          0          0          0   IO-APIC   9-fasteoi   acpi
 16:          0          0         31          0          0          0          0          0   IO-APIC  16-fasteoi   ehci_hcd:usb1
 19:          0          0          0          0          0          0          0          0   IO-APIC  19-fasteoi   ath9k
 23:    2186688     429113          0      39853          0          0          0          0   IO-APIC  23-fasteoi   ehci_hcd:usb2
 24:          0          0          0          0          0          0          0          0   PCI-MSI 327680-edge      xhci_hcd
 25:          0          0          0          0          0       4180     227798          0   PCI-MSI 6815744-edge      xhci_hcd
 26:          0          0          0          0          0          0          0          0   PCI-MSI 6815745-edge      xhci_hcd
 27:          0          0          0          0          0          0          0          0   PCI-MSI 6815746-edge      xhci_hcd
 28:          0          0          0          0          0          0          0          0   PCI-MSI 6815747-edge      xhci_hcd
 29:          0          0          0          0          0          0          0          0   PCI-MSI 6815748-edge      xhci_hcd
 30:          0          0          0          0          0          0          0          0   PCI-MSI 6815749-edge      xhci_hcd
 31:          0          0          0          0          0          0          0          0   PCI-MSI 6815750-edge      xhci_hcd
 32:          0          0          0          0          0          0          0          0   PCI-MSI 6815751-edge      xhci_hcd
 33:          0          0          0          0     565764          0      16664          0   PCI-MSI 512000-edge      ahci[0000:00:1f.2]
 34:          0          0          0          0          0          0          0          0   PCI-MSI 7340032-edge      ahci[0000:0e:00.0]
 35:        343          0          0          0          0          0          0    1482895   PCI-MSI 409600-edge      eno1
 36:          0       4885          0          0          0    2400055          0          0   PCI-MSI 32768-edge      i915
 37:          0          0         13          0          0          0          0          0   PCI-MSI 360448-edge      mei_me
 38:          0          0          0          0       1235          0          0          0   PCI-MSI 442368-edge      snd_hda_intel:card0
NMI:        132        141        124        124        125        144        125        132   Non-maskable interrupts
LOC:    3988207    2613488    2562788    2043852    2180437    3826532    3084422    2936689   Local timer interrupts
SPU:          0          0          0          0          0          0          0          0   Spurious interrupts
PMI:        132        141        124        124        125        144        125        132   Performance monitoring interrupts
IWI:         25         19         49         28         12     321769         67         39   IRQ work interrupts
RTR:          0          0          0          0          0          0          0          0   APIC ICR read retries
RES:     447957     195661     170009      62647      59698      98636     115634      69047   Rescheduling interrupts
CAL:     610299     573181     567683     608060     585890     566966     570622     521710   Function call interrupts
TLB:     573702     577286     570469     611601     588059     568480     572863     524609   TLB shootdowns
TRM:          0          0          0          0          0          0          0          0   Thermal event interrupts
THR:          0          0          0          0          0          0          0          0   Threshold APIC interrupts
DFR:          0          0          0          0          0          0          0          0   Deferred Error APIC interrupts
MCE:          0          0          0          0          0          0          0          0   Machine check exceptions
MCP:        572        573        573        573        573        573        573        573   Machine check polls
HYP:          0          0          0          0          0          0          0          0   Hypervisor callback interrupts
ERR:          0
MIS:          0
PIN:          0          0          0          0          0          0          0          0   Posted-interrupt notification event
NPI:          0          0          0          0          0          0          0          0   Nested posted-interrupt event
PIW:          0          0          0          0          0          0          0          0   Posted-interrupt wakeup event
"""),
Esempio n. 11
0
DIR = "test_procstat"  # a work directory for this test, so that everything is in
# one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

src = [  # 1 Src() per source file
    Src(
        "/proc/stat", """\
cpu  1488749 5304 304096 209077917 57965 0 3437 0 0 0
cpu0 190512 660 35611 26137004 409 0 474 0 0 0
cpu1 186922 640 35832 26146732 345 0 124 0 0 0
cpu2 183739 666 35989 26149061 318 0 55 0 0 0
cpu3 180603 703 33159 26156168 226 0 29 0 0 0
cpu4 193394 691 33372 26119219 24485 0 337 0 0 0
cpu5 182383 650 47396 26097434 30380 0 9 0 0 0
cpu6 189129 656 43032 26132068 1174 0 78 0 0 0
cpu7 182065 637 39702 26140227 624 0 2328 0 0 0
intr 60413735 9 0 0 0 0 0 0 0 1 4 0 0 0 0 0 0 31 0 0 0 0 0 0 2848373 0 405131 0 0 0 0 0 0 0 789951 0 2583703 4356010 13 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 272555626
btime 1554734246
processes 218832
procs_running 2
procs_blocked 0
softirq 53689612 407995 17328446 50958 2645496 775408 0 986715 18030798 0 13463796
"""),
    # More SrcData() record for 2nd ldms update
    Src(
        "/proc/stat", """\
cpu  1488749 5304 304096 209077917 57965 0 3437 8 8 8
cpu0 190512 660 35611 26137004 409 0 474 1 1 1
cpu1 186922 640 35832 26146732 345 0 124 1 1 1
Esempio n. 12
0
DIR = "test_jobinfo" # a work directory for this test, so that everything is in
                     # one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src("/var/run/ldms_jobinfo.data",
                    "JOB_APP_ID=10\n"
                    "JOB_END=1554769000\n"
                    "JOB_EXIT=0\n"
                    "JOB_ID=20\n"
                    "JOB_NAME=job20\n"
                    "JOB_START=1554768000\n"
                    "JOB_STATUS=1\n"
                    "JOB_USER=user100\n"
                    "JOB_USER_ID=100\n"
            ),
        ],
        [
            # 1 LDMSData() per set
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": {
                    "component_id": LDMSChrootTest.COMPONENT_ID,
                    "app_id": 10,
                    "job_id": 20,
Esempio n. 13
0
INST_NAME = LDMSD_PREFIX + "/test"
SCHEMA_NAME = "sysclassblock"
DIR = "test_sysclassblock"  # a work directory for this test, so that everything is in
# one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

SDA_DIR = "/sys/devices/pci0000:00/0000:00:17.0/ata1/host0/" \
          "target0:0:0/0:0:0:0/block/sda"

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src(SDA_DIR + "/queue/hw_sector_size", "512"),
            Src(
                SDA_DIR + "/stat",
                "257739    33065 15486109    84912   549876   "
                "338338 1167148067  4849576        0   188316  4935124"),
        ],
        [
            # 1 LDMSData() per set
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": {
                    "reads_comp": 257739,
                    "reads_merg": 33065,
                    "sect_read": 15486109,
                    "time_read": 84912,
Esempio n. 14
0
        Src(
            "/proc/meminfo", """\
MemTotal:       32367228 kB
MemFree:        20445628 kB
MemAvailable:   27341052 kB
Buffers:         1462996 kB
Cached:          5849868 kB
SwapCached:            0 kB
Active:          7348560 kB
Inactive:        3545304 kB
Active(anon):    3582472 kB
Inactive(anon):   692004 kB
Active(file):    3766088 kB
Inactive(file):  2853300 kB
Unevictable:          64 kB
Mlocked:              64 kB
SwapTotal:       2097148 kB
SwapFree:        2097148 kB
Dirty:               172 kB
Writeback:             0 kB
AnonPages:       3581244 kB
Mapped:           993828 kB
Shmem:            693484 kB
Slab:             813140 kB
SReclaimable:     738492 kB
SUnreclaim:        74648 kB
KernelStack:       17328 kB
PageTables:        65920 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    18280760 kB
Committed_AS:   11090120 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      323972 kB
DirectMap2M:    32649216 kB
"""),
Esempio n. 15
0
        Src(
            "/proc/vmstat", """\
nr_free_pages 7004937
nr_zone_inactive_anon 105239
nr_zone_active_anon 545377
nr_zone_inactive_file 204018
nr_zone_active_file 149069
nr_zone_unevictable 16
nr_zone_write_pending 79
nr_mlock 16
nr_page_table_pages 12785
nr_kernel_stack 14672
nr_bounce 0
nr_zspages 0
nr_free_cma 0
numa_hit 9012402
numa_miss 0
numa_foreign 0
numa_interleave 57210
numa_local 9012402
numa_other 0
nr_inactive_anon 105239
nr_active_anon 545377
nr_inactive_file 204018
nr_active_file 149069
nr_unevictable 16
nr_slab_reclaimable 22199
nr_slab_unreclaimable 13917
nr_isolated_anon 0
nr_isolated_file 0
workingset_refault 0
workingset_activate 0
workingset_nodereclaim 0
nr_anon_pages 545100
nr_mapped 167156
nr_file_pages 458664
nr_dirty 79
nr_writeback 0
nr_writeback_temp 0
nr_shmem 105580
nr_shmem_hugepages 0
nr_shmem_pmdmapped 0
nr_anon_transparent_hugepages 0
nr_unstable 0
nr_vmscan_write 0
nr_vmscan_immediate_reclaim 0
nr_dirtied 167700
nr_written 146886
nr_dirty_threshold 1458118
nr_dirty_background_threshold 728169
pgpgin 1233050
pgpgout 670824
pswpin 0
pswpout 0
pgalloc_dma 2
pgalloc_dma32 57
pgalloc_normal 9156027
pgalloc_movable 0
allocstall_dma 0
allocstall_dma32 0
allocstall_normal 0
allocstall_movable 0
pgskip_dma 0
pgskip_dma32 0
pgskip_normal 0
pgskip_movable 0
pgfree 16162133
pgactivate 386545
pgdeactivate 0
pglazyfree 0
pgfault 9637312
pgmajfault 5590
pglazyfreed 0
pgrefill 0
pgsteal_kswapd 0
pgsteal_direct 0
pgscan_kswapd 0
pgscan_direct 0
pgscan_direct_throttle 0
zone_reclaim_failed 0
pginodesteal 0
slabs_scanned 0
kswapd_inodesteal 0
kswapd_low_wmark_hit_quickly 0
kswapd_high_wmark_hit_quickly 0
pageoutrun 0
pgrotated 34
drop_pagecache 0
drop_slab 0
oom_kill 0
numa_pte_updates 0
numa_huge_pte_updates 0
numa_hint_faults 0
numa_hint_faults_local 0
numa_pages_migrated 0
pgmigrate_success 0
pgmigrate_fail 0
compact_migrate_scanned 0
compact_free_scanned 0
compact_isolated 0
compact_stall 0
compact_fail 0
compact_success 0
compact_daemon_wake 0
compact_daemon_migrate_scanned 0
compact_daemon_free_scanned 0
htlb_buddy_alloc_success 0
htlb_buddy_alloc_fail 0
unevictable_pgs_culled 10707
unevictable_pgs_scanned 0
unevictable_pgs_rescued 9080
unevictable_pgs_mlocked 11180
unevictable_pgs_munlocked 11164
unevictable_pgs_cleared 0
unevictable_pgs_stranded 0
thp_fault_alloc 0
thp_fault_fallback 0
thp_collapse_alloc 0
thp_collapse_alloc_failed 0
thp_file_alloc 0
thp_file_mapped 0
thp_split_page 0
thp_split_page_failed 0
thp_deferred_split_page 0
thp_split_pmd 0
thp_split_pud 0
thp_zero_page_alloc 0
thp_zero_page_alloc_failed 0
thp_swpout 0
thp_swpout_fallback 0
balloon_inflate 0
balloon_deflate 0
balloon_migrate 0
swap_ra 0
swap_ra_hit 0
"""),
Esempio n. 16
0
 def timerslack_ns_src(self, gen):
     return [ Src("/proc/{}/timerslack_ns".format(self.pid),
                  str(self.pid + gen + 500)) ]
Esempio n. 17
0
 def cmdline_src(self, gen):
     path = "/proc/{}/cmdline".format(self.pid)
     content = "/bin/prog{}\0arg1\0arg2\0".format(self.pid)
     return [ Src(path, content) ]
Esempio n. 18
0
 def wchan_src(self, gen):
     return [ Src("/proc/{}/wchan".format(self.pid),
                  "symbol{}.{}".format(self.pid, gen)) ]
Esempio n. 19
0
from ldmsd.chroot import D, LDMSData, LDMSChrootTest, try_sudo, xvars, \
                         Src, SrcData

HOSTNAME = socket.gethostname()
LDMSD_PREFIX = HOSTNAME + ":" + str(LDMSChrootTest.PORT)
INST_NAME = LDMSD_PREFIX + "/test"
SCHEMA_NAME = "cray_power_sampler"
DIR = "test_cray_power_sampler"  # a work directory for this test, so that
# everything is in one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

src_data = [
    SrcData([
        Src("/sys/cray/pm_counters/energy", "127381720 J"),
        Src("/sys/cray/pm_counters/power", "44 W"),
    ],
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": {
                    "energy": 127381720,
                    "power": 44,
                }
            })),
    SrcData([
        Src("/sys/cray/pm_counters/energy", "127466523 J"),
        Src("/sys/cray/pm_counters/power", "37 W"),
    ],
            LDMSData({
Esempio n. 20
0
INST_NAME = LDMSD_PREFIX + "/test"
SCHEMA_NAME = "procnetdev"
DIR = "test_procnetdev"  # a work directory for this test, so that everything is in
# one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src(
                "/proc/net/dev", """\
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
wlp17s0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
    lo: 21777730   61486    0    0    0     0          0         0 21777730   61486    0    0    0     0       0          0
  eno1: 3716612055 3094869    0    0    0     0          0      9223 196675177 1664275    0    0    0     0       0          0
                """),
        ],
        [
            # 1 LDMSData() per set
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": {
                    "rx_bytes": 21777730,
                    "rx_packets": 61486,
                    "rx_errs": 0,
                    "rx_drop": 0,
                    "rx_fifo": 0,
Esempio n. 21
0
DIR = "test_filesingle"  # a work directory for this test, so that everything is
# in one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

FILE_SINGLE_CONFIG = """\
lo.rx_bytes /sys/class/net/lo/statistics/rx_bytes U64 0
lo.tx_bytes /sys/class/net/lo/statistics/tx_bytes U64 0
"""

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src("/sys/class/net/lo/statistics/rx_bytes", "20000"),
            Src("/sys/class/net/lo/statistics/tx_bytes", "10000"),
        ],
        [
            # 1 LDMSData() per set
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": {
                    "lo.rx_bytes": 20000,
                    "lo.tx_bytes": 10000,
                }
            }),
        ]),
    SrcData(
        [
Esempio n. 22
0
HOSTNAME = socket.gethostname()
LDMSD_PREFIX = HOSTNAME + ":" + str(LDMSChrootTest.PORT)
INST_NAME = LDMSD_PREFIX + "/test"
SCHEMA_NAME = "generic_sampler"
DIR = "test_generic_sampler"  # a work directory for this test, so that everything is in
# one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src("/generic/file", "neg: -1\npos: 2\ndbl: 1.234"),
        ],
        [
            # 1 LDMSData() per set
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": {
                    "neg": -1,
                    "pos": 2,
                    "dbl": 1.234,
                }
            }),
        ]),
    # More SrcData() record for 2nd ldms update
    SrcData(
Esempio n. 23
0
HOSTNAME = socket.gethostname()
LDMSD_PREFIX = HOSTNAME + ":" + str(LDMSChrootTest.PORT)
INST_NAME = LDMSD_PREFIX + "/test"
SCHEMA_NAME = "lnet_stats"
DIR = "test_lnet_stats"  # a work directory for this test, so that everything is in
# one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src("/proc/sys/lnet/stats", "0 3 0 434 433 0 0 105597 122856 0 0"),
        ],
        [
            # 1 LDMSData() per set
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": {
                    "msgs_alloc": 0,
                    "msgs_max": 3,
                    "errors": 0,
                    "send_count": 434,
                    "recv_count": 433,
                    "route_count": 0,
                    "drop_count": 0,
                    "send_length": 105597,
Esempio n. 24
0
 Src(
     "/proc/kgnilnd/stats", "time: 1554894618.892172\n"
     "ntx: 0\n"
     "npeers: 15\n"
     "nconns: 7\n"
     "nEPs: 7\n"
     "ndgrams: 4\n"
     "nfmablk: 1\n"
     "n_mdd: 1\n"
     "n_mdd_held: 0\n"
     "n_eager_allocs: 0\n"
     "GART map bytes: 74309632\n"
     "TX queued maps: 0\n"
     "TX phys nmaps: 0\n"
     "TX phys bytes: 0\n"
     "TX virt nmaps: 0\n"
     "TX virt bytes: 0\n"
     "RDMAQ bytes_auth: 7020988896\n"
     "RDMAQ bytes_left: 9223372029833786911\n"
     "RDMAQ nstalls: 0\n"
     "dev mutex delay: 3569\n"
     "dev n_yield: 4960533\n"
     "dev n_schedule: -1609036116\n"
     "SMSG fast_try: 151364744\n"
     "SMSG fast_ok: 151364214\n"
     "SMSG fast_block: 21288675\n"
     "SMSG ntx: 177614377\n"
     "SMSG tx_bytes: 75792495969\n"
     "SMSG nrx: 170165045\n"
     "SMSG rx_bytes: 71930531529\n"
     "RDMA ntx: 1807923\n"
     "RDMA tx_bytes: 146269342238\n"
     "RDMA nrx: 1298480\n"
     "RDMA rx_bytes: 15607145934\n"
     "VMAP short: 0\n"
     "VMAP cksum: 0\n"
     "KMAP short: 1103904\n"
     "RDMA REV length: 0\n"
     "RDMA REV offset: 0\n"
     "RDMA REV copy: 0\n"),
Esempio n. 25
0
LDMSD_PREFIX = HOSTNAME + ":" + str(LDMSChrootTest.PORT)
INST_NAME = LDMSD_PREFIX + "/test"
SCHEMA_NAME = "procnfs"
DIR = "test_procnfs"  # a work directory for this test, so that everything is in
# one place
if not os.path.exists(DIR):
    os.mkdir(DIR)

src_data = [
    # 1st SrcData() record for initialization + 1st ldms update
    SrcData(
        [
            # 1 Src() per source file
            Src(
                "/proc/net/rpc/nfs", """
net 0 0 0 0
rpc 3238 0 3238
proc4 61 1 0 0 0 1 0 0 0 0 0 3 0 0 0 0 0 0 6 29 6 1 0 0 0 0 0 2 0 3 1 5 0 0 0 0 0 0 0 2 1 0 3175 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
"""),
        ],
        [
            # 1 LDMSData() per set
            LDMSData({
                "instance_name": INST_NAME,
                "schema_name": SCHEMA_NAME,
                "metrics": {
                    "rpc.retrans": 0,
                    "rpc.authrefresh": 3238,
                    "nfs3.getattr": 0,
                    "nfs3.setattr": 0,
                    "nfs3.lookup": 0,
                    "nfs3.access": 0,