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

Commit

Permalink
upstream v2.2.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
harp-intel committed Feb 10, 2023
1 parent 686cceb commit 13a2dc8
Show file tree
Hide file tree
Showing 95 changed files with 15,075 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# make output
/dist
# apps
src/orchestrator/orchestrator*
src/reporter/reporter*
src/collector/collector
src/collector/collector.exe
src/collector/collector_arm64
src/rdmsr/rdmsr
src/msrbusy/msrbusy
src/calcfreq/calcfreq
# src
async-profiler
burn
cpuid
dmidecode
ethtool
fio
flamegraph
ipmitool
linux
lshw
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
config/sums.md5
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright (C) 2023 Intel Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.

SPDX-License-Identifier: MIT
95 changes: 95 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#!make
#
# 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-$(VERSION_NUMBER).tgz

default: apps collector-deps dist-amd64
.PHONY: default clean test apps tools dist dist-amd64 collector-deps collector-deps-amd64 collector-deps-arm64

apps:
cd src && VERSION=$(VERSION) make apps

tools:
cd src && VERSION=$(VERSION) make tools

collector-deps-amd64:
$(eval TMPDIR := $(shell mktemp -d build.XXXXXX))
cp src/calcfreq/calcfreq $(TMPDIR)
cp src/cpuid/cpuid $(TMPDIR)
cp src/dmidecode/dmidecode $(TMPDIR)
cp src/ethtool/ethtool $(TMPDIR)
cp src/fio/fio $(TMPDIR)
cp src/ipmitool/src/ipmitool.static $(TMPDIR)/ipmitool
cp src/lshw/src/lshw-static $(TMPDIR)/lshw
-cp src/mlc/mlc $(TMPDIR)
cp src/msrbusy/msrbusy $(TMPDIR)
cp src/linux/tools/perf/perf $(TMPDIR)
cp -R src/async-profiler $(TMPDIR)
cp src/flamegraph/stackcollapse-perf.pl $(TMPDIR)
cp src/rdmsr/rdmsr $(TMPDIR)
cp src/spectre-meltdown-checker/spectre-meltdown-checker.sh $(TMPDIR)
cp src/stress-ng/stress-ng $(TMPDIR)
cp src/sysstat/mpstat $(TMPDIR)
cp src/sysstat/iostat $(TMPDIR)
cp src/sysstat/sar $(TMPDIR)
cp src/sysstat/sadc $(TMPDIR)
cp src/linux/tools/power/x86/turbostat/turbostat $(TMPDIR)
-cp -r bin/* $(TMPDIR)
for f in $(TMPDIR)/*; do strip -s -p --strip-unneeded $$f; done
cd $(TMPDIR) && tar -czf ../config/collector_deps_amd64.tgz .
rm -rf $(TMPDIR)

collector-deps-arm64:
$(eval TMPDIR := $(shell mktemp -d build.XXXXXX))
cp src/spectre-meltdown-checker/spectre-meltdown-checker.sh $(TMPDIR)
cd $(TMPDIR) && tar -czf ../config/collector_deps_arm64.tgz .
rm -rf $(TMPDIR)

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

dist-amd64:
rm -rf dist/svr-info
mkdir -p dist/svr-info/tools
cp src/orchestrator/orchestrator dist/svr-info/tools
cp src/collector/collector dist/svr-info/tools
cp src/collector/collector_arm64 dist/svr-info/tools
cp src/reporter/reporter dist/svr-info/tools
cp src/sshpass/sshpass dist/svr-info/tools
cp src/burn/burn dist/svr-info/tools
mkdir -p dist/svr-info/config/extras
rsync config/* dist/svr-info/config
cp LICENSE dist/svr-info
cp README dist/svr-info
cp RELEASE_NOTES dist/svr-info
cp third-party-programs.txt dist/svr-info
cp src/orchestrator/targets.example dist/svr-info
cp documentation/ServerInfoUserGuide.pdf dist/svr-info/UserGuide.pdf
cd dist/svr-info && ln -s tools/orchestrator ./svr-info
cd dist/svr-info && find . -type f -exec md5sum {} + > config/sums.md5
cd dist && tar -czf $(TARBALL) svr-info
cd dist && md5sum $(TARBALL) > $(TARBALL).md5
cp dist/svr-info/config/sums.md5 config/sums.md5
rm -rf dist/svr-info/

dist: apps tools collector-deps dist-amd64 oss

oss:
cd src && make oss-source
mv src/oss_source* dist/

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

test:
rm -rf test/svr-info
cd test && tar -xf ../dist/$(TARBALL)
cd test && ./functional
rm -rf test/svr-info
14 changes: 14 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Intel® System Health Inspector (aka svr-info) is a Linux OS utility for assessing
the state and health of Intel Xeon computers.

HOW TO REPORT SECURITY VULNERABILITIES: If you have information about a
security issue or vulnerability with Intel® System Health Inspector, please
send an e-mail to [email protected]. Encrypt sensitive information using our
PGP public key.

To see program options and usage, run the program with the -h option, e.g.,
./svr-info -h

See the included UserGuide.pdf for more details.

Note: additional data collection tools can be used by svr-info by placing them in the config/extras directory. For example, Intel® Memory Latency Checker can be downloaded from here: https://www.intel.com/content/www/us/en/download/736633/intel-memory-latency-checker-intel-mlc.html. Once downloaded, extract the Linux executable and place in the config/extras directory.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Intel® System Health Inspector (aka svr-info)

## Getting svr-info

Download the latest release of svr-info from the repository's Releases page.

## Running svr-info

### Extract files from the archive and step into the directory

`tar -xf svr-info.tgz`

`cd svr-info`

### View options

`./svr-info -h`

### Collect configuration data on local host

`./svr-info`

## Contributing

We welcome bug reports, questions and feature requests. Please submit via Github Issues.

## Building svr-info

Due to the large number of build dependencies required, a Docker container-based build environment is provided. Assuming your system has Docker installed (instructions not provided here), the following steps are required to build svr-info:

- `builder/build_docker_image` creates the docker image
- `builder/build` runs `make dist` in the container

After a successful build, you will find the build output in the `dist` folder.

Other builder commands available:

- `builder/test` runs the automated tests in the container via `make test`
- `builder/shell` starts the container and provides a bash prompt useful for debugging build problems

### Incremental Builds
After a complete build using the build container, you can perform incremental builds directly on your host assuming dependencies are installed there. This can make the code/build/test cycle much quicker than rebuilding everything using the Docker container. You can look at the Dockerfile in the builder directory to get the build dependencies for everything or, more likely, you only need go(lang) so install the latest and get to work.

From the project's root directory, you can use the makefile. There are quite a few targets. Most useful may be `make apps`. This will build all the go-based apps.

If you are working on a single go-based app. You can run `go build` in the app's source directory to build it.

### Additional Collection Tools
Additional data collection tools can be built into svr-info by placing binaries in the bin directory before starting the build. For example, Intel® Memory Latency Checker is a useful tool for identifying the health and performance of a server's memory subsystem. It can be downloaded from here: https://www.intel.com/content/www/us/en/download/736633/intel-memory-latency-checker-intel-mlc.html. Once downloaded, extract the Linux executable and place in the bin directory before starting the build.

## Architecture
There are three primary applications that make up svr-info. They are written in go and can all be run/tested independently.
1. orchestrator - runs on local host, communicates with remote targets via SSH, configures and runs the collector component on selected targets, then runs the reporter component to generate reports. Svr-info is a symbolic link to the orchestrator application.
2. collector - runs on local and/or remote targets to collect information to be fed into the reporter
3. reporter - generates reports from collector output
Loading

0 comments on commit 13a2dc8

Please sign in to comment.