Skip to content

Commit

Permalink
Merge remote-tracking branch 'opcm-github/master'
Browse files Browse the repository at this point in the history
Change-Id: I8f726e099a404c8b8c4b8ac0bc3aa7e3fd5bebbb
  • Loading branch information
rdementi committed May 2, 2024
2 parents 0f3b0d3 + 3470655 commit bab7daf
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to the Container registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM fedora:39@sha256:61864fd19bbd64d620f338eb11dae9e8759bf7fa97302ac6c43865c48dccd679 as builder
FROM fedora:40@sha256:4e007f288dce23966216be81ef62ba05d139b9338f327c1d1c73b7167dd47312 as builder

RUN dnf -y install gcc-c++ git findutils make cmake
COPY . /tmp/pcm
RUN cd /tmp/pcm && mkdir build && cd build && cmake .. && make

FROM fedora:39@sha256:61864fd19bbd64d620f338eb11dae9e8759bf7fa97302ac6c43865c48dccd679
FROM fedora:40@sha256:4e007f288dce23966216be81ef62ba05d139b9338f327c1d1c73b7167dd47312
COPY --from=builder /tmp/pcm/build/bin/* /usr/local/bin/
ENV PCM_NO_PERF=1

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ PCM Tools
PCM provides a number of command-line utilities for real-time monitoring:

- **pcm** : basic processor monitoring utility (instructions per cycle, core frequency (including Intel(r) Turbo Boost Technology), memory and Intel(r) Quick Path Interconnect bandwidth, local and remote memory bandwidth, cache misses, core and CPU package sleep C-state residency, core and CPU package thermal headroom, cache utilization, CPU and memory energy consumption)
![pcm output](https://raw.githubusercontent.com/wiki/opcm/pcm/pcm.x.jpg)

![pcm output](https://github.com/intel/pcm/assets/25432609/88485ff5-dc7c-4a1c-974f-8396f03829dc)

- **pcm-sensor-server** : pcm collector exposing metrics over http in JSON or Prometheus (exporter text based) format ([how-to](doc/PCM-EXPORTER.md)). Also available as a [docker container](doc/DOCKER_README.md). More info about Global PCM events is [here](doc/PCM-SENSOR-SERVER-README.md).
- **pcm-memory** : monitor memory bandwidth (per-channel and per-DRAM DIMM rank)
![pcm-memory output](https://raw.githubusercontent.com/wiki/opcm/pcm/pcm-memory.x.JPG)
Expand Down
26 changes: 13 additions & 13 deletions src/dashboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,13 @@ class BarGaugePanel : public Panel
}
};

class GraphPanel : public Panel
class TimeSeriesPanel : public Panel
{
std::string yAxisLabel;
bool stack;
GraphPanel() = delete;
TimeSeriesPanel() = delete;
public:
GraphPanel(int x_, int y_, int w_, int h_, const std::string & title_, const std::string & yAxisLabel_, bool stack_)
TimeSeriesPanel(int x_, int y_, int w_, int h_, const std::string & title_, const std::string & yAxisLabel_, bool stack_)
: Panel(x_, y_, w_, h_, title_)
, yAxisLabel(yAxisLabel_)
, stack(stack_)
Expand Down Expand Up @@ -306,7 +306,7 @@ class GraphPanel : public Panel
"dataLinks": []
},
"percentage": false,
"pluginVersion": "6.7.2",
"pluginVersion": "10.4.2",
"pointradius": 2,
"points": false,
"renderer": "flot",
Expand Down Expand Up @@ -587,7 +587,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
return t;
};
{
auto panel = std::make_shared<GraphPanel>(0, y, width, height, "Memory Bandwidth", "MByte/sec", false);
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, "Memory Bandwidth", "MByte/sec", false);
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, "Memory Bandwidth (MByte/sec)");
y += height;
auto genAll = [type](const std::string& special) -> std::string
Expand Down Expand Up @@ -622,7 +622,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
for (size_t s = 0; s < NumSockets; ++s)
{
const auto S = std::to_string(s);
auto panel = std::make_shared<GraphPanel>(0, y, width, height, std::string("Socket") + S + " Memory Bandwidth", "MByte/sec", false);
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, std::string("Socket") + S + " Memory Bandwidth", "MByte/sec", false);
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, std::string("Current Socket") + S + " Memory Bandwidth (MByte/sec)");
y += height;
for (auto& m : { "DRAM Reads", "DRAM Writes", "Persistent Memory Reads", "Persistent Memory Writes" })
Expand All @@ -648,7 +648,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
dashboard.push(panel1);
}

auto panel = std::make_shared<GraphPanel>(0, y, width, height, "PMEM/DRAM Bandwidth Ratio", "PMEM/DRAM", false);
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, "PMEM/DRAM Bandwidth Ratio", "PMEM/DRAM", false);
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, "PMEM/DRAM Bandwidth Ratio");
y += height;
for (size_t s = 0; s < NumSockets; ++s)
Expand Down Expand Up @@ -676,7 +676,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
for (size_t s = 0; s < NumSockets; ++s)
{
const auto S = std::to_string(s);
auto panel = std::make_shared<GraphPanel>(0, y, width, height, std::string("Socket") + S + " " + pcm->xPI() + " " + m, utilization?"%": "MByte/sec", false);
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, std::string("Socket") + S + " " + pcm->xPI() + " " + m, utilization?"%": "MByte/sec", false);
std::shared_ptr<Panel> panel1;
if (utilization)
panel1 = std::make_shared<GaugePanel>(width, y, max_width - width, height, std::string("Current Socket") + S + " UPI " + m + " (%)");
Expand Down Expand Up @@ -708,7 +708,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
auto cstate = [&] (const char * m, const char * tPrefix, const char * source)
{
auto my_height = 3 * height / 2;
auto panel = std::make_shared<GraphPanel>(0, y, width, my_height, std::string(m) + " C-state residency", "stacked %", true);
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, my_height, std::string(m) + " C-state residency", "stacked %", true);
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, my_height, std::string("Current ") + m + " C-state residency (%)");
y += my_height;
auto prometheusCStateExpression = [](const std::string& source, const size_t c) -> std::string
Expand Down Expand Up @@ -748,7 +748,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
cstate("Package", "Uncore Aggregate_Uncore", "uncore");
auto derived = [&](const std::string & fullName, const std::string & shortName, const std::string & dividend, const std::string & divisor)
{
auto panel = std::make_shared<GraphPanel>(0, y, width, height, fullName, shortName, false);
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, fullName, shortName, false);
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, fullName);
y += height;
for (size_t s = 0; s < NumSockets; ++s)
Expand All @@ -775,7 +775,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
derived("L2 Cache Misses Per Instruction", "L2 MPI", "L2 Cache Misses", "Instructions Retired Any");
for (auto & m : {"Instructions Retired Any", "Clock Unhalted Thread", "L2 Cache Hits", "L2 Cache Misses", "L3 Cache Hits", "L3 Cache Misses"})
{
auto panel = std::make_shared<GraphPanel>(0, y, width, height, std::string(m), "Million", false);
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, std::string(m), "Million", false);
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, std::string(m) + " (Million)");
y += height;
for (size_t s = 0; s < NumSockets; ++s)
Expand All @@ -794,7 +794,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
if (pcm->getAccel() != ACCEL_NOCONFIG){
auto accelCounters = [&](const std::string & m)
{
auto panel = std::make_shared<GraphPanel>(0, y, width, height, accs->getAccelCounterName() + " " + m,"Byte/sec", false);
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, accs->getAccelCounterName() + " " + m,"Byte/sec", false);
std::shared_ptr<Panel> panel1;
panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, std::string("Current ") +accs->getAccelCounterName() + " (Byte/sec)");
y += height;
Expand All @@ -820,7 +820,7 @@ std::string getPCMDashboardJSON(const PCMDashboardType type, int ns, int nu, int
for (size_t s = 0; s < NumSockets; ++s)
{
const auto S = std::to_string(s);
auto panel = std::make_shared<GraphPanel>(0, y, width, height, std::string("Socket") + S + " Energy Consumption", "Watt", false);
auto panel = std::make_shared<TimeSeriesPanel>(0, y, width, height, std::string("Socket") + S + " Energy Consumption", "Watt", false);
auto panel1 = std::make_shared<BarGaugePanel>(width, y, max_width - width, height, std::string("Current Socket") + S + " Energy Consumption (Watt)");
y += height;
for (auto &m : {"Package Joules Consumed", "DRAM Joules Consumed", "PP0 Joules Consumed", "PP1 Joules Consumed"})
Expand Down

0 comments on commit bab7daf

Please sign in to comment.