Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #31 from intel/prep290
Browse files Browse the repository at this point in the history
Prepare for 2.9.0 release.
  • Loading branch information
harp-intel authored Feb 2, 2024
2 parents 4714737 + b503c71 commit 01aa39f
Show file tree
Hide file tree
Showing 130 changed files with 5,603 additions and 2,758 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ jobs:
- name: Build c
if: matrix.language == 'cpp'
run: |
cd src/calcfreq/
make
make calcfreq
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@1500a131381b66de0c52ac28abb13cd79f4b7ecc # v2.22.12
with:
Expand Down
66 changes: 12 additions & 54 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,54 +1,12 @@
# make output
/dist
# apps
src/orchestrator/orchestrator*
src/orchestrator/resources/collector
src/orchestrator/resources/collector_arm64
src/orchestrator/resources/sshpass
src/orchestrator/resources/reporter
src/reporter/reporter*
src/collector/collector
src/collector/collector.exe
src/collector/collector_arm64
src/rdmsr/rdmsrx
src/wrmsr/wrmsrx
src/msrbusy/msrbusy
src/pmu2metrics/pmu2metrics
src/pmu2metrics/pmu2metrics-with-perf
src/pmu2metrics/resources/perf
src/calcfreq/calcfreq
# src
async-profiler
cpuid
dmidecode
ethtool
fio
flamegraph
ipmitool
linux
lshw
lspci
mlc
pmu-checker
spectre-meltdown-checker
sshpass
stress-ng
sysstat
src/async-profiler-*
src/linux-*
src/cpuid-*
src/libcrypt*
src/glibc*
src/zlib*
# build output in config
collector_deps_a*
# run/debug output
src/collector/collector.log
src/collector/collector.pid
src/orchestrator/orchestrator_20*
src/reporter/debug_out/*
__debug_bin*.log
# other
src/orchestrator/targets
src/pmu2metrics/sys
src/pmu2metrics/scripts
dist
bin
build.*
cmd/orchestrator/targets
cmd/orchestrator/orchestrator_20*
cmd/orchestrator/resources/collector_deps_*
cmd/orchestrator/resources/collector
cmd/orchestrator/resources/collector_arm64
cmd/orchestrator/resources/sshpass
cmd/orchestrator/resources/reporter
cmd/pmu2metrics/scripts
cmd/reporter/debug_out/*
16 changes: 3 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN cp /usr/local/lib/libz.a /usr/lib/x86_64-linux-gnu/libz.a
RUN curl -s https://gitlab.com/akihe/radamsa/uploads/a2228910d0d3c68d19c09cee3943d7e5/radamsa-0.6.c.gz | gzip -d | cc -O2 -x c -o /usr/local/bin/radamsa -

# Install Go
ARG GO_VERSION="1.21.4"
ARG GO_VERSION="1.21.6"
RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
RUN rm go${GO_VERSION}.linux-amd64.tar.gz
Expand All @@ -50,18 +50,8 @@ RUN if [ ! -z "${LOCALBUILD}" ] ; then \
USER ${USERNAME}

# Build third-party components
COPY src/Makefile prebuilt/
RUN cd prebuilt && make -j4 prebuilt_tools
# intent here is to fill out the go package cache
RUN mkdir prebuilt/x
COPY src prebuilt/x
RUN cd prebuilt/x/orchestrator && go get -d ./...
RUN cd prebuilt/x/reporter && go get -d ./...
RUN cd prebuilt/x/collector && go get -d ./...
RUN cd prebuilt/x/rdmsr && go get -d ./...
RUN cd prebuilt/x/wrmsr && go get -d ./...
RUN cd prebuilt/x/msrbusy && go get -d ./...
RUN cd prebuilt/x/pmu2metrics && go get -d ./...
COPY third_party/Makefile prebuilt/
RUN cd prebuilt && make -j4 tools && make oss-source

# run bash script and process the input command
ENTRYPOINT [ "/bin/bash", "/scripts/entrypoint"]
119 changes: 103 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,133 @@
# Copyright (C) 2023 Intel Corporation
# SPDX-License-Identifier: MIT
#
COMMIT_ID := $(shell git rev-parse --short=8 HEAD)
COMMIT_DATE := $(shell git show -s --format=%cd --date=short HEAD)
VERSION_FILE := ./version.txt
VERSION_NUMBER := $(shell cat ${VERSION_FILE})
VERSION := $(VERSION_NUMBER)_$(COMMIT_DATE)_$(COMMIT_ID)

TARBALL := svr-info.tgz

default: dist
.PHONY: clean default dist dist-amd64 test tools

tools:
cd src && make
bin:
mkdir -p bin

orchestrator: bin reporter collector collector-deps
cp /prebuilt/bin/sshpass cmd/orchestrator/resources/
cp bin/reporter cmd/orchestrator/resources/
cp bin/collector cmd/orchestrator/resources/
cp bin/collector_arm64 cmd/orchestrator/resources/
cd bin && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w -X main.gVersion=$(VERSION)' -o orchestrator ../cmd/orchestrator

collector: bin
cd bin && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w -X main.gVersion=$(VERSION)' -o collector ../cmd/collector
cd bin && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -v -ldflags '-s -w -X main.gVersion=$(VERSION)' -o collector_arm64 ../cmd/collector

reporter: bin
cd bin && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w -X main.gVersion=$(VERSION)' -o reporter ../cmd/reporter

msrread: bin
cd bin && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w -X main.gVersion=$(VERSION)' -o msrread ../cmd/msrread

msrwrite: bin
cd bin && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w -X main.gVersion=$(VERSION)' -o msrwrite ../cmd/msrread

msrbusy: bin
cd bin && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w -X main.gVersion=$(VERSION)' -o msrbusy ../cmd/msrbusy

pmu2metrics: bin
rm -f cmd/pmu2metrics/resources/perf
cd bin && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w -X main.gVersion=$(VERSION)' -o pmu2metrics_noperf ../cmd/pmu2metrics
-cp /prebuilt/bin/perf cmd/pmu2metrics/resources
cd bin && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -ldflags '-s -w -X main.gVersion=$(VERSION)' -o pmu2metrics ../cmd/pmu2metrics
rm -f cmd/pmu2metrics/resources/perf

calcfreq: bin
cd bin && gcc -D VERSION=\"$(VERSION)\" ../tools/calcfreq/calcfreq.c -lpthread -o calcfreq -static

dist-amd64: tools
collector-deps-amd64: third_party calcfreq msrbusy msrread msrwrite pmu2metrics
$(eval TMPDIR := $(shell mktemp -d build.XXXXXX))
cp -R /prebuilt/bin/* $(TMPDIR)
cp bin/calcfreq $(TMPDIR)
cp bin/msrbusy $(TMPDIR)
cp bin/msrread $(TMPDIR)
cp bin/msrwrite $(TMPDIR)
cp bin/pmu2metrics_noperf $(TMPDIR)/pmu2metrics
cd $(TMPDIR) && tar -czf ../cmd/orchestrator/resources/collector_deps_amd64.tgz .
rm -rf $(TMPDIR)

collector-deps-arm64: third_party
$(eval TMPDIR := $(shell mktemp -d build.XXXXXX))
cp /prebuilt/bin/spectre-meltdown-checker.sh $(TMPDIR)
cd $(TMPDIR) && tar -czf ../cmd/orchestrator/resources/collector_deps_arm64.tgz .
rm -rf $(TMPDIR)

collector-deps: collector-deps-amd64 collector-deps-arm64

third_party:
cd third_party && make

dist-amd64: orchestrator
rm -rf dist/svr-info
mkdir -p dist/svr-info
cp LICENSE dist/svr-info
cp README dist/svr-info
cp RELEASE_NOTES dist/svr-info
cp THIRD_PARTY_PROGRAMS dist/svr-info
cp docs/guide/SvrInfoUserGuide.pdf dist/svr-info/USER_GUIDE.pdf
cp src/orchestrator/orchestrator dist/svr-info/svr-info
cp bin/orchestrator dist/svr-info/svr-info
mkdir -p dist/svr-info/tools
cp bin/collector dist/svr-info/tools
cp bin/collector_arm64 dist/svr-info/tools
cp bin/reporter dist/svr-info/tools
cp bin/pmu2metrics dist/svr-info/tools
cd dist && tar -czf $(TARBALL) svr-info
cd dist && md5sum $(TARBALL) > $(TARBALL).md5
rm -rf dist/svr-info
rm -rf dist/tools
mkdir -p dist/tools
cp src/orchestrator/resources/* dist/tools
cp src/pmu2metrics/pmu2metrics-with-perf dist/tools
cd dist/tools && tar -xf collector_deps_amd64.tgz && rm collector_deps_*.tgz *.yaml.tmpl

dist: dist-amd64

oss:
cd src && make oss-source
mv src/oss_source* dist/
dist: dist-amd64 third_party
cp /prebuilt/oss_source.* dist

clean:
cd src && make clean
rm -rf dist
rm -rf bin

test:
cd src && make test
# test packages
cd internal/commandfile && go test -v -vet=all .
cd internal/core && go test -v -vet=all .
cd internal/cpu && go test -v -vet=all .
# these tests require access to MSRs which we don't have on WSL2 and may not have on build machine
# cd internal/msr && go test -v -vet=all .
cd internal/progress && go test -v -vet=all .
cd internal/target && go test -v -vet=all .

# test apps
go test -v -vet=all ./cmd/orchestrator
go test -v -vet=all ./cmd/collector
go test -v -vet=all ./cmd/reporter
go test -v -vet=all ./cmd/msrread
go test -v -vet=all ./cmd/msrwrite
go test -v -vet=all ./cmd/msrbusy
go test -v -vet=all ./cmd/pmu2metrics

# test svr-info
rm -rf test/svr-info
cd test && tar -xf ../dist/$(TARBALL)
cd test && ./functional
cd test && ./fuzz
rm -rf test/svr-info

format_check:
@echo "Running gofmt -l to check for code formatting issues..."
@test -z $(shell gofmt -l -s internal/commandfile/ internal/core/ internal/cpu/ internal/progress/ internal/target/ cmd/orchestrator/ cmd/collector/ cmd/reporter/ cmd/pmu2metrics/ cmd/msrread/ cmd/msrwrite/) || { echo "[WARN] Formatting issues detected. Resolve with 'make format'"; exit 1; }
@echo "gofmt detected no issues"

check: format_check

format:
gofmt -l -w -s internal/commandfile/ internal/core/ internal/cpu/ internal/progress/ internal/target/ orchestrator/ collector/ reporter/ pmu2metrics/ rdmsr/ wrmsr/

18 changes: 17 additions & 1 deletion RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,26 @@ Intel® System Health Inspector (AKA svr-info)

Fully Supported Platforms
- Xeon Micro-Architectures: EMR,SPR,CPX,ICX,CLX,SKX,BDX,HSX
- Core Micro-Architectures: TGL,RKL,CFL,KBL,SKL,BDW,HSW
- Operating Systems: Ubuntu 16.04, 18.04, 20.04, 22.04, CentOS 7, Amazon Linux 2, Debian 11, RHEL 9, Rocky Linux 8
Note: svr-info may work on other micro-architectures and Linux distributions, but has not been thoroughly tested

2.9.0
Features Added
- Report CPU temperature when CPUs have been active when '-benchmark turbo' is run
- Memory population chart for Dell SPR platform
- Extend prefetchers field to include all known prefetchers

Bugs Fixed
- Slow report generation when an extremely deep call stack is captured with the -analyze option
- LLC size mis-calculated on EMR MCC SKUs
- Micro-architecture mis-identified on AWS m7i instances

Known Issues
- Frequency measurement benchmark not yet supported on GNR and SRF
- The storage micro-benchmark may not run on CentOS due to OS locale settings.
- CPU cache sizes are reported in aggregate on Ubuntu 20.04 and newer.
- DRAM population and CPU frequencies may not be accurate on some public cloud IaaS VMs.

2.8.0
Bugs Fixed
- Turbo on/off incorrectly reported on Excel Brief Report summary field
Expand Down
Loading

0 comments on commit 01aa39f

Please sign in to comment.