parent
f81c72086f
commit
f122225cc2
@ -1,12 +0,0 @@
|
||||
# Note for EPEL users
|
||||
|
||||
The stock EL8 (RHEL/CentOS/CentOS Stream) kernel has PSI support compiled
|
||||
into the kernel but disabled by default.
|
||||
|
||||
You will need to pass `psi=1` on the kernel command line, see
|
||||
https://facebookmicrosites.github.io/psi/docs/overview.html#prerequisites
|
||||
|
||||
To persist, add this to `/etc/default/grub` to the `GRUB_CMDLINE_LINUX`
|
||||
string and rebuild the GRUB config by running this as root:
|
||||
|
||||
`grub2-mkconfig -o /etc/grub2-efi.cfg`
|
@ -1,91 +0,0 @@
|
||||
![below](img/below_logo_horizontal.png)
|
||||
|
||||
[![CI](https://github.com/facebookincubator/below/workflows/CI/badge.svg)](https://github.com/facebookincubator/below/actions?query=workflow%3ACI+branch%3Amain+)
|
||||
[![Matrix chat](https://img.shields.io/matrix/below:matrix.org)](https://matrix.to/#/!SrWxtbLuRUMrDbftgA:matrix.org?via=matrix.org)
|
||||
|
||||
`below` is an interactive tool to view and record historical system data. It
|
||||
has support for:
|
||||
|
||||
* information regarding hardware resource utilization
|
||||
* viewing the cgroup hierarchy
|
||||
* cgroup and process information
|
||||
* pressure stall information (PSI)
|
||||
* `record` mode to record system data
|
||||
* `replay` mode to replay historical system data
|
||||
* `live` mode to view live system data
|
||||
* `dump` subcommand to report script-friendly information (eg JSON and CSV)
|
||||
|
||||
below does **not** have support for cgroup1.
|
||||
|
||||
The name "below" stems from the fact that the below developers rejected many
|
||||
of [atop](https://linux.die.net/man/1/atop)'s design and style decisions.
|
||||
|
||||
## Demo
|
||||
|
||||
<a href="https://asciinema.org/a/355506">
|
||||
<img src="https://asciinema.org/a/355506.svg" width="500">
|
||||
</a>
|
||||
|
||||
## Installing
|
||||
|
||||
`below` is packaged in Fedora as of Fedora 34, and can be installed with:
|
||||
|
||||
```shell
|
||||
sudo dnf install below
|
||||
```
|
||||
|
||||
Optionally, the systemd service for persistent data collection can also be
|
||||
enabled with:
|
||||
|
||||
```shell
|
||||
sudo systemctl enable --now below
|
||||
```
|
||||
|
||||
## Installing from source
|
||||
|
||||
First, install dependencies listed in [building.md](docs/building.md).
|
||||
|
||||
```shell
|
||||
$ cargo install below
|
||||
$ below --help
|
||||
```
|
||||
|
||||
For convenience, we also provide a Dockerfile and
|
||||
[pre-built images](https://hub.docker.com/r/below/below) on Docker Hub.
|
||||
See [docker.md](docs/docker.md) for how to use them.
|
||||
|
||||
## Quickstart
|
||||
|
||||
Live view of system:
|
||||
|
||||
```shell
|
||||
$ sudo below live
|
||||
```
|
||||
|
||||
Run recording daemon:
|
||||
|
||||
```shell
|
||||
$ sudo cp ~/.cargo/bin/below /bin/below # if using cargo-install
|
||||
$ sudo cp resctl/below/etc/below.service /etc/systemd/system
|
||||
$ sudo systemctl daemon-reload
|
||||
$ sudo systemctl start below
|
||||
```
|
||||
|
||||
Replay historical data:
|
||||
|
||||
```shell
|
||||
$ below replay -t "3m ago"
|
||||
```
|
||||
|
||||
## Comparison with alternative tools
|
||||
|
||||
See [comparison.md](docs/comparison.md) for a feature comparison
|
||||
with alternative tools.
|
||||
|
||||
## Contributing
|
||||
|
||||
See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.
|
||||
|
||||
## License
|
||||
|
||||
See [LICENSE](LICENSE) file.
|
@ -1,2 +1 @@
|
||||
SHA512 (below-0.5.0.crate) = 7fd12aae0b912756a5ac3cee289d1b8390349f046cbf18a32dc61b7b41ab0809154133eff63cd04637f0d2ae3cdb25b5c7e2016452ed840205f5b7db57403c61
|
||||
SHA512 (below-0.5.0-vendor.tar.gz) = 61d9bfcb0243c08f6fe4f16f4dcbebafb946b1e62857d4182aaa99325bf72e7ecc8209c6ddd05c0e120f0bcc3cff128fe60ad9fb33cd560a996cb424ad74a7ed
|
||||
SHA512 (below-0.6.3.crate) = 4326bb87ba7d2f378fb8e7ecd68332574ef03f6d9f2fdd7994c8813817aeddf649fc5935b46328bc7a4c08ed3f292a881455b8de88fab424c613adb305a75a5e
|
||||
|
@ -1,62 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" == --prepare ]; then
|
||||
PREPARE=1
|
||||
fi
|
||||
|
||||
name='below'
|
||||
specfile="rust-${name}.spec"
|
||||
version=$(rpm -q --qf '%{VERSION}\n' --specfile "$specfile" | head -1)
|
||||
nv="${name}-${version}"
|
||||
crate="${nv}.crate"
|
||||
vendor_tarball="${nv}-vendor.tar.gz"
|
||||
|
||||
if [ -f "$vendor_tarball" ]; then
|
||||
echo "${vendor_tarball} already exists, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f "$crate" ] || spectool -g "$specfile"
|
||||
tardir="$PWD"
|
||||
workdir=$(mktemp -d)
|
||||
if [ ! -n "$PREPARE" ]; then
|
||||
trap 'rm -rf "$workdir"' EXIT
|
||||
fi
|
||||
|
||||
# libbpf-rs and libbpf-cargo transitively depend on libbpf 0.5.0, and
|
||||
# el8 ships 0.4.0.
|
||||
#
|
||||
# So we cheat:
|
||||
# - below-fix-metadata.diff (which is applied in %prep)
|
||||
# sets up all the other crates to be replaced with patched
|
||||
# versions under patched-crates/
|
||||
# - below-patched-crates.patch contains the actual modifications of the patched
|
||||
# crates (mostly the edition downgrades, a few pins and a couple of build
|
||||
# fixes)
|
||||
#
|
||||
# We then build the vendored tarball as follows:
|
||||
# - unpack the below crate and vendor
|
||||
# - foreach patched crate, move it from vendor/ to patched-crates/
|
||||
# - delete vendor/ as it's no longer needed, and so we can vendor again later
|
||||
# - apply the two patches, to fix the below metadata and the patched crates
|
||||
# - run vendor again, and then tar up *both* patched-crates/ and vendor/
|
||||
tar xvzf "$tardir/$crate" -C "$workdir"
|
||||
(cd "${workdir}/${nv}" && cargo vendor)
|
||||
mkdir "${workdir}/${nv}/patched-crates"
|
||||
for c in below_derive below-common below-config below-dump below-model below-render below-store below-view cgroupfs fb_procfs libbpf-cargo libbpf-rs; do
|
||||
mv "${workdir}/${nv}/vendor/${c}" "${workdir}/${nv}/patched-crates/"
|
||||
done
|
||||
rm -r "${workdir}/${nv}/vendor"
|
||||
(cd "${workdir}/${nv}" && patch -p1 < ${tardir}/below-fix-metadata.diff)
|
||||
if [ -n "$PREPARE" ]; then
|
||||
echo "Go to ${workdir} and update the patch"
|
||||
exit 1
|
||||
else
|
||||
(cd "${workdir}/${nv}" && \
|
||||
([ -f ${tardir}/below-patched-crates.patch ] && \
|
||||
patch -p1 < ${tardir}/below-patched-crates.patch); \
|
||||
cargo vendor && \
|
||||
tar cvzf "${tardir}/${vendor_tarball}" patched-crates/ vendor/)
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in new issue