2024-08-06 00:24:26 +03:00
|
|
|
PORT ?= 8008
|
2024-08-11 18:40:27 +03:00
|
|
|
venv_full:= venv/bin
|
|
|
|
venv_dev := venv-dev/bin
|
|
|
|
venv_min := venv-min/bin
|
2024-08-06 00:24:26 +03:00
|
|
|
CONF := conf/glances.conf
|
2024-08-11 18:40:27 +03:00
|
|
|
PIP := $(venv_full)/pip
|
|
|
|
PYTHON := $(venv_full)/python
|
2024-08-08 02:27:50 +03:00
|
|
|
LASTTAG = $(shell git describe --tags --abbrev=0)
|
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
VENV_TYPES := full min dev
|
|
|
|
VENV_PYTHON := $(VENV_TYPES:%=venv-%-python)
|
|
|
|
VENV_UPG := $(VENV_TYPES:%=venv-%-upgrade)
|
|
|
|
VENV_DEPS := $(VENV_TYPES:%=venv-%)
|
|
|
|
VENV_INST_UPG := $(VENV_DEPS) $(VENV_UPG)
|
|
|
|
|
2024-08-08 02:27:50 +03:00
|
|
|
IMAGES_TYPES := full minimal dev
|
2024-08-10 10:14:19 +03:00
|
|
|
DISTROS := alpine ubuntu
|
|
|
|
alpine_images := $(IMAGES_TYPES:%=docker-alpine-%)
|
|
|
|
ubuntu_images := $(IMAGES_TYPES:%=docker-ubuntu-%)
|
|
|
|
DOCKER_IMAGES := $(alpine_images) $(ubuntu_images)
|
2024-08-08 02:27:50 +03:00
|
|
|
DOCKER_RUNTIMES := $(DOCKER_IMAGES:%=run-%)
|
|
|
|
UNIT_TESTS := test-core test-restful test-xmlrpc
|
2024-08-06 00:24:26 +03: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
|
|
|
|
|
2022-07-06 00:34:58 +03:00
|
|
|
# if the command is only `make`, the default tasks will be the printing of the help.
|
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
|
2024-08-06 00:25:48 +03:00
|
|
|
.PHONY: help test docs docs-server venv venv-min venv-dev
|
|
|
|
|
2022-07-06 00:34:58 +03:00
|
|
|
help: ## List all make commands available
|
2024-08-06 00:26:59 +03: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-06 00:34:58 +03:00
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
# ===================================================================
|
|
|
|
# Virtualenv
|
|
|
|
# ===================================================================
|
2018-12-27 12:10:26 +03:00
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
venv-%-upgrade: UPGRADE = --upgrade
|
2018-12-27 12:10:26 +03:00
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
define DEFINE_VARS_FOR_TYPE
|
|
|
|
venv-$(TYPE) venv-$(TYPE)-upgrade: VIRTUAL_ENV = $(venv_$(TYPE))
|
|
|
|
endef
|
2018-12-27 12:10:26 +03:00
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
$(foreach TYPE,$(VENV_TYPES),$(eval $(DEFINE_VARS_FOR_TYPE)))
|
2021-04-11 11:39:30 +03:00
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
$(VENV_PYTHON): venv-%-python:
|
|
|
|
virtualenv -p /usr/bin/python3 $(if $(filter full,$*),venv,venv-$*)
|
2023-05-17 16:42:39 +03:00
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
$(VENV_INST_UPG): venv-%:
|
2024-08-24 10:32:01 +03:00
|
|
|
$(if $(UPGRADE),$(VIRTUAL_ENV)/pip install --upgrade pip,)
|
2024-08-11 18:45:21 +03:00
|
|
|
$(foreach REQ,$(REQS), $(VIRTUAL_ENV)/pip install $(UPGRADE) -r $(REQ);)
|
|
|
|
$(if $(PRE_COMMIT),$(VIRTUAL_ENV)/pre-commit install --hook-type pre-commit,)
|
2023-05-17 16:42:39 +03:00
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
venv-python: $(VENV_PYTHON) ## Install all Python 3 venv
|
|
|
|
venv: $(VENV_DEPS) ## Install all Python 3 dependencies
|
|
|
|
venv-upgrade: $(VENV_UPG) ## Upgrade all Python 3 dependencies
|
2021-05-23 10:04:41 +03:00
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
# For full installation (with optional dependencies)
|
|
|
|
|
|
|
|
venv-full venv-full-upgrade: REQS = requirements.txt optional-requirements.txt
|
|
|
|
|
|
|
|
venv-full-python: ## Install Python 3 venv
|
|
|
|
venv-full: venv-python ## Install Python 3 run-time
|
2023-05-17 16:42:39 +03:00
|
|
|
venv-full-upgrade: ## Upgrade Python 3 run-time dependencies
|
2021-05-23 10:04:41 +03:00
|
|
|
|
2023-05-17 12:35:46 +03:00
|
|
|
# For minimal installation (without optional dependencies)
|
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
venv-min venv-min-upgrade: REQS = requirements.txt
|
2023-05-17 12:35:46 +03:00
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
venv-min-python: ## Install Python 3 venv minimal
|
2023-05-17 16:42:39 +03:00
|
|
|
venv-min: venv-min-python ## Install Python 3 minimal run-time dependencies
|
|
|
|
venv-min-upgrade: ## Upgrade Python 3 minimal run-time dependencies
|
|
|
|
|
|
|
|
# For development
|
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
venv-dev venv-dev-upgrade: REQS = dev-requirements.txt doc-requirements.txt
|
|
|
|
venv-dev: PRE_COMMIT = 1
|
2023-05-17 16:42:39 +03:00
|
|
|
|
2024-08-11 18:45:21 +03:00
|
|
|
venv-dev-python: ## Install Python 3 venv
|
2023-05-17 16:42:39 +03:00
|
|
|
venv-dev: venv-python ## Install Python 3 dev dependencies
|
|
|
|
venv-dev-upgrade: ## Upgrade Python 3 dev dependencies
|
2023-05-17 12:35:46 +03:00
|
|
|
|
2022-08-20 10:39:49 +03:00
|
|
|
# ===================================================================
|
|
|
|
# Tests
|
|
|
|
# ===================================================================
|
|
|
|
|
2024-08-08 02:27:50 +03:00
|
|
|
$(UNIT_TESTS): test-%: unittest-%.py
|
|
|
|
$(PYTHON) $<
|
2024-05-07 16:26:16 +03:00
|
|
|
|
2024-08-08 02:27:50 +03:00
|
|
|
test-core: ## Run core unit tests
|
2024-05-07 16:26:16 +03:00
|
|
|
test-restful: ## Run Restful unit tests
|
|
|
|
test-xmlrpc: ## Run XMLRPC unit tests
|
|
|
|
|
2024-08-08 02:27:50 +03:00
|
|
|
test: $(UNIT_TESTS) ## Run unit tests
|
2022-09-09 11:20:38 +03:00
|
|
|
|
2024-05-07 16:26:16 +03:00
|
|
|
test-with-upgrade: venv-upgrade venv-dev-upgrade test ## Upgrade deps and run unit tests
|
2023-05-17 16:42:39 +03:00
|
|
|
|
2024-05-07 16:26:16 +03:00
|
|
|
test-min: ## Run core unit tests in minimal environment
|
2024-08-11 18:40:27 +03:00
|
|
|
$(venv_min)/python unittest-core.py
|
2023-05-17 16:42:39 +03:00
|
|
|
|
|
|
|
test-min-with-upgrade: venv-min-upgrade ## Upgrade deps and run unit tests in minimal environment
|
2024-08-11 18:40:27 +03:00
|
|
|
$(venv_min)/python unittest-core.py
|
2021-11-29 19:00:30 +03:00
|
|
|
|
2022-08-20 10:39:49 +03:00
|
|
|
# ===================================================================
|
2023-12-09 13:07:33 +03:00
|
|
|
# Linters, profilers and cyber security
|
2022-08-20 10:39:49 +03:00
|
|
|
# ===================================================================
|
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
format: ## Format the code
|
2024-08-11 18:40:27 +03:00
|
|
|
$(venv_dev)/python -m ruff format .
|
2021-05-29 19:48:27 +03:00
|
|
|
|
2024-05-17 01:43:26 +03:00
|
|
|
lint: ## Lint the code.
|
2024-08-11 18:40:27 +03:00
|
|
|
$(venv_dev)/python -m ruff check . --fix
|
2023-05-01 11:12:09 +03:00
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
codespell: ## Run codespell to fix common misspellings in text files
|
2024-08-11 18:40:27 +03:00
|
|
|
$(venv_dev)/codespell -S .git,./docs/_build,./Glances.egg-info,./venv*,./glances/outputs,*.svg -L hart,bu,te,statics -w
|
2022-10-16 11:43:11 +03:00
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
semgrep: ## Run semgrep to find bugs and enforce code standards
|
2024-08-11 18:40:27 +03:00
|
|
|
$(venv_dev)/semgrep scan --config=auto
|
2023-02-04 18:08:22 +03:00
|
|
|
|
2024-08-18 16:26:21 +03:00
|
|
|
profiling-%: SLEEP = 3
|
|
|
|
profiling-%: TIMES = 30
|
|
|
|
profiling-%: OUT_DIR = docs/_static
|
|
|
|
|
|
|
|
define DISPLAY-BANNER
|
|
|
|
@echo "Start Glances for $(TIMES) iterations (more or less 1 mins, please do not exit !)"
|
|
|
|
sleep $(SLEEP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
profiling-gprof: CPROF = glances.cprof
|
2024-05-06 12:55:37 +03:00
|
|
|
profiling-gprof: ## Callgraph profiling (need "apt install graphviz")
|
2024-08-18 16:26:21 +03:00
|
|
|
$(DISPLAY-BANNER)
|
|
|
|
$(PYTHON) -m cProfile -o $(CPROF) run.py --stop-after $(TIMES)
|
|
|
|
$(venv_dev)/gprof2dot -f pstats $(CPROF) | dot -Tsvg -o $(OUT_DIR)/glances-cgraph.svg
|
|
|
|
rm -f $(CPROF)
|
2024-05-06 12:55:37 +03:00
|
|
|
|
|
|
|
profiling-pyinstrument: ## PyInstrument profiling
|
2024-08-18 16:26:21 +03:00
|
|
|
$(DISPLAY-BANNER)
|
2024-08-06 00:37:14 +03:00
|
|
|
$(PIP) install pyinstrument
|
2024-08-18 16:26:21 +03:00
|
|
|
$(PYTHON) -m pyinstrument -r html -o $(OUT_DIR)/glances-pyinstrument.html -m glances --stop-after $(TIMES)
|
2024-05-06 12:55:37 +03:00
|
|
|
|
|
|
|
profiling-pyspy: ## Flame profiling (currently not compatible with Python 3.12)
|
2024-08-18 16:26:21 +03:00
|
|
|
$(DISPLAY-BANNER)
|
|
|
|
$(venv_dev)/py-spy record -o $(OUT_DIR)/glances-flame.svg -d 60 -s -- $(PYTHON) run.py --stop-after $(TIMES)
|
2024-05-06 12:55:37 +03:00
|
|
|
|
|
|
|
profiling: profiling-gprof profiling-pyinstrument profiling-pyspy ## Profiling of the Glances software
|
2022-08-20 10:39:49 +03:00
|
|
|
|
|
|
|
trace-malloc: ## Trace the malloc() calls
|
|
|
|
@echo "Malloc test is running, please wait ~30 secondes..."
|
2024-08-06 00:38:38 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --trace-malloc --stop-after 15 --quiet
|
2022-08-20 10:39:49 +03:00
|
|
|
|
|
|
|
memory-leak: ## Profile memory leaks
|
2024-08-06 00:38:38 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --memory-leak
|
2022-08-20 10:39:49 +03:00
|
|
|
|
2024-08-18 16:26:21 +03:00
|
|
|
memory-profiling: TIMES = 2400
|
|
|
|
memory-profiling: PROFILE = mprofile_*.dat
|
2022-11-12 19:15:44 +03:00
|
|
|
memory-profiling: ## Profile memory usage
|
|
|
|
@echo "It's a very long test (~4 hours)..."
|
2024-08-18 16:26:21 +03:00
|
|
|
rm -f $(PROFILE)
|
2022-11-12 19:15:44 +03:00
|
|
|
@echo "1/2 - Start memory profiling with the history option enable"
|
2024-08-18 16:26:21 +03:00
|
|
|
$(venv_dev)/mprof run -T 1 -C run.py -C $(CONF) --stop-after $(TIMES) --quiet
|
|
|
|
$(venv_dev)/mprof plot --output $(OUT_DIR)/glances-memory-profiling-with-history.png
|
|
|
|
rm -f $(PROFILE)
|
2022-11-12 19:15:44 +03:00
|
|
|
@echo "2/2 - Start memory profiling with the history option disable"
|
2024-08-18 16:26:21 +03:00
|
|
|
$(venv_dev)/mprof run -T 1 -C run.py -C $(CONF) --disable-history --stop-after $(TIMES) --quiet
|
|
|
|
$(venv_dev)/mprof plot --output $(OUT_DIR)/glances-memory-profiling-without-history.png
|
|
|
|
rm -f $(PROFILE)
|
2022-11-12 19:15:44 +03:00
|
|
|
|
2023-12-09 13:07:33 +03: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 10:39:49 +03:00
|
|
|
# ===================================================================
|
|
|
|
# Docs
|
|
|
|
# ===================================================================
|
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
docs: ## Create the documentation
|
2024-08-06 00:39:41 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --api-doc > ./docs/api.rst
|
2021-07-17 10:31:07 +03:00
|
|
|
cd docs && ./build.sh && cd ..
|
2021-05-29 19:48:27 +03:00
|
|
|
|
2022-07-09 10:03:39 +03:00
|
|
|
docs-server: docs ## Start a Web server to serve the documentation
|
2021-05-29 19:48:27 +03:00
|
|
|
(sleep 2 && sensible-browser "http://localhost:$(PORT)") &
|
2021-11-11 12:46:56 +03:00
|
|
|
cd docs/_build/html/ && ../../../venv/bin/python -m http.server $(PORT)
|
2021-05-29 19:48:27 +03:00
|
|
|
|
2022-08-20 10:39:49 +03: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 16:42:39 +03:00
|
|
|
install: ## Open a Web Browser to the installation procedure
|
|
|
|
sensible-browser "https://github.com/nicolargo/glances#installation"
|
|
|
|
|
2022-08-20 10:39:49 +03:00
|
|
|
# ===================================================================
|
|
|
|
# WebUI
|
2023-05-17 16:42:39 +03:00
|
|
|
# Follow ./glances/outputs/static/README.md for more information
|
2022-08-20 10:39:49 +03:00
|
|
|
# ===================================================================
|
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
webui: ## Build the Web UI
|
2021-11-11 12:46:29 +03:00
|
|
|
cd glances/outputs/static/ && npm ci && npm run build
|
2021-05-29 19:48:27 +03:00
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
webui-audit: ## Audit the Web UI
|
2022-07-29 14:17:03 +03:00
|
|
|
cd glances/outputs/static/ && npm audit
|
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
webui-audit-fix: ## Fix audit the Web UI
|
2022-10-22 10:46:11 +03:00
|
|
|
cd glances/outputs/static/ && npm audit fix && npm ci && npm run build
|
|
|
|
|
2022-08-20 10:39:49 +03:00
|
|
|
# ===================================================================
|
|
|
|
# Packaging
|
|
|
|
# ===================================================================
|
|
|
|
|
|
|
|
flatpak: venv-dev-upgrade ## Generate FlatPack JSON file
|
|
|
|
git clone https://github.com/flatpak/flatpak-builder-tools.git
|
2024-08-06 01:09:57 +03:00
|
|
|
$(PYTHON) ./flatpak-builder-tools/pip/flatpak-pip-generator glances
|
2022-08-20 10:39:49 +03:00
|
|
|
rm -rf ./flatpak-builder-tools
|
|
|
|
@echo "Now follow: https://github.com/flathub/flathub/wiki/App-Submission"
|
|
|
|
|
2024-06-29 20:19:26 +03:00
|
|
|
# Snap package is automatically build on the Snapcraft.io platform
|
2024-02-03 11:59:31 +03:00
|
|
|
# https://snapcraft.io/glances
|
|
|
|
# But you can try an offline build with the following command
|
|
|
|
snapcraft:
|
|
|
|
snapcraft
|
|
|
|
|
2022-09-15 12:02:11 +03:00
|
|
|
# ===================================================================
|
|
|
|
# Docker
|
2024-04-30 11:35:45 +03:00
|
|
|
# Need Docker Buildx package (apt install docker-buildx on Ubuntu)
|
2022-09-15 12:02:11 +03:00
|
|
|
# ===================================================================
|
|
|
|
|
2024-08-10 10:23:37 +03:00
|
|
|
define MAKE_DOCKER_BUILD_RULES
|
|
|
|
$($(DISTRO)_images): docker-$(DISTRO)-%: docker-files/$(DISTRO).Dockerfile
|
|
|
|
$(DOCKER_BUILD) --target $$* -f $$< -t glances:local-$(DISTRO)-$$* .
|
2024-08-08 02:37:01 +03:00
|
|
|
endef
|
|
|
|
|
2024-08-10 10:23:37 +03:00
|
|
|
$(foreach DISTRO,$(DISTROS),$(eval $(MAKE_DOCKER_BUILD_RULES)))
|
2024-08-08 02:37:01 +03:00
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
docker: docker-alpine docker-ubuntu ## Generate local docker images
|
2022-10-29 11:55:59 +03:00
|
|
|
|
2024-08-10 10:14:19 +03:00
|
|
|
docker-alpine: $(alpine_images) ## Generate local docker images (Alpine)
|
|
|
|
docker-ubuntu: $(ubuntu_images) ## Generate local docker images (Ubuntu)
|
2024-04-27 11:04:00 +03:00
|
|
|
|
|
|
|
docker-alpine-full: ## Generate local docker image (Alpine full)
|
|
|
|
docker-alpine-minimal: ## Generate local docker image (Alpine minimal)
|
|
|
|
docker-alpine-dev: ## Generate local docker image (Alpine dev)
|
|
|
|
docker-ubuntu-full: ## Generate local docker image (Ubuntu full)
|
|
|
|
docker-ubuntu-minimal: ## Generate local docker image (Ubuntu minimal)
|
|
|
|
docker-ubuntu-dev: ## Generate local docker image (Ubuntu dev)
|
2023-01-05 08:19:42 +03:00
|
|
|
|
2022-08-20 10:39:49 +03:00
|
|
|
# ===================================================================
|
|
|
|
# Run
|
|
|
|
# ===================================================================
|
|
|
|
|
2022-07-09 10:03:39 +03:00
|
|
|
run: ## Start Glances in console mode (also called standalone)
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF)
|
2021-05-23 10:04:41 +03:00
|
|
|
|
2022-07-09 10:03:39 +03:00
|
|
|
run-debug: ## Start Glances in debug console mode (also called standalone)
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -d
|
2021-05-23 10:04:41 +03:00
|
|
|
|
2022-09-11 19:04:04 +03:00
|
|
|
run-local-conf: ## Start Glances in console mode with the system conf file
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances
|
2022-09-11 19:04:04 +03:00
|
|
|
|
2024-04-29 11:01:24 +03:00
|
|
|
run-local-conf-hide-public: ## Start Glances in console mode with the system conf file and hide public information
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances --hide-public-info
|
2024-04-29 11:01:24 +03:00
|
|
|
|
2023-05-17 16:42:39 +03:00
|
|
|
run-min: ## Start minimal Glances in console mode (also called standalone)
|
2024-08-11 18:40:27 +03:00
|
|
|
$(venv_min)/python -m glances -C $(CONF)
|
2023-05-17 16:42:39 +03:00
|
|
|
|
|
|
|
run-min-debug: ## Start minimal Glances in debug console mode (also called standalone)
|
2024-08-11 18:40:27 +03:00
|
|
|
$(venv_min)/python -m glances -C $(CONF) -d
|
2023-05-17 16:42:39 +03:00
|
|
|
|
|
|
|
run-min-local-conf: ## Start minimal Glances in console mode with the system conf file
|
2024-08-11 18:40:27 +03:00
|
|
|
$(venv_min)/python -m glances
|
2023-05-17 16:42:39 +03:00
|
|
|
|
2024-08-08 02:40:06 +03:00
|
|
|
$(DOCKER_RUNTIMES): run-docker-%:
|
2024-08-10 10:23:37 +03:00
|
|
|
$(DOCKER_RUN) $(DOCKER_OPTS) $(DOCKER_SOCKS) -it glances:local-$*
|
2022-09-15 12:02:11 +03:00
|
|
|
|
2024-08-08 02:40:06 +03:00
|
|
|
run-docker-alpine-minimal: ## Start Glances Alpine Docker minimal in console mode
|
2022-09-15 12:02:11 +03:00
|
|
|
run-docker-alpine-full: ## Start Glances Alpine Docker full in console mode
|
|
|
|
run-docker-alpine-dev: ## Start Glances Alpine Docker dev in console mode
|
2023-01-14 11:15:36 +03:00
|
|
|
run-docker-ubuntu-minimal: ## Start Glances Ubuntu Docker minimal in console mode
|
|
|
|
run-docker-ubuntu-full: ## Start Glances Ubuntu Docker full in console mode
|
|
|
|
run-docker-ubuntu-dev: ## Start Glances Ubuntu Docker dev in console mode
|
|
|
|
|
2022-07-09 10:03:39 +03:00
|
|
|
run-webserver: ## Start Glances in Web server mode
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -w
|
2021-05-23 10:04:41 +03:00
|
|
|
|
2024-04-27 18:38:56 +03:00
|
|
|
run-webserver-local-conf: ## Start Glances in Web server mode with the system conf file
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -w
|
2024-04-27 18:38:56 +03:00
|
|
|
|
2024-04-29 11:01:24 +03:00
|
|
|
run-webserver-local-conf-hide-public: ## Start Glances in Web server mode with the system conf file and hide public info
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -w --hide-public-info
|
2024-04-29 11:01:24 +03:00
|
|
|
|
2022-07-09 10:03:39 +03:00
|
|
|
run-restapiserver: ## Start Glances in REST API server mode
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -w --disable-webui
|
2021-07-16 16:39:24 +03:00
|
|
|
|
2022-07-09 10:03:39 +03:00
|
|
|
run-server: ## Start Glances in server mode (RPC)
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -s
|
2021-05-23 10:04:41 +03:00
|
|
|
|
2022-07-09 10:03:39 +03:00
|
|
|
run-client: ## Start Glances in client mode (RPC)
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -c localhost
|
2021-05-23 10:04:41 +03:00
|
|
|
|
2022-07-09 10:03:39 +03:00
|
|
|
run-browser: ## Start Glances in browser mode (RPC)
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --browser
|
2021-06-13 11:49:01 +03:00
|
|
|
|
2023-04-29 11:01:44 +03:00
|
|
|
run-issue: ## Start Glances in issue mode
|
2024-08-06 00:24:26 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) --issue
|
2023-04-29 11:01:44 +03:00
|
|
|
|
2024-07-07 19:47:46 +03: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 10:03:39 +03:00
|
|
|
show-version: ## Show Glances version number
|
2024-08-06 00:25:48 +03:00
|
|
|
$(PYTHON) -m glances -C $(CONF) -V
|