2024-08-05 21:24:26 +00:00
|
|
|
PORT ?= 8008
|
|
|
|
VENV := venv/bin
|
|
|
|
VENV_DEV := venv-dev/bin
|
|
|
|
VENV_MIN := venv-min/bin
|
|
|
|
CONF := conf/glances.conf
|
|
|
|
PIP := $(VENV)/pip
|
|
|
|
PYTHON := $(VENV)/python
|
2024-08-07 23:27:50 +00:00
|
|
|
LASTTAG = $(shell git describe --tags --abbrev=0)
|
|
|
|
|
|
|
|
IMAGES_TYPES := full minimal dev
|
|
|
|
ALPINE_IMAGES := $(IMAGES_TYPES:%=docker-alpine-%)
|
|
|
|
UBUNTU_IMAGES := $(IMAGES_TYPES:%=docker-ubuntu-%)
|
|
|
|
DOCKER_IMAGES := $(ALPINE_IMAGES) $(UBUNTU_IMAGES)
|
|
|
|
DOCKER_RUNTIMES := $(DOCKER_IMAGES:%=run-%)
|
|
|
|
UNIT_TESTS := test-core test-restful test-xmlrpc
|
2024-08-05 21:24:26 +00:00
|
|
|
DOCKER_BUILD := docker buildx build
|
|
|
|
DOCKER_RUN := docker run
|
|
|
|
PODMAN_SOCK ?= /run/user/$(shell id -u)/podman/podman.sock
|
|
|
|
DOCKER_SOCK ?= /var/run/docker.sock
|
|
|
|
DOCKER_SOCKS := -v $(PODMAN_SOCK):$(PODMAN_SOCK):ro -v $(DOCKER_SOCK):$(DOCKER_SOCK):ro
|
|
|
|
DOCKER_OPTS := --rm -e TZ="${TZ}" -e GLANCES_OPT="" --pid host --network host
|
|
|
|
|
2024-08-07 23:27:50 +00:00
|
|
|
define DOCKER_TAG
|
|
|
|
glances:local-$*
|
|
|
|
endef
|
2018-12-27 09:10:26 +00:00
|
|
|
|
2022-07-05 21:34:58 +00:00
|
|
|
# if the command is only `make`, the default tasks will be the printing of the help.
|
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
|
2024-08-05 21:25:48 +00:00
|
|
|
.PHONY: help test docs docs-server venv venv-min venv-dev
|
|
|
|
|
2022-07-05 21:34:58 +00:00
|
|
|
help: ## List all make commands available
|
2024-08-05 21:26:59 +00:00
|
|
|
@grep -E '^[\.a-zA-Z_%-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
|
|
|
awk -F ":" '{print $1}' | \
|
|
|
|
grep -v % | \
|
|
|
|
sed 's/\\//g' | \
|
|
|
|
sort | \
|
|
|
|
awk 'BEGIN {FS = ":[^:]*?##"}; {printf "\033[1;34mmake %-50s\033[0m %s\n", $$1, $$2}'
|
2022-07-05 21:34:58 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
# ===================================================================
|
|
|
|
# Virtualenv
|
|
|
|
# ===================================================================
|
2018-12-27 09:10:26 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
venv-python: venv-full-python venv-min-python venv-dev-python ## Install all Python 3 venv
|
2018-12-27 09:10:26 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
venv: venv-full venv-min venv-dev ## Install all Python 3 dependencies
|
2018-12-27 09:10:26 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
venv-upgrade: venv-full-upgrade venv-min-upgrade venv-dev-upgrade ## Upgrade all Python 3 dependencies
|
2021-04-11 08:39:30 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
# For full installation (with optional dependencies)
|
|
|
|
|
|
|
|
venv-full-python: ## Install Python 3 venv
|
|
|
|
virtualenv -p /usr/bin/python3 venv
|
|
|
|
|
|
|
|
venv-full: venv-python ## Install Python 3 run-time dependencies
|
2024-08-05 21:28:47 +00:00
|
|
|
$(PIP) install -r requirements.txt
|
|
|
|
$(PIP) install -r optional-requirements.txt
|
2021-05-23 07:04:41 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
venv-full-upgrade: ## Upgrade Python 3 run-time dependencies
|
2024-08-05 21:28:47 +00:00
|
|
|
$(PIP) install --upgrade pip
|
|
|
|
$(PIP) install --upgrade -r requirements.txt
|
|
|
|
$(PIP) install --upgrade -r optional-requirements.txt
|
2021-05-23 07:04:41 +00:00
|
|
|
|
2023-05-17 09:35:46 +00:00
|
|
|
# For minimal installation (without optional dependencies)
|
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
venv-min-python: ## Install Python 3 venv minimal
|
2023-05-17 09:35:46 +00:00
|
|
|
virtualenv -p /usr/bin/python3 venv-min
|
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
venv-min: venv-min-python ## Install Python 3 minimal run-time dependencies
|
2024-08-05 21:28:47 +00:00
|
|
|
$(VENV_MIN)/pip install -r requirements.txt
|
2023-05-17 09:35:46 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
venv-min-upgrade: ## Upgrade Python 3 minimal run-time dependencies
|
2024-08-05 21:28:47 +00:00
|
|
|
$(VENV_MIN)/pip install --upgrade pip
|
|
|
|
$(VENV_MIN)/pip install --upgrade -r requirements.txt
|
2023-05-17 13:42:39 +00:00
|
|
|
|
|
|
|
# For development
|
|
|
|
|
|
|
|
venv-dev-python: ## Install Python 3 venv
|
|
|
|
virtualenv -p /usr/bin/python3 venv-dev
|
|
|
|
|
|
|
|
venv-dev: venv-python ## Install Python 3 dev dependencies
|
2024-08-05 21:28:47 +00:00
|
|
|
$(VENV_DEV)/pip install -r dev-requirements.txt
|
|
|
|
$(VENV_DEV)/pip install -r doc-requirements.txt
|
|
|
|
$(VENV_DEV)/pre-commit install --hook-type pre-commit
|
2023-05-17 13:42:39 +00:00
|
|
|
|
|
|
|
venv-dev-upgrade: ## Upgrade Python 3 dev dependencies
|
2024-08-05 21:28:47 +00:00
|
|
|
$(VENV_DEV)/pip install --upgrade pip
|
|
|
|
$(VENV_DEV)/pip install --upgrade -r dev-requirements.txt
|
|
|
|
$(VENV_DEV)/pip install --upgrade -r doc-requirements.txt
|
2023-05-17 09:35:46 +00:00
|
|
|
|
2022-08-20 07:39:49 +00:00
|
|
|
# ===================================================================
|
|
|
|
# Tests
|
|
|
|
# ===================================================================
|
|
|
|
|
2024-08-07 23:27:50 +00:00
|
|
|
$(UNIT_TESTS): test-%: unittest-%.py
|
|
|
|
$(PYTHON) $<
|
2024-05-07 13:26:16 +00:00
|
|
|
|
2024-08-07 23:27:50 +00:00
|
|
|
test-core: ## Run core unit tests
|
2024-05-07 13:26:16 +00:00
|
|
|
test-restful: ## Run Restful unit tests
|
|
|
|
test-xmlrpc: ## Run XMLRPC unit tests
|
|
|
|
|
2024-08-07 23:27:50 +00:00
|
|
|
test: $(UNIT_TESTS) ## Run unit tests
|
2022-09-09 08:20:38 +00:00
|
|
|
|
2024-05-07 13:26:16 +00:00
|
|
|
test-with-upgrade: venv-upgrade venv-dev-upgrade test ## Upgrade deps and run unit tests
|
2023-05-17 13:42:39 +00:00
|
|
|
|
2024-05-07 13:26:16 +00:00
|
|
|
test-min: ## Run core unit tests in minimal environment
|
2024-08-07 23:27:50 +00:00
|
|
|
$(VENV_MIN)/python unittest-core.py
|
2023-05-17 13:42:39 +00:00
|
|
|
|
|
|
|
test-min-with-upgrade: venv-min-upgrade ## Upgrade deps and run unit tests in minimal environment
|
2024-08-07 23:27:50 +00:00
|
|
|
$(VENV_MIN)/python unittest-core.py
|
2021-11-29 16:00:30 +00:00
|
|
|
|
2022-08-20 07:39:49 +00:00
|
|
|
# ===================================================================
|
2023-12-09 10:07:33 +00:00
|
|
|
# Linters, profilers and cyber security
|
2022-08-20 07:39:49 +00:00
|
|
|
# ===================================================================
|
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
format: ## Format the code
|
2024-08-05 21:34:08 +00:00
|
|
|
$(VENV_DEV)/python -m ruff format .
|
2021-05-29 16:48:27 +00:00
|
|
|
|
2024-05-16 22:43:26 +00:00
|
|
|
lint: ## Lint the code.
|
2024-08-05 21:34:08 +00:00
|
|
|
$(VENV_DEV)/python -m ruff check . --fix
|
2023-05-01 08:12:09 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
codespell: ## Run codespell to fix common misspellings in text files
|
2024-08-05 21:34:08 +00:00
|
|
|
$(VENV_DEV)/codespell -S .git,./docs/_build,./Glances.egg-info,./venv*,./glances/outputs,*.svg -L hart,bu,te,statics -w
|
2022-10-16 08:43:11 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
semgrep: ## Run semgrep to find bugs and enforce code standards
|
2024-08-05 21:40:34 +00:00
|
|
|
$(VENV_DEV)/semgrep scan --config=auto
|
2023-02-04 15:08:22 +00:00
|
|
|
|
2024-05-06 09:55:37 +00:00
|
|
|
profiling-gprof: ## Callgraph profiling (need "apt install graphviz")
|
|
|
|
@echo "Start Glances for 30 iterations (more or less 1 mins, please do not exit !)"
|
|
|
|
sleep 3
|
2024-08-05 21:37:14 +00:00
|
|
|
$(PYTHON) -m cProfile -o ./glances.cprof ./run.py --stop-after 30
|
|
|
|
$(VENV_DEV)/gprof2dot -f pstats ./glances.cprof | dot -Tsvg -o ./docs/_static/glances-cgraph.svg
|
2024-05-06 09:55:37 +00:00
|
|
|
rm -f ./glances.cprof
|
|
|
|
|
|
|
|
profiling-pyinstrument: ## PyInstrument profiling
|
|
|
|
@echo "Start Glances for 30 iterations (more or less 1 mins, please do not exit !)"
|
|
|
|
sleep 3
|
2024-08-05 21:37:14 +00:00
|
|
|
$(PIP) install pyinstrument
|
|
|
|
$(PYTHON) -m pyinstrument -r html -o ./docs/_static/glances-pyinstrument.html -m glances --stop-after 30
|
2024-05-06 09:55:37 +00:00
|
|
|
|
|
|
|
profiling-pyspy: ## Flame profiling (currently not compatible with Python 3.12)
|
|
|
|
@echo "Start Glances for 30 iterations (more or less 1 mins, please do not exit !)"
|
|
|
|
sleep 3
|
2024-08-05 21:37:14 +00:00
|
|
|
$(VENV_DEV)/py-spy record -o ./docs/_static/glances-flame.svg -d 60 -s -- $(PYTHON) ./run.py --stop-after 30
|
2024-05-06 09:55:37 +00:00
|
|
|
|
|
|
|
profiling: profiling-gprof profiling-pyinstrument profiling-pyspy ## Profiling of the Glances software
|
2022-08-20 07:39:49 +00:00
|
|
|
|
|
|
|
trace-malloc: ## Trace the malloc() calls
|
|
|
|
@echo "Malloc test is running, please wait ~30 secondes..."
|
2024-08-05 21:38:38 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --trace-malloc --stop-after 15 --quiet
|
2022-08-20 07:39:49 +00:00
|
|
|
|
|
|
|
memory-leak: ## Profile memory leaks
|
2024-08-05 21:38:38 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --memory-leak
|
2022-08-20 07:39:49 +00:00
|
|
|
|
2022-11-12 16:15:44 +00:00
|
|
|
memory-profiling: ## Profile memory usage
|
|
|
|
@echo "It's a very long test (~4 hours)..."
|
|
|
|
rm -f mprofile_*.dat
|
|
|
|
@echo "1/2 - Start memory profiling with the history option enable"
|
2024-08-05 21:38:38 +00:00
|
|
|
$(VENV_DEV)/mprof run -T 1 -C run.py -C $(CONF) --stop-after 2400 --quiet
|
|
|
|
$(VENV_DEV)/mprof plot --output ./docs/_static/glances-memory-profiling-with-history.png
|
2022-11-12 16:15:44 +00:00
|
|
|
rm -f mprofile_*.dat
|
|
|
|
@echo "2/2 - Start memory profiling with the history option disable"
|
2024-08-05 21:38:38 +00:00
|
|
|
$(VENV_DEV)/mprof run -T 1 -C run.py -C $(CONF) --disable-history --stop-after 2400 --quiet
|
|
|
|
$(VENV_DEV)/mprof plot --output ./docs/_static/glances-memory-profiling-without-history.png
|
2022-11-12 16:15:44 +00:00
|
|
|
rm -f mprofile_*.dat
|
|
|
|
|
2023-12-09 10:07:33 +00:00
|
|
|
# Trivy installation: https://aquasecurity.github.io/trivy/latest/getting-started/installation/
|
|
|
|
trivy: ## Run Trivy to find vulnerabilities in container images
|
|
|
|
trivy fs .
|
|
|
|
|
2022-08-20 07:39:49 +00:00
|
|
|
# ===================================================================
|
|
|
|
# Docs
|
|
|
|
# ===================================================================
|
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
docs: ## Create the documentation
|
2024-08-05 21:39:41 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --api-doc > ./docs/api.rst
|
2021-07-17 07:31:07 +00:00
|
|
|
cd docs && ./build.sh && cd ..
|
2021-05-29 16:48:27 +00:00
|
|
|
|
2022-07-09 07:03:39 +00:00
|
|
|
docs-server: docs ## Start a Web server to serve the documentation
|
2021-05-29 16:48:27 +00:00
|
|
|
(sleep 2 && sensible-browser "http://localhost:$(PORT)") &
|
2021-11-11 09:46:56 +00:00
|
|
|
cd docs/_build/html/ && ../../../venv/bin/python -m http.server $(PORT)
|
2021-05-29 16:48:27 +00:00
|
|
|
|
2022-08-20 07:39:49 +00:00
|
|
|
release-note: ## Generate release note
|
|
|
|
git --no-pager log $(LASTTAG)..HEAD --first-parent --pretty=format:"* %s"
|
|
|
|
@echo "\n"
|
|
|
|
git --no-pager shortlog -s -n $(LASTTAG)..HEAD
|
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
install: ## Open a Web Browser to the installation procedure
|
|
|
|
sensible-browser "https://github.com/nicolargo/glances#installation"
|
|
|
|
|
2022-08-20 07:39:49 +00:00
|
|
|
# ===================================================================
|
|
|
|
# WebUI
|
2023-05-17 13:42:39 +00:00
|
|
|
# Follow ./glances/outputs/static/README.md for more information
|
2022-08-20 07:39:49 +00:00
|
|
|
# ===================================================================
|
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
webui: ## Build the Web UI
|
2021-11-11 09:46:29 +00:00
|
|
|
cd glances/outputs/static/ && npm ci && npm run build
|
2021-05-29 16:48:27 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
webui-audit: ## Audit the Web UI
|
2022-07-29 11:17:03 +00:00
|
|
|
cd glances/outputs/static/ && npm audit
|
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
webui-audit-fix: ## Fix audit the Web UI
|
2022-10-22 07:46:11 +00:00
|
|
|
cd glances/outputs/static/ && npm audit fix && npm ci && npm run build
|
|
|
|
|
2022-08-20 07:39:49 +00:00
|
|
|
# ===================================================================
|
|
|
|
# Packaging
|
|
|
|
# ===================================================================
|
|
|
|
|
|
|
|
flatpak: venv-dev-upgrade ## Generate FlatPack JSON file
|
|
|
|
git clone https://github.com/flatpak/flatpak-builder-tools.git
|
2024-08-05 22:09:57 +00:00
|
|
|
$(PYTHON) ./flatpak-builder-tools/pip/flatpak-pip-generator glances
|
2022-08-20 07:39:49 +00:00
|
|
|
rm -rf ./flatpak-builder-tools
|
|
|
|
@echo "Now follow: https://github.com/flathub/flathub/wiki/App-Submission"
|
|
|
|
|
2024-06-29 17:19:26 +00:00
|
|
|
# Snap package is automatically build on the Snapcraft.io platform
|
2024-02-03 08:59:31 +00:00
|
|
|
# https://snapcraft.io/glances
|
|
|
|
# But you can try an offline build with the following command
|
|
|
|
snapcraft:
|
|
|
|
snapcraft
|
|
|
|
|
2022-09-15 09:02:11 +00:00
|
|
|
# ===================================================================
|
|
|
|
# Docker
|
2024-04-30 08:35:45 +00:00
|
|
|
# Need Docker Buildx package (apt install docker-buildx on Ubuntu)
|
2022-09-15 09:02:11 +00:00
|
|
|
# ===================================================================
|
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
docker: docker-alpine docker-ubuntu ## Generate local docker images
|
2022-10-29 08:55:59 +00:00
|
|
|
|
2024-04-27 08:04:00 +00:00
|
|
|
docker-alpine: docker-alpine-full docker-alpine-minimal docker-alpine-dev ## Generate local docker images (Alpine)
|
|
|
|
|
|
|
|
docker-alpine-full: ## Generate local docker image (Alpine full)
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_BUILD) --target full -f $(DOCKERFILE_ALPINE) -t glances:local-alpine-full .
|
2024-04-27 08:04:00 +00:00
|
|
|
|
|
|
|
docker-alpine-minimal: ## Generate local docker image (Alpine minimal)
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_BUILD) --target minimal -f $(DOCKERFILE_ALPINE) -t glances:local-alpine-minimal .
|
2024-04-27 08:04:00 +00:00
|
|
|
|
|
|
|
docker-alpine-dev: ## Generate local docker image (Alpine dev)
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_BUILD) --target dev -f $(DOCKERFILE_ALPINE) -t glances:local-alpine-dev .
|
2022-09-15 09:02:11 +00:00
|
|
|
|
2024-04-27 08:04:00 +00:00
|
|
|
docker-ubuntu: docker-ubuntu-full docker-ubuntu-minimal docker-ubuntu-dev ## Generate local docker images (Ubuntu)
|
|
|
|
|
|
|
|
docker-ubuntu-full: ## Generate local docker image (Ubuntu full)
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_BUILD) --target full -f $(DOCKERFILE_UBUNTU) -t glances:local-ubuntu-full .
|
2024-04-27 08:04:00 +00:00
|
|
|
|
|
|
|
docker-ubuntu-minimal: ## Generate local docker image (Ubuntu minimal)
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_BUILD) --target minimal -f $(DOCKERFILE_UBUNTU) -t glances:local-ubuntu-minimal .
|
2024-04-27 08:04:00 +00:00
|
|
|
|
|
|
|
docker-ubuntu-dev: ## Generate local docker image (Ubuntu dev)
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_BUILD) --target dev -f $(DOCKERFILE_UBUNTU) -t glances:local-ubuntu-dev .
|
2023-01-05 05:19:42 +00:00
|
|
|
|
2022-08-20 07:39:49 +00:00
|
|
|
# ===================================================================
|
|
|
|
# Run
|
|
|
|
# ===================================================================
|
|
|
|
|
2022-07-09 07:03:39 +00:00
|
|
|
run: ## Start Glances in console mode (also called standalone)
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF)
|
2021-05-23 07:04:41 +00:00
|
|
|
|
2022-07-09 07:03:39 +00:00
|
|
|
run-debug: ## Start Glances in debug console mode (also called standalone)
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -d
|
2021-05-23 07:04:41 +00:00
|
|
|
|
2022-09-11 16:04:04 +00:00
|
|
|
run-local-conf: ## Start Glances in console mode with the system conf file
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances
|
2022-09-11 16:04:04 +00:00
|
|
|
|
2024-04-29 08:01:24 +00:00
|
|
|
run-local-conf-hide-public: ## Start Glances in console mode with the system conf file and hide public information
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances --hide-public-info
|
2024-04-29 08:01:24 +00:00
|
|
|
|
2023-05-17 13:42:39 +00:00
|
|
|
run-min: ## Start minimal Glances in console mode (also called standalone)
|
2024-08-05 21:24:26 +00:00
|
|
|
$(VENV_MIN)/python -m glances -C $(CONF)
|
2023-05-17 13:42:39 +00:00
|
|
|
|
|
|
|
run-min-debug: ## Start minimal Glances in debug console mode (also called standalone)
|
2024-08-05 21:24:26 +00:00
|
|
|
$(VENV_MIN)/python -m glances -C $(CONF) -d
|
2023-05-17 13:42:39 +00:00
|
|
|
|
|
|
|
run-min-local-conf: ## Start minimal Glances in console mode with the system conf file
|
2024-08-05 21:24:26 +00:00
|
|
|
$(VENV_MIN)/python -m glances
|
2023-05-17 13:42:39 +00:00
|
|
|
|
2022-09-15 09:02:11 +00:00
|
|
|
run-docker-alpine-minimal: ## Start Glances Alpine Docker minimal in console mode
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_RUN) $(DOCKER_OPTS) $(DOCKER_SOCKS) -it glances:local-alpine-minimal
|
2022-09-15 09:02:11 +00:00
|
|
|
|
|
|
|
run-docker-alpine-full: ## Start Glances Alpine Docker full in console mode
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_RUN) $(DOCKER_OPTS) $(DOCKER_SOCKS) -it glances:local-alpine-full
|
2022-09-15 09:02:11 +00:00
|
|
|
|
|
|
|
run-docker-alpine-dev: ## Start Glances Alpine Docker dev in console mode
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_RUN) $(DOCKER_OPTS) $(DOCKER_SOCKS) -it glances:local-alpine-dev
|
2022-09-15 09:02:11 +00:00
|
|
|
|
2023-01-14 08:15:36 +00:00
|
|
|
run-docker-ubuntu-minimal: ## Start Glances Ubuntu Docker minimal in console mode
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_RUN) $(DOCKER_OPTS) $(DOCKER_SOCKS) -it glances:local-ubuntu-minimal
|
2023-01-14 08:15:36 +00:00
|
|
|
|
|
|
|
run-docker-ubuntu-full: ## Start Glances Ubuntu Docker full in console mode
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_RUN) $(DOCKER_OPTS) $(DOCKER_SOCKS) -it glances:local-ubuntu-full
|
2023-01-14 08:15:36 +00:00
|
|
|
|
|
|
|
run-docker-ubuntu-dev: ## Start Glances Ubuntu Docker dev in console mode
|
2024-08-06 18:22:54 +00:00
|
|
|
$(DOCKER_RUN) $(DOCKER_OPTS) $(DOCKER_SOCKS) -it glances:local-ubuntu-dev
|
2023-01-14 08:15:36 +00:00
|
|
|
|
2022-07-09 07:03:39 +00:00
|
|
|
run-webserver: ## Start Glances in Web server mode
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -w
|
2021-05-23 07:04:41 +00:00
|
|
|
|
2024-04-27 15:38:56 +00:00
|
|
|
run-webserver-local-conf: ## Start Glances in Web server mode with the system conf file
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -w
|
2024-04-27 15:38:56 +00:00
|
|
|
|
2024-04-29 08:01:24 +00:00
|
|
|
run-webserver-local-conf-hide-public: ## Start Glances in Web server mode with the system conf file and hide public info
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -w --hide-public-info
|
2024-04-29 08:01:24 +00:00
|
|
|
|
2022-07-09 07:03:39 +00:00
|
|
|
run-restapiserver: ## Start Glances in REST API server mode
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -w --disable-webui
|
2021-07-16 13:39:24 +00:00
|
|
|
|
2022-07-09 07:03:39 +00:00
|
|
|
run-server: ## Start Glances in server mode (RPC)
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -s
|
2021-05-23 07:04:41 +00:00
|
|
|
|
2022-07-09 07:03:39 +00:00
|
|
|
run-client: ## Start Glances in client mode (RPC)
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -c localhost
|
2021-05-23 07:04:41 +00:00
|
|
|
|
2022-07-09 07:03:39 +00:00
|
|
|
run-browser: ## Start Glances in browser mode (RPC)
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --browser
|
2021-06-13 08:49:01 +00:00
|
|
|
|
2023-04-29 08:01:44 +00:00
|
|
|
run-issue: ## Start Glances in issue mode
|
2024-08-05 21:24:26 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --issue
|
2023-04-29 08:01:44 +00:00
|
|
|
|
2024-07-07 16:47:46 +00:00
|
|
|
run-multipass: ## Install and start Glances in a VM (only available on Ubuntu with multipass already installed)
|
|
|
|
multipass launch -n glances-on-lts lts
|
|
|
|
multipass exec glances-on-lts -- sudo snap install glances
|
|
|
|
multipass exec glances-on-lts -- glances
|
|
|
|
multipass stop glances-on-lts
|
|
|
|
multipass delete glances-on-lts
|
|
|
|
|
2022-07-09 07:03:39 +00:00
|
|
|
show-version: ## Show Glances version number
|
2024-08-05 21:25:48 +00:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -V
|