diff --git a/.cgcignore b/.cgcignore new file mode 100644 index 0000000000..ed1ccfa28d --- /dev/null +++ b/.cgcignore @@ -0,0 +1,9 @@ +/.git/ +/.venv/ +/.venv-uv/ +/docker-compose/ +/docker-files/ +/docs/ +/snap/ +/tests/ +/tests-data/ diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000000..52ed847ad3 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,29 @@ +[report] + +include = + *glances* + +omit = + glances/outputs/* + glances/exports/* + glances/compat.py + glances/autodiscover.py + glances/client_browser.py + glances/config.py + glances/history.py + glances/monitored_list.py + glances/outdated.py + glances/password*.py + glances/snmp.py + glances/static_list.py + +exclude_lines = + pragma: no cover + if PY3: + if __name__ == .__main__.: + if sys.platform.startswith + except ImportError: + raise NotImplementedError + if WINDOWS + if MACOS + if BSD diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..48f3b1a96d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,22 @@ +# Ignore everything +* + +# Include only code files +!/glances/**/*.py + +# Include WebUI files (remove when webui moved to seperate package) +!/glances/outputs/static + +# Include Requirements files +!/all-requirements.txt +!/docker-requirements.txt + +# Include Config file +!/docker-compose/glances.conf +!/docker-files/docker-logger.json + +# Include Binary file +!/docker-bin.sh + +# Include TOML file +!/pyproject.toml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..9d598c0038 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +glances/outputs/static/public/* -diff linguist-vendored diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..e2f09314e5 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: nicolargo diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000..cff2ec1d27 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,27 @@ +Before filling this issue, please read the manual (https://glances.readthedocs.io/en/latest/) and search if the bug do not already exists in the database (https://github.com/nicolargo/glances/issues). + +For any questions concerning installation or use, please open a discussion (https://github.com/nicolargo/glances/discussions), not an issue. + +#### Description + +For a bug: Describe the bug and list the steps you used when the issue occurred. + +For an enhancement or new feature: Describe your needs. + +#### Versions + +* Glances & psutil versions: `To be completed with result of: glances -V` +* Operating System: `To be completed with result of: lsb_release -a` +* How do you install Glances (Pypi package, script, package manager, source): `To be completed` +* Glances test (only available with Glances 3.1.7 or higher): + + ``` + To be completed with result of: glances --issue + ``` + +#### Configuration and log file + +You can also [pastebin](https://pastebin.com/): + +* the Glances configuration file (https://glances.readthedocs.io/en/latest/config.html#location) +* the Glances log file (https://glances.readthedocs.io/en/latest/config.html#logging) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..95522c53f1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,40 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- +**Check the bug** +Before filling this bug report, please search if a similar issue already exists. +In this case, just add a comment on this existing issue. + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Start Glances with the following options '...' +2. Press the key '....' +3. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environement (please complete the following information)** + - Operating System (lsb_release -a or OS name/version): `To be completed with result of: lsb_release -a` + - Glances & psutil versions: `To be completed with result of: glances -V` + - How do you install Glances (Pypi package, script, package manager, source): `To be completed` + - Glances test: ` To be completed with result of: glances --issue` + +**Additional context** +Add any other context about the problem here. + +You can also [pastebin](https://pastebin.com/): + +* the Glances configuration file (https://glances.readthedocs.io/en/latest/config.html#location) +* the Glances log file (https://glances.readthedocs.io/en/latest/config.html#logging) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000..bbcbbe7d61 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..dd530bb23a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +#### Description + +Please describe the goal of this pull request. + +For any questions concerning installation or use, please open a discussion (https://github.com/nicolargo/glances/discussions), not an issue. + +#### Resume + +* Bug fix: yes/no +* New feature: yes/no +* Fixed tickets: comma-separated list of tickets fixed by the PR, if any diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..db1c207dd3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,82 @@ +# This pipeline aims at building Glances Pypi packages + +name: build + +on: + workflow_call: + +jobs: + + build: + name: Build distribution 📦 + if: github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.14" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ + + pypi: + name: Publish Python 🐍 distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/glances + permissions: + attestations: write + id-token: write + steps: + - name: Download all the dists + uses: actions/download-artifact@v5 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true + attestations: false + print-hash: true + + pypi_test: + name: Publish Python 🐍 distribution 📦 to TestPyPI + if: github.ref == 'refs/heads/develop' + needs: + - build + runs-on: ubuntu-latest + environment: + name: testpypi + url: https://pypi.org/p/glances + permissions: + attestations: write + id-token: write + steps: + - name: Download all the dists + uses: actions/download-artifact@v5 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + skip-existing: true + attestations: false diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml new file mode 100644 index 0000000000..cb2ae45013 --- /dev/null +++ b/.github/workflows/build_docker.yml @@ -0,0 +1,106 @@ +# This pipeline aims at building Glances Docker images + +name: build_docker + +env: + DEFAULT_DOCKER_IMAGE: nicolargo/glances + PUSH_BRANCH: ${{ 'refs/heads/develop' == github.ref || startsWith(github.ref, 'refs/tags/v') }} + # Alpine image platform: https://hub.docker.com/_/alpine + # linux/arm/v6,linux/arm/v7 do not work (timeout during the build) + DOCKER_PLATFORMS: linux/amd64,linux/arm64/v8 + # Ubuntu image platforms list: https://hub.docker.com/_/ubuntu + # linux/arm/v7 do not work (Cargo/Rust not available) + DOCKER_PLATFORMS_UBUNTU: linux/amd64,linux/arm64/v8 + +on: + workflow_call: + secrets: + DOCKER_USERNAME: + description: 'Docker Hub username' + required: true + DOCKER_TOKEN: + description: 'Docker Hub token' + required: true + +jobs: + + create_docker_images_list: + runs-on: ubuntu-latest + outputs: + tags: ${{ steps.config.outputs.tags }} + steps: + - name: Determine image tags + id: config + shell: bash + run: | + if [[ $GITHUB_REF == refs/tags/* ]]; then + VERSION=${GITHUB_REF#refs/tags/v} + TAG_ARRAY="[{ \"target\": \"minimal\", \"tag\": \"${VERSION}\" }," + TAG_ARRAY="$TAG_ARRAY { \"target\": \"minimal\", \"tag\": \"latest\" }," + TAG_ARRAY="$TAG_ARRAY { \"target\": \"full\", \"tag\": \"${VERSION}-full\" }," + TAG_ARRAY="$TAG_ARRAY { \"target\": \"full\", \"tag\": \"latest-full\" }]" + elif [[ $GITHUB_REF == refs/heads/develop ]]; then + TAG_ARRAY="[{ \"target\": \"dev\", \"tag\": \"dev\" }]" + else + TAG_ARRAY="[]" + fi + + echo "Tags to build: $TAG_ARRAY" + echo "tags=$TAG_ARRAY" >> $GITHUB_OUTPUT + + build_docker_images: + runs-on: ubuntu-latest + needs: + - create_docker_images_list + if: needs.create_docker_images_list.outputs.tags != '[]' + strategy: + fail-fast: false + matrix: + os: ['alpine', 'ubuntu'] + tag: ${{ fromJson(needs.create_docker_images_list.outputs.tags) }} + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Retrieve Repository Docker metadata + id: docker_meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DEFAULT_DOCKER_IMAGE }} + labels: | + org.opencontainers.image.url=https://nicolargo.github.io/glances/ + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: all + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + version: latest + + - name: Login to DockerHub + uses: docker/login-action@v3 + if: ${{ env.PUSH_BRANCH == 'true' }} + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + push: ${{ env.PUSH_BRANCH == 'true' }} + tags: "${{ env.DEFAULT_DOCKER_IMAGE }}:${{ matrix.os != 'alpine' && format('{0}-', matrix.os) || '' }}${{ matrix.tag.tag }}" + build-args: | + CHANGING_ARG=${{ github.sha }} + context: . + file: "docker-files/${{ matrix.os }}.Dockerfile" + platforms: ${{ matrix.os != 'ubuntu' && env.DOCKER_PLATFORMS || env.DOCKER_PLATFORMS_UBUNTU }} + target: ${{ matrix.tag.target }} + labels: ${{ steps.docker_meta.outputs.labels }} + # GHA default behaviour overwrites last build cache. Causes alpine and ubuntu cache to overwrite each other. + # Use `scope` with the os name to prevent that + cache-from: 'type=gha,scope=${{ matrix.os }}' + cache-to: 'type=gha,mode=max,scope=${{ matrix.os }}' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..81d7956f17 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: ci + +on: + pull_request: + branches: [ develop ] + push: + branches: [ master, develop ] + tags: + - v* + +jobs: + quality: + uses: ./.github/workflows/quality.yml + test: + uses: ./.github/workflows/test.yml + needs: [quality] + build: + if: github.event_name != 'pull_request' + uses: ./.github/workflows/build.yml + needs: [quality, test] + build_docker: + if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) + uses: ./.github/workflows/build_docker.yml + secrets: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} + needs: [quality, test] + cyber: + if: github.ref == 'refs/heads/develop' + uses: ./.github/workflows/cyber.yml + needs: [quality, test] + webui: + if: github.ref == 'refs/heads/develop' + uses: ./.github/workflows/webui.yml + needs: [quality, test] diff --git a/.github/workflows/cyber.yml b/.github/workflows/cyber.yml new file mode 100644 index 0000000000..111b2c05ab --- /dev/null +++ b/.github/workflows/cyber.yml @@ -0,0 +1,29 @@ +name: cyber + +on: + workflow_call: + +jobs: + trivy: + name: Trivy scan + continue-on-error: true + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Run Trivy vulnerability scanner in repo mode + uses: aquasecurity/trivy-action@master + with: + scan-type: 'fs' + ignore-unfixed: true + format: 'sarif' + output: 'trivy-results.sarif' + severity: 'CRITICAL' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v4 + with: + sarif_file: 'trivy-results.sarif' diff --git a/.github/workflows/inactive_issues.yml b/.github/workflows/inactive_issues.yml new file mode 100644 index 0000000000..dad9176513 --- /dev/null +++ b/.github/workflows/inactive_issues.yml @@ -0,0 +1,22 @@ +name: Label inactive issues +on: + schedule: + - cron: "30 1 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v10 + with: + days-before-issue-stale: 90 + days-before-issue-close: -1 + stale-issue-label: "inactive" + stale-issue-message: "This issue is stale because it has been open for 3 months with no activity." + close-issue-message: "This issue was closed because it has been inactive for 30 days since being marked as stale." + days-before-pr-stale: -1 + days-before-pr-close: -1 + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/needs_contributor.yml b/.github/workflows/needs_contributor.yml new file mode 100644 index 0000000000..b9a5bb8bca --- /dev/null +++ b/.github/workflows/needs_contributor.yml @@ -0,0 +1,22 @@ +name: Add a message when needs contributor tag is used +on: + issues: + types: + - labeled +jobs: + add-comment: + if: github.event.label.name == 'needs contributor' + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Add comment + run: gh issue comment "$NUMBER" --body "$BODY" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + BODY: > + This issue is available for anyone to work on. + **Make sure to reference this issue in your pull request.** + :sparkles: Thank you for your contribution ! :sparkles: \ No newline at end of file diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000000..6c810960a1 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,54 @@ +name: quality + +on: + workflow_call: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript', 'python' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..bb325680a0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,155 @@ +# Run unitary test + +name: test + +on: + workflow_call: + +jobs: + + source-code-checks: + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v5 + + # - name: Check formatting with Ruff + # uses: chartboost/ruff-action@v1 + # with: + # args: 'format --check' + + - name: Check linting with Ruff + uses: chartboost/ruff-action@v1 + with: + args: 'check' + + # - name: Static type check + # run: | + # echo "Skipping static type check for the moment, too much error..."; + # # pip install pyright + # # pyright glances + + + test-linux: + + needs: source-code-checks + # https://github.com/actions/runner-images?tab=readme-ov-file#available-images + runs-on: ubuntu-24.04 + strategy: + matrix: + # Python EOL version are note tested + # Multiple Python version only tested for Linux + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + + steps: + + - uses: actions/checkout@v5 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Install dependencies + run: | + if [ -f dev-requirements.txt ]; then python -m pip install -r dev-requirements.txt; fi + if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi + + - name: Unitary tests + run: | + python -m pytest ./tests/test_core.py + + test-windows: + + needs: source-code-checks + # https://github.com/actions/runner-images?tab=readme-ov-file#available-images + runs-on: windows-2025 + strategy: + matrix: + # Windows-curses not available for Python 3.14 for the moment + # See https://github.com/zephyrproject-rtos/windows-curses/issues/76 + python-version: ["3.13"] + steps: + + - uses: actions/checkout@v5 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Install dependencies + run: | + if (Test-Path -PathType Leaf "dev-requirements.txt") { python -m pip install -r dev-requirements.txt } + if (Test-Path -PathType Leaf "requirements.txt") { python -m pip install -r requirements.txt } + pip install . + + - name: Unitary tests + run: | + python -m pytest ./tests/test_core.py + + test-macos: + + needs: source-code-checks + # https://github.com/actions/runner-images?tab=readme-ov-file#available-images + runs-on: macos-15 + strategy: + matrix: + # Only test the latest stable version + python-version: ["3.14"] + + steps: + + - uses: actions/checkout@v5 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Install dependencies + run: | + if [ -f dev-requirements.txt ]; then python -m pip install -r dev-requirements.txt; fi + if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi + + - name: Unitary tests + run: | + python -m pytest ./tests/test_core.py + + # test-freebsd: + + # needs: source-code-checks + # runs-on: ubuntu-latest + # strategy: + # matrix: + # # Only test the latest stable version + # python-version: ["3.14"] + # steps: + + # - uses: actions/checkout@v5 + + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v6 + # with: + # python-version: ${{ matrix.python-version }} + # cache: 'pip' + + # - name: Install dependencies + # uses: vmactions/freebsd-vm@v1 + # with: + # usesh: true + # run: | + # pkg install -y python3 gcc devel/py-pip + # python3 --version + # if [ -f dev-requirements.txt ]; then python3 -m pip install -r dev-requirements.txt; fi + # if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi + + # - name: Unitary tests + # uses: vmactions/freebsd-vm@v1 + # with: + # usesh: true + # run: | + # python3 -m pytest ./tests/test_core.py diff --git a/.github/workflows/webui.yml b/.github/workflows/webui.yml new file mode 100644 index 0000000000..b3e5d3a4cc --- /dev/null +++ b/.github/workflows/webui.yml @@ -0,0 +1,40 @@ +name: webui + +on: + workflow_call: + +jobs: + build: + continue-on-error: true + + runs-on: ubuntu-latest + + strategy: + matrix: + # Use LTS version only + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + node-version: [24.x] + + steps: + - uses: actions/checkout@v5 + - name: Glances will be build with Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v5 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + cache-dependency-path: ./glances/outputs/static/package-lock.json + - name: Build Glances WebUI + working-directory: ./glances/outputs/static + run: | + npm ci + npm run build + - name: Commit and push WebUI + env: + CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts + CI_COMMIT_AUTHOR: Continuous Integration + run: | + git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" + git config --global user.email "glances@nicolargo.com" + git add glances/outputs/static + /bin/bash -c "git commit -m '${{ env.CI_COMMIT_MESSAGE }}' || true" + git push diff --git a/.gitignore b/.gitignore index befc898b25..4e2ebde1d8 100644 Binary files a/.gitignore and b/.gitignore differ diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000000..2da69bc9de --- /dev/null +++ b/.mailmap @@ -0,0 +1,13 @@ +Nicolas Hennion Nicolargo +Nicolas Hennion Nicolas Hennion +Nicolas Hennion nicolargo +Nicolas Hennion nicolargo +Nicolas Hennion nicolargo +Nicolas Hennion nicolargo +Nicolas Hennion Nicolargo +Nicolas Hennion nicolargo +Alessio Sergi asergi +Nicolas Hart nclsHart +Nicolas Hart Nicolas Hart +Floran Brutel Floran Brutel +Brandon Philips Brandon Philips diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..04a3bc6c19 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,105 @@ +repos: + - repo: https://github.com/gitleaks/gitleaks + rev: v8.24.2 + hooks: + - id: gitleaks + name: "🔒 security · Detect hardcoded secrets" + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.15.4 + hooks: + - id: ruff-format + name: "🐍 python · Formatter with Ruff" + types_or: [ python, pyi ] + args: [ --target-version, py310, --config, './pyproject.toml' ] + - id: ruff-check + name: "🐍 python · Linter with Ruff" + types_or: [ python, pyi ] + args: [ --fix, --target-version, py310, --config, './pyproject.toml' ] + + # - repo: https://github.com/RobertCraigie/pyright-python + # rev: v1.1.391 + # hooks: + # - id: pyright + # name: "🐍 python · Check types" + + # - repo: https://github.com/biomejs/pre-commit + # rev: "v2.3.7" + # hooks: + # - id: biome-check + # name: "🟨 javascript · Lint, format, and safe fixes with Biome" + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.35.0 + hooks: + - id: check-github-workflows + name: "🐙 github-actions · Validate gh workflow files" + args: ["--verbose"] + + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.11.0.1 + hooks: + - id: shellcheck + name: "🐚 shell · Lint shell scripts" + + - repo: https://github.com/openstack/bashate + rev: 2.1.1 + hooks: + - id: bashate + name: "🐚 shell · Check shell script code style" + entry: bashate --error E* --ignore=E006 + + # - repo: https://github.com/mrtazz/checkmake.git + # rev: 0.2.2 + # hooks: + # - id: checkmake + # name: "🐮 Makefile · Lint Makefile" + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-executables-have-shebangs + name: "📁 filesystem/⚙️ exec · Verify shebang presence" + - id: check-shebang-scripts-are-executable + name: "📁 filesystem/⚙️ exec · Verify script permissions" + - id: check-case-conflict + name: "📁 filesystem/📝 names · Check case sensitivity" + - id: destroyed-symlinks + name: "📁 filesystem/🔗 symlink · Detect broken symlinks" + - id: check-merge-conflict + name: "🌳 git · Detect conflict markers" + - id: forbid-new-submodules + name: "🌳 git · Prevent submodule creation" + # - id: no-commit-to-branch + # name: "🌳 git · Protect main branches" + # args: ["--branch", "main", "--branch", "master"] + - id: check-added-large-files + name: "🌳 git · Block large file commits" + args: ['--maxkb=5000'] + - id: check-ast + name: "🐍 python/🔍 quality · Validate Python AST" + - id: check-docstring-first + name: "🐍 python/📝 style · Enforce docstring at top" + - id: check-json + name: "📄 formats/json · Validate JSON files" + - id: check-toml + name: "📄 formats/toml · Validate TOML files" + - id: check-yaml + name: "📄 formats/yaml · Validate YAML syntax" + - id: debug-statements + name: "🐍 python/🪲 debug · Detect debug statements" + - id: detect-private-key + name: "🔐 security · Detect private keys" + - id: mixed-line-ending + name: "📄 text/↩️ newline · Normalize line endings" + - id: requirements-txt-fixer + name: "🐍 python/📦 deps · Sort requirements.txt" + + - repo: local + hooks: + - id: find-duplicate-lines + name: "❗️local script · Find duplicate lines at the end of file" + entry: bash tests-data/tools/find-duplicate-lines.sh + language: system + types: [python] + pass_filenames: false diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000000..519798a59c --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,34 @@ +# Read the Docs configuration file for Glances projects + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: dev-requirements.txt \ No newline at end of file diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 0000000000..3b22897e28 --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,10 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Glances +Upstream-Contact: Nicolas Hennion +Source: https://github.com/nicolargo/glances + +# Sample paragraph, commented out: +# +# Files: src/* +# Copyright: $YEAR $NAME <$CONTACT> +# License: ... diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f8cf6ea4fa..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: python -python: - - "2.6" - - "2.7" - - "3.3" - - "3.4" -install: - - pip install -r requirements.txt --use-mirrors -script: python setup.py install diff --git a/AUTHORS b/AUTHORS index b87841006f..be1fc117a1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,23 +5,58 @@ Developers Nicolas Hennion (aka) Nicolargo http://blog.nicolargo.com https://twitter.com/nicolargo -contact@nicolargo.com +https://github.com/nicolargo +nicolashennion@gmail.com +PGP Fingerprint: A0D9 628F 5A83 A879 48EA B1FE BA43 C11F 2C8B 4347 +PGP Public key: gpg --keyserver pgp.mit.edu --recv-keys 0xba43c11f2c8b4347 -Alessio Sergi (aka) al3hex +RazCrimson (maintainer of the Glances project) +https://github.com/RazCrimson + +Ariel Otibili (aka) ariel-anieli (for the huge work on code quality) +https://github.com/ariel-anieli + +Alessio Sergi (aka) Al3hex (thanks you for the great job on this project) https://twitter.com/al3hex +https://github.com/asergi + +Floran Brutel (aka) notFloran (maintainer of the Web User Interface) +https://github.com/notFloran + +fr4nc0is (maintainer of the Web User Interface) +https://github.com/fr4nc0is Brandon Philips (aka) Philips http://ifup.org/ +https://github.com/philips Jon Renner (aka) Jrenner https://github.com/jrenner +Maxime Desbrus (aka) Desbma +https://github.com/desbma + +Nicolas Hart (aka) NclsHart (for the Web user interface) +https://github.com/nclsHart + +Sylvain Mouquet (aka) SylvainMouquet (for the Web user interface) +http://github.com/sylvainmouquet + +Erik Eriksson (aka) Molobrakos (for the MQTT plugin and various PR) +https://www.linkedin.com/in/error-errorsson/ + ========= Packagers ========= -Geoffroy Youri Berret for the Debian package -http://packages.debian.org/fr/sid/glances +林博仁(Buo-ren Lin) Lin-Buo-Ren for the Snap package +https://lin-buo-ren.github.io/ +https://snapcraft.io/glances/releases + +Daniel Echeverry and Sebastien Badia for the Debian package +https://tracker.debian.org/pkg/glances + +Philip Lacroix and Nicolas Kovacs for the Slackware (SlackBuild) package gasol.wu@gmail.com for the FreeBSD port @@ -29,3 +64,10 @@ Frederic Aoustin (https://github.com/fraoustin) and Nicolas Bourges (installer) Aljaž Srebrnič for the MacPorts package http://www.macports.org/ports.php?by=name&substr=glances + +John Kirkham for the conda package (at conda-forge) +https://github.com/conda-forge/glances-feedstock + +Rui Chen for the Homebrew package +https://chenrui.dev/ +https://formulae.brew.sh/formula/glances diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md new file mode 100644 index 0000000000..5c6c55ba55 --- /dev/null +++ b/CODE-OF-CONDUCT.md @@ -0,0 +1,73 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +education, socioeconomic status, nationality, personal appearance, race, +religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at nicolashennion@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..ddab0ac582 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,162 @@ +# Contributing to Glances + +Looking to contribute something to Glances ? **Here's how you can help.** + +Please take a moment to review this document in order to make the contribution +process easy and effective for everyone involved. + +Following these guidelines helps to communicate that you respect the time of +the developers managing and developing this open source project. In return, +they should reciprocate that respect in addressing your issue or assessing +patches and features. + +## Using the issue tracker + +The [issue tracker](https://github.com/nicolargo/glances/issues) is +the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) +and [submitting pull requests](#pull-requests), but please respect the following +restrictions: + +* Please **do not** use the issue tracker for personal support requests. An + official Q&A exist. [Use it](https://groups.google.com/forum/?hl=en#!forum/glances-users)! + +* Please **do not** derail or troll issues. Keep the discussion on topic and + respect the opinions of others. + +## Bug reports + +A bug is a _demonstrable problem_ that is caused by the code in the repository. +Good bug reports are extremely helpful, so thanks! + +Guidelines for bug reports: + +0. **Use the GitHub issue search** — check if the issue has already been + reported. + +1. **Check if the issue has been fixed** — try to reproduce it using the + latest `master` or `develop` branch in the repository. + +2. **Isolate the problem** — ideally create a simple test bed. + +3. **Give us your test environment** — Operating system name and version + Glances version... + +Example: + +> Short and descriptive example bug report title. +> +> Glances and psutil version used (glances -V). +> +> Operating system description (name and version). +> +> A summary of the issue and the OS environment in which it occurs. If +> suitable, include the steps required to reproduce the bug. +> +> 1. This is the first step +> 2. This is the second step +> 3. Further steps, etc. +> +> Screenshot (if useful) +> +> Any other information you want to share that is relevant to the issue being +> reported. This might include the lines of code that you have identified as +> causing the bug, and potential solutions (and your opinions on their +> merits). +> +> You can also run Glances in debug mode (-d) and paste/bin the glances.conf file (). +> +> Glances 3.2.0 or higher have also a --issue option to run a simple test. Please use it and copy/paste the output. + +## Feature requests + +Feature requests are welcome. But take a moment to find out whether your idea +fits with the scope and aims of the project. It's up to _you* to make a strong +case to convince the project's developers of the merits of this feature. Please +provide as much detail and context as possible. + +## Pull requests + +Good pull requests—patches, improvements, new features—are a fantastic +help. They should remain focused in scope and avoid containing unrelated +commits. + +**Please ask first** before embarking on any significant pull request (e.g. +implementing features, refactoring code, porting to a different language), +otherwise you risk spending a lot of time working on something that the +project's developers might not want to merge into the project. + +First of all, all pull request should be done on the `develop` branch. + +Glances uses PEP8 compatible code, so use a PEP validator before submitting +your pull request. Also uses the unitaries tests scripts (unitest-all.py). + +Similarly, when contributing to Glances's documentation, you should edit the +documentation source files in +[the `/doc/` and `/man/` directories of the `develop` branch](https://github.com/nicolargo/glances/tree/develop/docs) and generate +the documentation outputs files by reading the [README](https://github.com/nicolargo/glances/tree/develop/docs/README.txt) file. + +Adhering to the following process is the best way to get your work +included in the project: + +1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork, + and configure the remotes: + + ```bash + # Clone your fork of the repo into the current directory + git clone https://github.com//glances.git + # Navigate to the newly cloned directory + cd glances + # Assign the original repo to a remote called "upstream" + git remote add upstream https://github.com/nicolargo/glances.git + ``` + +2. Get the latest changes from upstream: + + ```bash + git checkout develop + git pull upstream develop + ``` + +3. Create a new topic branch (off the main project development branch) to + contain your feature, change, or fix (best way is to call it issue#xxx): + + ```bash + git checkout -b + ``` + +4. It's coding time ! + Please respect the following coding convention: [Elements of Python Style](https://github.com/amontalenti/elements-of-python-style) + +5. Test you code using the Makefile: + + * make format ==> Format your code thanks to the Ruff linter + * make run ==> Run Glances + * make run-webserver ==> Run a Glances Web Server + * make test ==> Run unit tests + * make docs ==> Update docs + * make webui ==> Compile a new Web UI + +6. Commit your changes in logical chunks. Please adhere to these [git commit + message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) + or your code is unlikely be merged into the main project. Use Git's + [interactive rebase](https://help.github.com/articles/interactive-rebase) + feature to tidy up your commits before making them public. + +7. Locally merge (or rebase) the upstream development branch into your topic branch: + + ```bash + git pull [--rebase] upstream develop + ``` + +8. Push your topic branch up to your fork: + + ```bash + git push origin + ``` + +9. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) + with a clear title and description against the `develop` branch. + +**IMPORTANT**: By submitting a patch, you agree to allow the project owners to +license your work under the terms of the [LGPLv3](COPYING) (if it +includes code changes). diff --git a/COPYING b/COPYING index 341c30bda4..513d1c01fe 100644 --- a/COPYING +++ b/COPYING @@ -1,166 +1,304 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 +GNU LESSER GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. +Copyright (C) 2007 Free Software Foundation, Inc. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. +This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. - 0. Additional Definitions. +0. Additional Definitions. - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. +As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. +"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. +An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. + +A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". + +The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. + +The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. + +1. Exception to Section 3 of the GNU GPL. +You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. + +2. Conveying Modified Versions. +If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: + + a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. + +3. Object Code Incorporating Material from Library Header Files. +The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license document. + +4. Combined Works. +You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: + + a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license document. + + c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. + + e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) + +5. Combined Libraries. +You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +6. Revised Versions of the GNU Lesser General Public License. +The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. + +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS + +0. Definitions. + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on the Program. + +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. + +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. + + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Use with the GNU Affero General Public License. +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. + +14. Revised Versions of this License. +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/LICENSES/LGPL-3.0-only.txt b/LICENSES/LGPL-3.0-only.txt new file mode 100644 index 0000000000..513d1c01fe --- /dev/null +++ b/LICENSES/LGPL-3.0-only.txt @@ -0,0 +1,304 @@ +GNU LESSER GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. + +0. Additional Definitions. + +As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. + +"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. + +An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. + +A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". + +The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. + +The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. + +1. Exception to Section 3 of the GNU GPL. +You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. + +2. Conveying Modified Versions. +If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: + + a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. + +3. Object Code Incorporating Material from Library Header Files. +The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license document. + +4. Combined Works. +You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: + + a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license document. + + c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. + + e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) + +5. Combined Libraries. +You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +6. Revised Versions of the GNU Lesser General Public License. +The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. + +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS + +0. Definitions. + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on the Program. + +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. + +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. + + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Use with the GNU Affero General Public License. +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. + +14. Revised Versions of this License. +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/MANIFEST.in b/MANIFEST.in index efc3d2624a..dc80124108 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,13 +1,14 @@ include AUTHORS +include CONTRIBUTING.md include COPYING -include NEWS +include NEWS.rst include README.rst +include README-pypi.rst +include SECURITY.md include conf/glances.conf -include glances/outputs/bottle/*.tpl -include glances/outputs/static/css/*.css -include glances/outputs/static/js/*.js -include man/glances.1 -recursive-include docs images/*.png glances-doc.html +include conf/fetch-templates/*.jinja +include requirements.txt +include all-requirements.txt +recursive-include docs * recursive-include glances *.py -recursive-include i18n *.mo -prune docs/_build +recursive-include glances/outputs/static * diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..2917dfc8a3 --- /dev/null +++ b/Makefile @@ -0,0 +1,399 @@ +PORT ?= 8008 +CONF := conf/glances.conf +LASTTAG = $(shell git describe --tags --abbrev=0) + +IMAGES_TYPES := full minimal +DISTROS := alpine ubuntu +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 +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 +UV_RUN := .venv-uv/bin/uv + +# if the command is only `make`, the default tasks will be the printing of the help. +.DEFAULT_GOAL := help + +.PHONY: help test docs docs-server venv requirements profiling docker all clean all test + +help: ## List all make commands available + @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}' + +# =================================================================== +# Virtualenv +# =================================================================== + +# install-uv: ## Instructions to install the UV tool +# @echo "Install the UV tool (https://astral.sh/uv/)" +# @echo "Please install the UV tool manually" +# @echo "For example with: curl -LsSf https://astral.sh/uv/install.sh | sh" +# @echo "Or via a package manager of your distribution" +# @echo "For example for Snap: snap install astral-uv" + +install-uv: ## Install UV tool in a specific virtualenv + python3 -m venv .venv-uv + .venv-uv/bin/pip install uv + +upgrade-uv: ## Upgrade the UV tool + .venv-uv/bin/pip install --upgrade pip + .venv-uv/bin/pip install --upgrade uv + +venv: ## Create the virtualenv with all dependencies + $(UV_RUN) sync --all-extras --no-group dev + +venv-upgrade venv-switch-to-full: ## Upgrade the virtualenv with all dependencies + $(UV_RUN) sync --upgrade --all-extras + +venv-min: ## Create the virtualenv with minimal dependencies + $(UV_RUN) sync + +venv-upgrade-min venv-switch-to-min: ## Upgrade the virtualenv with minimal dependencies + $(UV_RUN) sync --upgrade + +venv-clean: ## Remove the virtualenv + rm -rf .venv + +venv-dev: ## Create the virtualenv with dev dependencies + $(UV_RUN) sync --dev --all-extras + $(UV_RUN) run pre-commit install --hook-type pre-commit + +# =================================================================== +# Requirements +# +# Note: the --no-hashes option should be used because pip (in CI) has +# issues with hashes. +# =================================================================== + +requirements-min: ## Generate the requirements.txt files (minimal dependencies) + $(UV_RUN) export --no-emit-workspace --no-hashes --no-group dev --output-file requirements.txt + +requirements-all: ## Generate the all-requirements.txt files (all dependencies) + $(UV_RUN) export --no-emit-workspace --no-hashes --all-extras --no-group dev --output-file all-requirements.txt + +requirements-docker: ## Generate the docker-requirements.txt files (Docker specific dependencies) + $(UV_RUN) export --no-emit-workspace --no-hashes --no-group dev --extra containers --extra web --extra mcp --output-file docker-requirements.txt + +requirements-dev: ## Generate the dev-requirements.txt files (dev dependencies) + $(UV_RUN) export --no-hashes --only-dev --output-file dev-requirements.txt + +requirements: requirements-min requirements-all requirements-dev requirements-docker ## Generate all the requirements files + +requirements-upgrade: venv-upgrade requirements ## Upgrade the virtualenv and regenerate all the requirements files + +# =================================================================== +# Tests +# =================================================================== + +test: ## Run All unit tests + $(UV_RUN) run pytest + +test-core: ## Run Core unit tests + $(UV_RUN) run pytest tests/test_core.py + +test-plugins: ## Run Plugins unit tests + $(UV_RUN) run pytest tests/test_plugin_*.py + +test-api: ## Run API unit tests + $(UV_RUN) run pytest tests/test_api.py + +test-memoryleak: ## Run Memory-leak unit tests + $(UV_RUN) run pytest tests/test_memoryleak.py + +test-perf: ## Run Perf unit tests + $(UV_RUN) run pytest tests/test_perf.py + +test-restful: ## Run Restful API unit tests + $(UV_RUN) run pytest tests/test_restful.py + +test-webui: ## Run WebUI unit tests + $(UV_RUN) run pytest tests/test_webui.py + +test-xmlrpc: ## Run XMLRPC API unit tests + $(UV_RUN) run pytest tests/test_xmlrpc.py + +test-with-upgrade: venv-upgrade test ## Upgrade deps and run unit tests + +test-export-csv: ## Run interface tests with CSV + /bin/bash ./tests/test_export_csv.sh + +test-export-json: ## Run interface tests with JSON + /bin/bash ./tests/test_export_json.sh + +test-export-influxdb-v1: ## Run interface tests with InfluxDB version 1 (Legacy) + /bin/bash ./tests/test_export_influxdb_v1.sh + +test-export-influxdb-v3: ## Run interface tests with InfluxDB version 3 (Core) + /bin/bash ./tests/test_export_influxdb_v3.sh + +test-export-timescaledb: ## Run interface tests with TimescaleDB + /bin/bash ./tests/test_export_timescaledb.sh + +test-export-nats: ## Run interface tests with NATS + /bin/bash ./tests/test_export_nats.sh + +test-exports: ## Tests all exports + @for f in ./tests/test_export_*.sh; do /bin/bash "$$f"; done + +# =================================================================== +# Linters, profilers and cyber security +# =================================================================== + +pre-commit: ## Run pre-commit hooks + $(UV_RUN) run pre-commit run --all-files + +find-duplicate-lines: ## Search for duplicate lines in files + /bin/bash tests-data/tools/find-duplicate-lines.sh + +format: ## Format the code + $(UV_RUN) run ruff format . + +lint: ## Lint the code. + $(UV_RUN) run ruff check . --fix + +lint-readme: ## Lint the main README.rst file + $(UV_RUN) run rstcheck README.rst + $(UV_RUN) run rstcheck README-pypi.rst + +codespell: ## Run codespell to fix common misspellings in text files + $(UV_RUN) run codespell -S .git,./docs/_build,./Glances.egg-info,./venv*,./glances/outputs,*.svg -L hart,bu,te,statics -w + +semgrep: ## Run semgrep to find bugs and enforce code standards + $(UV_RUN) run semgrep scan --config=auto + +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 +profiling-gprof: ## Callgraph profiling (need "apt install graphviz") + $(DISPLAY-BANNER) + $(UV_RUN) run python -m cProfile -o $(CPROF) run-venv.py -C $(CONF) --stop-after $(TIMES) + $(UV_RUN) run gprof2dot -f pstats $(CPROF) | dot -Tsvg -o $(OUT_DIR)/glances-cgraph.svg + rm -f $(CPROF) + +profiling-pyinstrument: ## PyInstrument profiling + $(DISPLAY-BANNER) + $(UV_RUN) add pyinstrument + $(UV_RUN) run pyinstrument -r html -o $(OUT_DIR)/glances-pyinstrument.html -m glances -C $(CONF) --stop-after $(TIMES) + +profiling-pyspy: ## Flame profiling + $(DISPLAY-BANNER) + $(UV_RUN) run py-spy record -o $(OUT_DIR)/glances-flame.svg -d 60 -s -- .venv/bin/python -m glances -C $(CONF) --stop-after $(TIMES) + +profiling: profiling-gprof profiling-pyinstrument profiling-pyspy ## Profiling of the Glances software + +trace-malloc: ## Trace the malloc() calls + @echo "Malloc test is running, please wait ~30 secondes..." + $(UV_RUN) run python -m glances -C $(CONF) --trace-malloc --stop-after 15 --quiet + +memory-leak: ## Profile memory leaks + $(UV_RUN) run python -m glances -C $(CONF) --memory-leak + +memory-profiling: TIMES = 2400 +memory-profiling: PROFILE = mprofile_*.dat +memory-profiling: OUT_DIR = docs/_static +memory-profiling: ## Profile memory usage + @echo "It's a very long test (~4 hours)..." + rm -f $(PROFILE) + @echo "1/2 - Start memory profiling with the history option enable" + $(UV_RUN) run mprof run -T 1 -C run-venv.py -C $(CONF) --stop-after $(TIMES) --quiet + $(UV_RUN) run mprof plot --output $(OUT_DIR)/glances-memory-profiling-with-history.png + rm -f $(PROFILE) + @echo "2/2 - Start memory profiling with the history option disable" + $(UV_RUN) run mprof run -T 1 -C run-venv.py -C $(CONF) --disable-history --stop-after $(TIMES) --quiet + $(UV_RUN) run mprof plot --output $(OUT_DIR)/glances-memory-profiling-without-history.png + rm -f $(PROFILE) + +# Trivy installation: https://aquasecurity.github.io/trivy/latest/getting-started/installation/ +trivy: ## Run Trivy to find vulnerabilities + $(UV_RUN) run trivy fs ./glances/ + +bandit: ## Run Bandit to find vulnerabilities + $(UV_RUN) run bandit glances -r + +# =================================================================== +# Docs +# =================================================================== + +docs: ## Create the documentation + $(UV_RUN) run python -m glances -C $(CONF) --api-doc > ./docs/api/python.rst + $(UV_RUN) run python ./generate_openapi.py + $(UV_RUN) run python -m glances -C $(CONF) --api-restful-doc > ./docs/api/restful.rst + cd docs && ./build.sh && cd .. + +docs-server: docs ## Start a Web server to serve the documentation + (sleep 2 && sensible-browser "http://localhost:$(PORT)") & + cd docs/_build/html/ && .venv-uv/bin/uvrun python -m http.server $(PORT) + +docs-jupyter: ## Start Jupyter Notebook + $(UV_RUN) run --with jupyter jupyter lab + +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 + +install: ## Open a Web Browser to the installation procedure + sensible-browser "https://github.com/nicolargo/glances#installation" + +# =================================================================== +# WebUI +# Follow ./glances/outputs/static/README.md for more information +# =================================================================== + +webui webui%: DIR = glances/outputs/static/ + +webui-gen-config: ## Generate the Web UI config file + $(UV_RUN) run python ./generate_webui_conf.py > ./glances/outputs/static/js/uiconfig.json + +webui: webui-gen-config ## Build the Web UI + cd $(DIR) && npm ci && npm run build + +webui-audit: ## Audit the Web UI + cd $(DIR) && npm audit + +webui-audit-fix: webui-gen-config ## Fix audit the Web UI + cd $(DIR) && npm ci && npm audit fix && npm run build + +webui-update: webui-gen-config ## Update JS dependencies + cd $(DIR) && npm update --save && npm ci && npm run build + +# =================================================================== +# Packaging +# =================================================================== + +flatpak: venv-upgrade ## Generate FlatPack JSON file + git clone https://github.com/flatpak/flatpak-builder-tools.git + $(UV_RUN) run python ./flatpak-builder-tools/pip/flatpak-pip-generator glances + rm -rf ./flatpak-builder-tools + @echo "Now follow: https://github.com/flathub/flathub/wiki/App-Submission" + +# Snap package is automatically build on the Snapcraft.io platform +# https://snapcraft.io/glances +# But you can try an offline build with the following command +snapcraft: + snapcraft + +# =================================================================== +# Docker +# Need Docker Buildx package (apt install docker-buildx on Ubuntu) +# =================================================================== + +define MAKE_DOCKER_BUILD_RULES +$($(DISTRO)_images): docker-$(DISTRO)-%: docker-files/$(DISTRO).Dockerfile + $(DOCKER_BUILD) --target $$* -f $$< -t glances:local-$(DISTRO)-$$* . +endef + +$(foreach DISTRO,$(DISTROS),$(eval $(MAKE_DOCKER_BUILD_RULES))) + +docker: docker-alpine docker-ubuntu ## Generate local docker images + +docker-alpine: $(alpine_images) ## Generate local docker images (Alpine) +docker-ubuntu: $(ubuntu_images) ## Generate local docker images (Ubuntu) + +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) + +trivy-docker: ## Run Trivy to find vulnerabilities in Docker images + $(UV_RUN) run trivy image glances:local-alpine-full + $(UV_RUN) run trivy image glances:local-alpine-minimal + $(UV_RUN) run trivy image glances:local-ubuntu-full + $(UV_RUN) run trivy image glances:local-ubuntu-minimal + +# =================================================================== +# Run +# =================================================================== + +run: ## Start Glances in console mode (also called standalone) + $(UV_RUN) run python -m glances -C $(CONF) + +run-debug: ## Start Glances in debug console mode (also called standalone) + $(UV_RUN) run python -m glances -C $(CONF) -d + +run-local-conf: ## Start Glances in console mode with the system conf file + $(UV_RUN) run python -m glances + +run-local-conf-hide-public: ## Start Glances in console mode with the system conf file and hide public information + $(UV_RUN) run python -m glances --hide-public-info + +run-like-htop: ## Start Glances with the same features than Htop + $(UV_RUN) run python -m glances --disable-plugin network,ports,wifi,connections,diskio,fs,irq,folders,raid,smart,sensors,vms,containers,ip,amps --disable-left-sidebar + +run-fetch: ## Start Glances in fetch mode + $(UV_RUN) run python -m glances --fetch + +$(DOCKER_RUNTIMES): run-docker-%: + $(DOCKER_RUN) $(DOCKER_OPTS) $(DOCKER_SOCKS) -it glances:local-$* + +run-docker-alpine-minimal: ## Start Glances Alpine Docker minimal in console mode +run-docker-alpine-full: ## Start Glances Alpine Docker full in console mode +run-docker-alpine-dev: ## Start Glances Alpine Docker dev in console mode +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 + +generate-ssl: ## Generate local and sel signed SSL certificates for dev (need mkcert) + mkcert glances.local localhost 120.0.0.1 0.0.0.0 + +run-webserver: ## Start Glances in Web server mode + $(UV_RUN) run python -m glances -C $(CONF) -w + +run-webserver-mcp: ## Start Glances in Web server mode with MCP + $(UV_RUN) run python -m glances -C $(CONF) -w --enable-mcp + +run-webserver-local-conf: ## Start Glances in Web server mode with the system conf file + $(UV_RUN) run python -m glances -w + +run-webserver-mcp-local-conf: ## Start Glances in Web server mode with MCP and the system conf file + $(UV_RUN) run python -m glances -w --enable-mcp + +run-webserver-local-conf-hide-public: ## Start Glances in Web server mode with the system conf file and hide public info + $(UV_RUN) run python -m glances -w --hide-public-info + +run-webui: run-webserver ## Start Glances in Web server mode + +run-restapiserver: ## Start Glances in REST API server mode + $(UV_RUN) run python -m glances -C $(CONF) -w --disable-webui + +run-server: ## Start Glances in server mode (RPC) + $(UV_RUN) run python -m glances -C $(CONF) -s + +run-client: ## Start Glances in client mode (RPC) + $(UV_RUN) run python -m glances -C $(CONF) -c localhost + +run-browser: ## Start Glances in browser mode (RPC) + $(UV_RUN) run python -m glances -C $(CONF) --browser + +run-web-browser: ## Start Web Central Browser + $(UV_RUN) run python -m glances -C $(CONF) -w --browser + +run-issue: ## Start Glances in issue mode + $(UV_RUN) run python -m glances -C $(CONF) --issue + +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 + +show-version: ## Show Glances version number + $(UV_RUN) run python -m glances -C $(CONF) -V diff --git a/NEWS b/NEWS deleted file mode 100644 index d814d40562..0000000000 --- a/NEWS +++ /dev/null @@ -1,307 +0,0 @@ -============================================================================== -Glances Version 2.x -============================================================================== - -Version 2.0 -=========== - - Glances v2.0 is not a simple upgrade of the version 1.x but a complete code refactoring. - Based on a plugins system, it aims at providing an easy way to add news features. - - Core defines the basics and commons functions. - - all stats are grabbed through plugins (see the glances/plugins source folder). - - also outputs methods (Curse, Web mode, CSV) are managed as plugins. - - The Curse interface is almost the same than the version 1.7. Some improvements have been made: - - space optimisation for the CPU, LOAD and MEM stats (justified alignment) - - CPU: - . CPU stats are displayed as soon as Glances is started - . steal CPU alerts are no more logged - - LOAD: - . 5 min LOAD alerts are no more logged - - File System: - . Display the device name (if space is available) - - Sensors: - . Sensors and HDD temperature are displayed in the same block - - Process list: - . Refactor columns: CPU%, MEM%, VIRT, RES, PID, USER, NICE, STATUS, TIME, IO, Command/name - . The running processes status is highlighted - . The process name is highlighted in the command line - - Glances 2.0 brings a brand new Web Interface. You can run Glances in Web server mode and - consult the stats directly from a standard Web Browser. - - The client mode can now fallback to a simple SNMP mode if Glances server is not found on the remote machine. - - Complete release notes: - * Cut ifName and DiskName if they are too long in the curses interface (by Nicolargo) - * Windows CLI is OK but early experimental (by Nicolargo) - * Add bitrate limits to the networks interfaces (by Nicolargo) - * Batteries % stats are now in the sensors list (by Nicolargo) - * Refactor the client/server password security: using SHA256 (by Nicolargo, - based on Alessio Sergi's example script) - * Refactor the CSV output (by Nicolargo) - * Glances client fallback to SNMP server if Glances one not found (by Nicolargo) - * Process list: Highlight running/basename processes (by Alessio Sergi) - * New Web server mode thk to the Bottle library (by Nicolargo) - * Responsive design for Bottle interface (by Nicolargo) - * Remove HTML output (by Nicolargo) - * Enable/disable for optional plugins through the command line (by Nicolargo) - * Refactor the API (by Nicolargo) - * Load-5 alert are no longer logged (by Nicolargo) - * Rename In/Out by Read/Write for DiskIO according to #339 (by Nicolargo) - * Migrate from pysensors to py3sensors (by Alessio Sergi) - * Migration to PsUtil 2.x (by Nicolargo) - * New plugins system (by Nicolargo) - * Python 2.x and 3.x compatibility (by Alessio Sergi) - * Code quality improvements (by Alessio Sergi) - * Refactor unitaries tests (by Nicolargo) - * Development now follow the git flow workflow (by Nicolargo) - - -============================================================================== -Glances Version 1.x -============================================================================== - -Version 1.7.4 -============= - - * Add threads number in the task summary line (#308) - * Add system uptime (#276) - * Add CPU steal % to cpu extended stats (#309) - * You can hide disk from the IOdisk view using the conf file (#304) - * You can hide network interface from the Network view using the conf file - * Optimisation of CPU consumption (around ~10%) - * Correct issue #314: Client/server mode always asks for password - * Correct issue #315: Defining password in client/server mode doesn't work as intended - * Correct issue #316: Crash in client server mode - * Correct issue #318: Argument parser, try-except blocks never get triggered - -Version 1.7.3 -============= - - * Add --password argument to enter the client/server password from the prompt - * Fix an issue with the configuration file path (#296) - * Fix an issue with the HTML template (#301) - -Version 1.7.2 -============= - - * Console interface is now Microsoft Windows compatible (thk to @fraoustin) - * Update documentation and Wiki regarding the API - * Added package name for python sources/headers in openSUSE/SLES/SLED - * Add FreeBSD packager - * Bugs corrected - -Version 1.7.1 -============= - - * Fix IoWait error on FreeBSD / Mac OS - * HDDTemp module is now Python v3 compatible - * Don't warn a process is not running if countmin=0 - * Add Pypi badge on the README.rst - * Update documentation - * Add document structure for http://readthedocs.org - -Version 1.7 -=========== - - * Add monitored processes list - * Add hard disk temperature monitoring (thanks to the HDDtemp daemon) - * Add batteries capacities information (thanks to the Batinfo lib) - * Add command line argument -r toggles processes (reduce CPU usage) - * Add command line argument -1 to run Glances in per CPU mode - * Platform/architecture is more specific now - * XML-RPC server: Add IPv6 support for the client/server mode - * Add support for local conf file - * Add a uninstall script - * Add getNetTimeSinceLastUpdate() getDiskTimeSinceLastUpdate() and getProcessDiskTimeSinceLastUpdate() in the API - * Add more translation: Italien, Chinese - * and last but not least... up to 100 hundred bugs corrected / software and docs improvments - -Version 1.6.1 -============= - - * Add per-user settings (configuration file) support - * Add -z/--nobold option for better appearence under Solarized terminal - * Key 'u' shows cumulative net traffic - * Work in improving autoUnit - * Take into account the number of core in the CPU process limit - * API improvment add time_since_update for disk, process_disk and network - * Improve help display - * Add more dummy FS to the ignore list - * Code refactory: PsUtil < 0.4.1 is depredicated (Thk to Alessio) - * Correct a bug on the CPU process limit - * Fix crash bug when specifying custom server port - * Add Debian style init script for the Glances server - -Version 1.6 -=========== - - * Configuration file: user can defines limits - * In client/server mode, limits are set by the server side - * Display limits in the help screen - * Add per process IO (read and write) rate in B per second - IO rate only available on Linux from a root account - * If CPU iowait alert then sort by processes by IO rate - * Per CPU display IOwait (if data is available) - * Add password for the client/server mode (-P password) - * Process column style auto (underline) or manual (bold) - * Display a sort indicator (is space is available) - * Change the table key in the help screen - -Version 1.5.2 -============= - - * Add sensors module (enable it with -e option) - * Improve CPU stats (IO wait, Nice, IRQ) - * More stats in lower space (yes it's possible) - * Refactor processes list and count (lower CPU/MEM footprint) - * Add functions to the RCP method - * Completed unit test - * and fixes... - -Version 1.5.1 -============= - - * Patch for PsUtil 0.4 compatibility - * Test PsUtil version before running Glances - -Version 1.5 -=========== - - * Add a client/server mode (XMLRPC) for remote monitoring - * Correct a bug on process IO with non root users - * Add 'w' shortkey to delete finished warning message - * Add 'x' shortkey to delete finished warning/critical message - * Bugs correction - * Code optimization - -Version 1.4.2.2 -=============== - - * Add switch between bit/sec and byte/sec for network IO - * Add Changelog (generated with gitchangelog) - -Version 1.4.2.1 -=============== - - * Minor patch to solve memomy issue (#94) on Mac OS X - -Version 1.4.2 -============= - - * Use the news virtual_memory() and virtual_swap() fct (PsUtil) - * Display "Top process" in logs - * Minor patch on man page for Debian packaging - * Code optimization (less try and except) - -Version 1.4.1.1 -=============== - - * Minor patch to disable Process IO for OS X (not available in PsUtil) - -Version 1.4.1 -============= - - * Per core CPU stats (if space is available) - * Add Process IO Read/Write information (if space is available) - * Uniformize units - -Version 1.4 -=========== - - * Goodby StatGrab... Welcome to the PsUtil library ! - * No more autotools, use setup.py to install (or package) - * Only major stats (CPU, Load and memory) use background colors - * Improve operating system name detection - * New system info: one-line layout and add Arch Linux support - * No decimal places for values < GB - * New memory and swap layout - * Add percentage of usage for both memory and swap - * Add MEM% usage, NICE, STATUS, UID, PID and running TIME per process - * Add sort by MEM% ('m' key) - * Add sort by Process name ('p' key) - * Multiple minor fixes, changes and improvements - * Disable Disk IO module from the command line (-d) - * Disable Mount module from the command line (-m) - * Disable Net rate module from the command line (-n) - * Improved FreeBSD support - * Cleaning code and style - * Code is now checked with pep8 - * CSV and HTML output (experimental functions, no yet documentation) - -Version 1.3.7 -============= - - * Display (if terminal space is available) an alerts history (logs) - * Add a limits classe to manage stats limits - * Manage black and white console (issue #31) - -Version 1.3.6 -============= - - * Add control before libs import - * Change static Python path (issue #20) - * Correct a bug with a network interface disaippear (issue #27) - * Add French and Spanish translation (thx to Jean Bob) - -Version 1.3.5 -============= - - * Add an help panel when Glances is running (key: 'h') - * Add keys descriptions in the syntax (--help | -h) - -Version 1.3.4 -============= - - * New key: 'n' to enable/disable network stats - * New key: 'd' to enable/disable disk IO stats - * New key: 'f' to enable/disable FS stats - * Reorganised the screen when stat are not available|disable - * Force Glances to use the enmbeded fs stats (issue #16) - -Version 1.3.3 -============= - - * Automaticaly swith between process short and long name - * Center the host / system information - * Always put the hour/date in the bottom/right - * Correct a bug if there is a lot of Disk/IO - * Add control about available libstatgrab functions - -Version 1.3.2 -============= - - * Add alert for network bit rate° - * Change the caption - * Optimised net, disk IO and fs display (share the space) - Disable on Ubuntu because the libstatgrab return a zero value - for the network interface speed. - -Version 1.3.1 -============= - - * Add alert on load (depend on number of CPU core) - * Fix bug when the FS list is very long - -Version 1.3 -=========== - - * Add file system stats (total and used space) - * Adapt unit dynamicaly (K, M, G) - * Add man page (Thanks to Edouard Bourguignon) - -Version 1.2 -=========== - - * Resize the terminal and the windows are adapted dynamicaly - * Refresh screen instantanetly when a key is pressed - -Version 1.1.3 -============= - - * Add disk IO monitoring - * Add caption - * Correct a bug when computing the bitrate with the option -t - * Catch CTRL-C before init the screen (Bug #2) - * Check if mem.total = 0 before division (Bug #1) diff --git a/NEWS.rst b/NEWS.rst new file mode 100644 index 0000000000..5251be2c31 --- /dev/null +++ b/NEWS.rst @@ -0,0 +1,2585 @@ +============================================================================== + Glances ChangeLog +============================================================================== + +============= +Version 4.5.1 +============= + +Bug corrected: + +* DiskIO plugin crashes Glances on OpenBSD (regression from 4.5.0.5) #3452 +* DiskIO plugin does not handle empty args in msg_curse() #3429 +* Filesystem plugin KeyError on /etc/hostname in get_view() #3470 +* Sensors show/hide by alias name not working #3439 +* SMART plugin non-uniform key types cause TypeError with InfluxDB2 export #3449 +* WebUI displays incorrect temperature values in Fahrenheit mode #3450 +* AMD GPU plugin PermissionError on /usr/share/libdrm/amdgpu.ids crashes Glances at startup (Snap) #3456 +* NVIDIA GPU not detected under Snap strict confinement #3292 +* MCP server rejects external host connections due to DNS rebinding protection #3467 +* --enable-history flag silently ignored #3416 + +Enhancements: + +* Intel GPU monitoring support added to GPU plugin #994 +* Docker container health status and alerts #3402 +* Add libvirt client to Docker image for VM monitoring #3436 +* Add DeviceName key to SMART plugin device stats #3457 +* All plugins now expose min/max/mean statistics since startup #3462 +* Improved CPU plugin display on macOS (graceful handling of unavailable fields) #3464 + +Security patches: + +* Unauthenticated Configuration Secrets Exposure - Correct CVE-2026-30928 +* SQL Injection via Process Names in TimescaleDB Export - Correct CVE-2026-30930 + +Code quality: + +* JSON serializer hardened with comprehensive type normalization #3454 +* Reduce cyclomatic complexity of split_esc() in globals #3461 +* Add plugin tests to Makefile #3446 +* Fix code block formatting in documentation #3447 + +Thanks to all the contributors for this version: @YamiYukiSenpai, @amzon-ex, +@axodentally, @fpusan, @janusn, @kleinmatic, @lcheylus, @lubomir-moric, @mark-rahal, +@mikemhenry, @Ambika-Patidar, @AbdelhamidKhald, @Julietmgbole, +@sdoshi2061, @cjlindem, @theamanrawat + +=============== +Version 4.5.0.5 +=============== + +Bugs corrected: + +* Regression in the process selection with Glances 4.5.0 #3444 +* [Docker image] Basic Auth no longer works in browser after adding Bearer token support #3434 +* Error fetching ip with urlopen_auth() - extra function argument #3438 + +=============== +Version 4.5.0.4 +=============== + +Continious integration: + +* Remove cassandra-driver dependency because it breaks build on Docker Alpine image + +=============== +Version 4.5.0.2 +=============== + +Bugs corrected: + +* NPU plugin makes Glances 4.5.0.1 crashing on start #3425 +* Glances 4.5.0.1 not reporting docker container details #3426 + +=============== +Version 4.5.0.1 +=============== + +Bugs corrected: + +* Docker image for Glances release 4.5.0 failed to start if no [outputs] section in the glances.conf file #3424 + +============= +Version 4.5.0 +============= + +Enhancements: + +* NPU Monitoring #2694 +* Implement API Token for the ResfulAPI server #1995 +* ZFS Monitoring #873 +* NVME support #3355 +* Add export to DuckDB database #3205 +* Add CPU core number field to processlist #3411 +* Add support for escape ':' in alias name #3345 + +Bugs corrected: + +* CPU Speed / Max Speed wrong in WebUI #3134 +* TIME+ in Web UI Shows Incorrect Large Values #3401 +* ERROR: Exception in ASGI application KeyErro used #3409 +* InfluxDB Exports for AMPs can mismatch types for result field #3419 +* Fix quicklook in case psutil.cpu_freq().max=0.0 #3379 +* Get amdgpu name from amdgpu.id #3376 +* Fetch option is not compliant with client/server mode #3352 +* Glances won't start when using snmp discovery with parameter -c #3354 +* Avoid empty space when Quicklook plugin is displayed #3413 + +Continious integration and documentation: + +* Reduce code complexity #2801 +* Docker GPU not showing up #3393 +* Potential fix for code scanning alert no. 47: Clear-text logging of sensitive information #3418 +* Test: Add comprehensive unit tests for core plugins #3422 +* README: Syntax fix (missing space) #3420 +* fix(security): resolve B701 (Jinja2) and B113 (timeout) vulnerabilities #3383 +* Update license specification to SPDX format #3381 +* Make a simple Jupyter notebook for the Glances API #3350 +* Improve Docker build pipeline #3336 + +Thanks to all contributors and bug reporters ! + +Special thanks to: + +- ffleischer +- drake7707 +- Ambika-Patidar + +============= +Version 4.4.1 +============= + +Bug corrected: + +* Restful API issue after a while (stats are no more updated) #3333 + +============= +Version 4.4.0 +============= + +Breaking changes: + +* A new Python API is now available to use Glances as a Python lib in your hown development #3237 +* In the process list, the long command line is now truncated by default. Use the arrow keys to show the full command line. SHIFT + arrow keys are used to switch between column sorts (TUI). +* Prometheus export format is now more user friendly (see detail in #3283) + +Enhancements: + +* Make a Glances API in order to use Glances as a Python lib #3237 +* Add a new --fetch (neofetch like) option to display a snapshot of the current system status #3281 +* Show used port in container section #2054 +* Show long command line with arrow key #1553 +* Sensors plugin refresh by default every 10 seconds +* Do not call update if a call is done to a specific plugin through the API #3033 +* [UI] Process virtual memory display can be disable by configuration #3299 +* Choose between used or available in the mem plugin #3288 +* [Experimental] Add export to DuckDB database #3205 +* Add Disk I/O Latency stats #1070 +* Filter fields to export #3258 +* Remove .keys() from loops over dicts #3253 +* Remove iterator helpers #3252 + +Bug corrected: + +* [MACOS] Glances not showing Processes on MacOS #3100 +* Last dev build broke Homepage API calls ? only 1 widget still working #3322 +* Cloud plugin always generate communication with 169.254.169.254, even if the plugin is disabled #3316 +* API response delay (3+ minutes) when VMs are running #3317 +* [WINDOWS] Glances do not display CPU stat correctly #3155 +* Glances hangs if network device (NFS) is no available #3290 +* Fix prometheus export format #3283 +* Issue #3279 zfs cache and memory math issues #3289 +* [MACOS] Glances crashes when I try to filter #3266 +* Glances hang when killing process with muliple CTRL-C #3264 +* Issues after disabling system and processcount plugins #3248 +* Headers missing from predefined fields in TUI browser machine list #3250 +* Add another check for the famous Netifaces issue - Related to #3219 +* Key error 'type' in server_list_static.py (load_server_list) #3247 + +Continious integration and documentation: + +* Glances now use uv for the dev environment #3025 +* Glances is compatible with Python 3.14 #3319 +* Glances provides requirements files with specific versions for each release +* Requirements files are now generated dynamically with the make requirements or requirements-upgrade target +* Add duplicate line check in pre-commit (strange behavor with some VScode extension) +* Solve issue with multiprocessing exception with Snap package +* Add a test script for identify CPU consumption of sensor plugin +* Refactor port to take into account netifaces2 +* Correct issue with Chrome driver in WebUI unit test +* Upgrade export test with InfluxDB 1.12 +* Fix typo of --export-process-filter help message #3314 +* In the outdated feature, catch error message if Pypi server not reachable +* Add unit test for auto_unit +* Label error in docs #3286 +* Put WebUI conf generator in a dedicated script +* Refactor the Makefile to generate WebUI config file for all webui targets +* Update sensors documentation #3275 +* Update docker compose env quote #3273 +* Update docker-compose.yml #3249 +* Update API doc generation +* Update README with nice icons #3236 +* Add documentation for WebUI test + +Thanks to all contributors and bug reporters ! + +Special thanks to: +- Adi +- Bennett Kanuka +- Tim Potter +- Ariel Otilibili +- Boris Okassa +- Lawrence +- Shohei YOSHIDA +- jmwallach +- korn3r + +============= +Version 4.3.3 +============= + +Bug corrected: + +* Something in 4.3.2 broke the home assistant add-on for Glances #3238 + +Thanks to the FastAPI and Home Assistant community for the support. + +============= +Version 4.3.2 +============= + +Enhancements: + +* Add stats about running VMS (qemu/libvirt/kvm support through virsh) #1531 +* Add support for InfluxDB 3 Core #3182 +* (postgre)SQL export support / TimeScaleDB #2814 +* CSV column name now include the plugin name - Related to #2394 +* Make all results from amps plugins exportable #2394 +* Make --stdout (csv and json) compliant with client/server mode #3235 +* API history endpoints shows times without timezone #3218 +* FR: Sort Sensors my name in proper number order #3132 +* In the FS module, do not display threshold for volume mounted in 'ro' (read-only) #3143 +* Add a new field in the process list to identifie Zombie process #3178 +* Update plugin containers display and order #3186 +* Implement a basic memory cache with TTL for API call (set to ~1 second) #3202 +* Add container inactive_file & limit to InfluxDB2 export #3206 + +Bug corrected: + +* [GPU] AMD Plugin: Operation not permitted #3125 +* Container memory stats not displayed #3142 +* [WEBUI] Irix mode (per core instead of per CPU percentage) not togglable #3158 +* Related to iteritems, itervalues, and iterkeys are not more needed in Python 3 #3181 +* Glances Central Browser should use name instead of IP adress for redirection #3103 +* Glances breaks if Podman container is started while it is running #3199 + +Continious integration and documentation: + +* Add a new option --print-completion to generate shell tab completion - #3111 +* Improve Restful API documentation embeded in FastAPI #2632 +* Upgrade JS libs #3147 +* Improve unittest for CSV export #3150 +* Improve unittest for InfluxDB plugin #3149 +* Code refactoring - Rename plugin class to Plugin instead of PluginModel #3169 +* Refactor code to limit the complexity of update_views method in plugins #3171 + +Thanks to all contributors and bug reporters ! + +Special thanks to: +- Ariel Otilibili +- kenrmayfield + +============= +Version 4.3.1 +============= + +Enhancements: + +* [WebUI] Top processes extended stats and processes filter in Web server mode #410 +* I'd like a feature to make the forground color for colored background white #3119 +* -disable-bg in ~/.config/glances.conf #3113 +* Entry point in the API to get extended process stats #3095 +* Replace netifaces by netifaces-plus dependencies #3053 +* Replace docker by containers in glances-grafana-flux.json #3118 + +Bug corrected: + +* default_config_dir: Fix config path to include glances/ directory #3106 +* Cannot set warning/critical temperature for a specific sensor needs test #3102 +* Try to reduce latency between stat's update and view - #3086 +* Error on Cloud plugin initialisation make TUI crash #3085 + +Continious integration: + +* Add Selenium to test WebUI #3044 + +Thanks to all contributors and bug reporters ! + +Special thanks to: +- Alexander Kuznetsov +- Jonathan Chemla +- mizulike + +=============== +Version 4.3.0.8 +=============== + +Bug corrected: + +* IP plugin broken with Netifaces2 #3076 +* WebUI if is notresponsive on mobile #3059 (second run) + +=============== +Version 4.3.0.7 +=============== + +Bug corrected: + +* WebUI if is notresponsive on mobile #3059 + +=============== +Version 4.3.0.6 +=============== + +Bug corrected: + +* Browser mode do not working with the sensors plugin #3069 +* netifaces is deprecated, use netifaces-plus or netifaces2 #3055 + +Continuous integration and documentation: + +* Update alpine Docker tag to v3.21 #3061 + +=============== +Version 4.3.0.5 +=============== + +Bug corrected: + +* WebUI errors in 4.3.0.4 on iPad Air (and Browser with low resolution) #3057 + +=============== +Version 4.3.0.4 +=============== + +Continuous integration and documentation: + +* Pin Python version in Ubuntu image to 3.12 + +=============== +Version 4.3.0.3 +=============== + +Continuous integration and documentation: + +* Pin Alpine image to 3.20 (3.21 is not compliant with Netifaces) Related to #3053 + +=============== +Version 4.3.0.2 +=============== + +Enhancements: + +* Revert "Replace netifaces by netifaces-plus" #3053 because it break build on Alpine Image + +=============== +Version 4.3.0.1 +=============== + +Enhancements: + +* Replace netifaces by netifaces-plus #3053 + +Bug corrected: + +* CONTAINERS section missing in 4.3.0 WebUI #3052 + +=============== +Version 4.3.0 +=============== + +Enhancements: + +* Web Based Glances Central Browser #1121 +* Ability to specify hide or show for smart plugin #2996 +* Thread mode ('j' hotkey) is not taken into accound in the WebUI #3019 +* [WEBUI] Clear old alert messages in the WebUI #3042 +* Raise an (Alert) Event for a group of sensors #3049 +* Allow processlist columns to be selected in config file #1524 +* Allow containers columns to be selected in config file #2722 +* [WebUI] Unecessary space between Processcount and processlist #3032 +* Add comparable NVML_LIB check for Windows #3000 +* Change the default path for graph export to /tmp/glances +* Improve CCS of WebUI #3024 + +Bug corrected: + +* Thresholds not displayed in the WebUI for the DiskIO plugin #1498 +* FS module alias configuration do not taken into account everytime #3010 +* Unexpected behaviour while running glances in docker with --export influxdb2 #2904 +* Correct issue when key name contains space - Related to #2983 +* Issue with ports plugin (for URL request) #3008 +* Network problem when no bitrate available #3014 +* SyntaxError: f-string: unmatched '[' in server list (on the DEVELOP branch only) #3018 +* Uptime for Docker containers not working #3021 +* WebUI doesn't display valid time for process list #2902 +* Bug In the Web-UI, Timestamps for 'Warning or critical alerts' are showing incorrect month #3023 +* Correct display issue on Containers plugin in WebUI #3028 + +Continuous integration and documentation: + +* Bumped minimal Python version to 3.9 #3005 +* Make the glances/outputs/static/js/uiconfig.json generated automaticaly from the make webui task +* Update unit-test for Glances Central Browser +* Add unit-test for new entry point in the API (plugin/item/key) +* Add a target to start Glances with Htop features +* Try new build and publish to Pypi CI actions + +Thanks to all contributors and bug reporters ! + +Special thanks to: + +* Ariel Otilibili for code quality improvements #2801 + +=============== +Version 4.2.1 +=============== + +Enhancements: + +* [WEBUI] Came back to default Black Theme / Reduce font size #2993 +* Improve hide_zero option #2958 + +Bug corrected: + +* Possible memory leak #2976 +* Docker/Podman shoud not flood log file with ERROR if containers list can not be retreived #2994 +* Using "-w" option gives error: NameError: name 'Any' is not defined #2992 +* Non blocking error message when Glances starts from a container (alpine-dev image) #2991 + +Continuous integration and documentation: + +* Migrate from setup.py to pyproject.yml #2956 +* Make pyproject.toml's version dynamic #2990 + +Thanks to all contributors and bug reporters ! + +Special thanks to: + +* @branchvincent for pyproject migration + +=============== +Version 4.2.0 +=============== + +Enhancements: + +* [WEBUI] Migration to bootstrap 5 #2914 +* New Ubuntu Multipass VM orchestartor plugin #2252 +* Show only active Disk I/O (and network interface) #2929 +* Make the central client UI configurable (example: GPU status) #1289 +* Please make py-orjson optional: it pulls in dependency on Rust #2930 +* Use defusedxml lib #2979 +* Do not display Unknown information in the cloud plugin #2485 +* Filter Docker containers - #2962 +* Add retain to availability topic in MQTT plugin #2974 +* Make fields labelled in Green easier to see #2882 + +Bug corrected: + +* In TUI, when processes are filtered, column are not aligned #2980 +* Can't kill process. Standalone, Ubuntu 24.04 #2942 +* Internal Server Error #2943 +* Timezone for warning/errors is incorrect #2901 +* Error while initializing the containers plugin ('type' object is not subscriptable) #2922 +* url_prefix do not work in Glances < 4.2.0 - Correct issue with mount #2912 +* Raid plugin breaks with inactive raid0 arrays #2908 +* Crash when terminal is resized #2872 +* Check if server name is not null in the Glances browser - Related to #2861 +* Only display VMs with a running status (in the Vms plugin) + +Continuous integration and documentation: + +* Incomplete pipx install to allow webui + containers #2955 +* Stick FastAPI version to 0.82.0 or higher (latest is better) - Related to #2926 +* api/4/vms returns a dict, thus breaking make test-restful #2918 +* Migration to Alpine 3.20 and Python 3.12 for Alpine Docker + +Improve code quality (thanks to Ariel Otilibili !): + +* Merge pull request #2959 from ariel-anieli/plugins-port-alerts +* Merge pull request #2957 from ariel-anieli/plugin-port-msg +* Merge pull request #2954 from ariel-anieli/makefile +* Merge pull request #2941 from ariel-anieli/refactor-alert +* Merge pull request #2950 from ariel-anieli/revert-commit-01823df9 +* Merge pull request #2932 from ariel-anieli/refactorize-display-plugin +* Merge pull request #2924 from ariel-anieli/makefile +* Merge pull request #2919 from ariel-anieli/refactor-plugin-model-msg-curse +* Merge pull request #2917 from ariel-anieli/makefile +* Merge pull request #2915 from ariel-anieli/refactor-process-thread +* Merge pull request #2913 from ariel-anieli/makefile +* Merge pull request #2910 from ariel-anieli/makefile +* Merge pull request #2900 from ariel-anieli/issue-2801-catch-key +* Merge pull request #2907 from ariel-anieli/refactorize-makefile +* Merge pull request #2891 from ariel-anieli/issue-2801-plugin-msg-curse +* Merge pull request #2884 from ariel-anieli/issue-2801-plugin-update + +Thanks to all contributors and bug reporters ! + +Special thanks to: + +* Ariel Otilibili, he has made an incredible work to improve Glances code quality ! +* RazCrimson, thanks for all your contributions ! +* Bharath Vignesh J K +* Neveda +* ey-jo + +=============== +Version 4.1.2 +=============== + +Bug corrected: + +* AttributeError: 'CpuPercent' object has no attribute 'cpu_percent' #2859 + +=============== +Version 4.1.1 +=============== + +Bug corrected: + +* Sensors data is not exported using InfluxDB2 exporter #2856 + +=============== +Version 4.1.0 +=============== + +Enhancements: + +* Call process_iter.clear_cache() (PsUtil 6+) when Glances user force a refresh (F5 or CTRL-R) #2753 +* PsUtil 6+ no longer check PID reused #2755 +* Add support for automatically hiding network interfaces that are down or that don't have any IP addresses #2799 + +Bug corrected: + +* API: Network module is disabled but appears in endpoint "all" #2815 +* API is not compatible with requests containing special/encoding char #2820 +* 'j' hot key crashes Glances #2831 +* Raspberry PI - CPU info is not correct #2616 +* Graph export is broken if there is no graph section in Glances configuration file #2839 +* Glances API status check returns Error 405 - Method Not Allowed #2841 +* Rootless podman containers cause glances to fail with KeyError #2827 +* --export-process-filter Filter using complete command #2824 +* Exception when Glances is ran with limited plugin list #2822 +* Disable separator option do not work #2823 + +Continuous integration and documentation: + +* test test_107_fs_plugin_method fails on aarch64-linux #2819 + +Thanks to all contributors and bug reporters ! + +Special thanks to: + +* Bharath Vignesh J K +* RazCrimson +* Vadim Small + +=============== +Version 4.0.8 +=============== + +* Make CORS option configurable security webui #2812 +* When Glances is installed via venv, default configuration file is not used documentation packaging #2803 +* GET /1272f6e9e8f9d6bfd6de.png results in 404 bug webui #2781 by Emporea was closed May 25, 2024 +* Screen frequently flickers when outputting to local display bug needs test #2490 +* Retire ujson for being in maintenance mode dependencies enhancement #2791 + +=============== +Version 4.0.7 +=============== + +* cpu_hz_current not available on NetBSD #2792 +* SensorType change in REST API breaks compatibility in 4.0.4 #2788 + +=============== +Version 4.0.6 +=============== + +* No GPU info on Web View #2796 + +=============== +Version 4.0.5 +=============== + +* SensorType change in REST API breaks compatibility in 4.0.4 #2788 +* Please make pydantic optional dependency, not required one #2777 +* Update the Grafana dashboard #2780 +* 4.0.4 - On Glances startup "ERROR -- Can not init battery class #2776 +* In codeSpace (with Python 3.8), an error occurs in ./unittest-restful.py #2773 + +Use Ruff as default Linter. + +=============== +Version 4.0.4 +=============== + +Hostfix release for support sensors plugin on python 3.8 + +=============== +Version 4.0.3 +=============== + +Additional fixes for Sensor plugin + +=============== +Version 4.0.2 +=============== + +* hotfix: plugin(sensors) - race conditions btw fan_speed & temperature… #2766 +* fix: include requirements.txt and SECURITY.md for pypi dist #2761 + +Thanks to RazCrimson for the sensors patch ! + +=============== +Version 4.0.1 +=============== + +Correct issue with CI (miss pydantic dep). + +=============== +Version 4.0.0 +=============== + +See release note in Wiki format: https://github.com/nicolargo/glances/wiki/Glances-4.0-Release-Note + +**BREAKING CHANGES:** + +* The minimal Python version is 3.8 +* The Glances API version 3 is replaced by the version 4. So Restful API URL is now /api/4/ #2610 +* Alias definition change in the configuration file #1735 + +Glances version 3.x and lower: + + sda1_alias=InternalDisk + + sdb1_alias=ExternalDisk + +Glances version 4.x and higher: + + alias=sda1:InternalDisk,sdb1:ExternalDisk + +* Alert data model change from a list of list to a list of dict #2633 +* Docker memory usage uses the same algorithm than docker stats #2637 + +Special notes for package maintainers: + +Minimal requirements for Glances version 4 are: + +* psutil +* defusedxml +* packaging +* ujson +* pydantic +* fastapi (for WebUI / RestFul API) +* uvicorn (for WebUI / RestFul API) +* jinja2 (for WebUI / RestFul API) + +Majors changes between Glances version 3 and version 4: + +* Bottle has been replaced by FastAPI and Uvicorn +* CouchDB has been replaced by PyCouchDB +* nvidia-ml-py has been replaced by py3nvml +* pysnmp has been replaced by pysnmp-lextudio + +Enhancements: + +* Export individual processes stats #794 +* [WebUI] Feature Request: Ability to hide Engine and Pod columns in Containers #2423 +* [IP plugin] Make the public ip information more configurable (not only from the Censys service) #2732 +* Getting field information (description, unit) from the API #2630 +* Refactor alias configuration and allow alias for fs devices #1735 +* Improve alert with mininimal interval/duration configuration keys #2558 +* --stdout plugin.attr is not compliant with plugins returning list of dicts #2446 +* Lot's of log messages when a proxy is used with the Podman plugin #2714 +* [WEBUI & CURSES] Make the left menu configurable #2648 +* [WEBUI] Custom system header information #2695 +* [CURSES] Use normal color for normal text instead of an arbitrary color #2687 +* [WEBUI] Showing the full arguments on the command column of the TASKS #2634 +* Add graph export for GPU plugin (related to #2542) +* Refactor Alert data model from list of list to list of dict #2633 +* Use enum instead of int for callback API version. #2712 +* Make the alerts number configurable (related to #2558) +* [WebUI] Added smart plugin support #2435 +* No more threshold display in the WebUI cpu/mem and memswap plugins #2420 +* Refactor Glances curses code #2580 +* Hide password in the Glances browser form #503 +* Replace Bottle by FastAPI #2181 +* Replace py3nvml with nvidia-ml-py #2688 + +Bug corrected: + +* Crash when reading timezone for generating alert #2659 +* Newline in container command corrupts display / hides container #2733 +* RAID plugin not showing up in Glances web UI (Docker install) #2716 +* Alerts showing different time than time plugin #2214 +* OpenBSD crash on start without a swap file/partition #2719 +* Folders plugin always fails on special directories #2518 +* Update dependency urllib3 to v2 #2397 +* Crach when ENTER key is pressed in the Alpine minimal image #2658 +* Crash when a process is pinned in the develop branch of Glances #2639 +* TERM setting causes glances to crash #2598 +* macOS: Read user config from ~/.config/glances #2641 +* Docker Prometheus issue with IRQ plugin #2564 +* Remove systemd from Curses (related to #2595) +* Screen frequently flickers when outputting to local display #2490 +* Incorrect linux_distro in docker version glances #2439 +* Influxdb2 export not working #2407 +* Ignore/detect symlink loops in folders plugin #2494 +* Remove Clear-text logging of sensitive information - Code Scanning #36 +* Cannot start Glances 3.4.0.1 on Windows 10: SIGHUP not defined #2408 +* 3.4.0 crash on startupwith minimal deps #2401 + +CI and documentation: + +* New logo for Glances version 4.0 #2713 +* Update api-restful.rst documentation #2496 +* Change Renovate config #2729 +* Docker compose password unrecognized arguments when applying docs #2698 +* Docker includes OS Release Volume mount info #2473 +* Update prometheus.rst, fix minor typos #2640 +* Fix typos and make grammatical and stylistic edits in project documentation #2625 +* MongoDB and CouchDB documentation flipped #2565 +* No module named 'influxdb' on the snap version of glances #1738 + +Many thinks to the contributors: + +* Bharath Vignesh J K +* Christoph Zimmermann +* RazCrimson +* Robin Candau +* Github GPG access +* Continuous Integration +* Georgiy Timchenko +* turbocrime +* Kiskae +* snyk-bot +* Alexander Grigoryev +* Claes Hallström +* Francois Pires +* Maarten Kossen (mpkossen) +* Osama Albahrani +* csteiner +* k26pl +* kdkd +* monochromec +* and all the beta testers ! + +=============== +Version 3.4.0.5 +=============== + +Correct issue with GPU plugin in Docker images #2705 + +=============== +Version 3.4.0.4 +=============== + +Cyber security patch (update some deps in the WebUI and Docker image) + +=============== +Version 3.4.0.3 +=============== + +Bugs corrected: + +* Add glances binary to '/usr/local/bin' + Update ENV PATH to include '/venv/bin' in Dockerfiles #2419 +* No more threshold display in the WebUI cpu/mem and memswap plugins #2420 + +=============== +Version 3.4.0.2 +=============== + +Bugs corrected: + +* Cannot start Glances 3.4.0.1 on Windows 10: SIGHUP not defined #2408 +* Influxdb2 export not working #2407 + +=============== +Version 3.4.0.1 +=============== + +Bug corrected: + +* 3.4.0 crash on startupwith minimal deps #2401 + +=============== +Version 3.4.0 +=============== + +Enhancements: + +* Enhance process "extended stats" display (in Curses interface) #2225 + _You can now *pin* a specific process to the top of the process list_ +* Improve Glances start time by disabling Docker and Podman version getter - Related to #1985 +* Customizable InfluxDB2 export interval #2348 +* Improve kill signal management #2194 +* Display a critical error message if Glances is ran with both webserver and rpcserver mode +* Refactor the Cloud plugin, disable it by default in the default configuration file - Related to #2279 +* Correct clear-text logging of sensitive information (security alert #29) +* Use of a broken or weak cryptographic hashing algorithm (SHA256) on password storage #2175 + +Bug corrected: + +* Correct issue (error message) concerning the Cloud plugin - Related to #2392 +* InfluxDB2 export doesn't process folders correctly - missing key #2327 +* Index error when displaying programs on MacOS #2360 +* Dissociate 2 sensors with exactly the same names #2280 +* All times displayed in UTC - Container not using TZ/localtime (Docker) #2278 +* It is not possible to return API data for a particular mount point (FS plugin) #1162 + +Documentation and CI: + +* chg: Dockerfile - structured & cleaner build process #2386 +* Ubuntu is back as additional Docker images. Alpine stays the default one. Related to #2185 +* Improve Makefile amd docker-compose to support Podman and GPU +* Workaround to pin urlib3<2.0 - Related to #2392 +* Error while generating the documentation (ModuleNotFoundError: No module named 'glances') #2391 +* Update Flamegraph (memory profiling) +* Improve template for issue report and feature request +* Parameters in the VIRT column #2343 +* Graph generation documentation is not clear #2336 +* docs: Docker - include tag details +* Add global architecture diagram (Excalidraw) +* Links to documents in sample glances.conf are not valid. #2271 +* Add semgrep support +* Smartmontools missing from full docker image #2262 +* Improve documentation regarding regexp in configuration file +* Improve documentation about the [ip] plugin #2251 + +Cyber security update: + +* All libs have been updated to the latest version + Full roadmap here: https://github.com/nicolargo/glances/milestone/62?closed=1 + +Refactor the Docker images factory, from now, Alpine and Ubuntu images will be provided (nicolargo/glances): + +- *latest-full* for a full Alpine Glances image (latest release) with all dependencies +- *latest* for a basic Alpine Glances (latest release) version with minimal dependencies (Bottle and Docker) +- *dev* for a basic Alpine Glances image (based on development branch) with all dependencies (Warning: may be instable) +- *ubuntu-latest-full* for a full Ubuntu Glances image (latest release) with all dependencies +- *ubuntu-latest* for a basic Ubuntu Glances (latest release) version with minimal dependencies (Bottle and Docker) +- *ubuntu-dev* for a basic Ubuntu Glances image (based on development branch) with all dependencies (Warning: may be instable) + +Contributors for this version: + +* Nicolargo +* RazCrimson: a very special thanks to @RazCrimson for his huge work on this version ! +* Bharath Vignesh J K +* Raz Crimson +* fr4nc0is +* Florian Calvet +* Ali Erdinç Köroğlu +* Jose Vicente Nunez +* Rui Chen +* Ryan Horiguchi +* mfridge +* snyk-bot + +=============== +Version 3.3.1.1 +=============== + +Hard patch on the master branch. + +Bug corrected: + +* "ModuleNotFoundError: No module named 'ujson'" #2246 +* Remove surrounding quotes for quoted command arguments #2247 (related to #2239) + +=============== +Version 3.3.1 +=============== + +Enhancements: + +* Minor change on the help screen +* Refactor some loop in the processes function +* Replace json by ujson #2201 + +Bug corrected: + +* Unable to see docker related information #2180 +* CSV export dependent on sort order for docker container cpu #2156 +* Error when process list is displayed in Programs mode #2209 +* Console formatting permanently messed up when other text printed #2211 +* API GET uptime returns formatted string, not seconds as the doc says #2158 +* Glances UI is breaking for multiline commands #2189 + +Documentation and CI: + +* Add unitary test for memory profiling +* Update memory profile chart +* Add run-docker-ubuntu-* in Makefile +* The open-web-browser option was missing dashes #2219 +* Correct regexp in glances.conf file example +* What is CW from network #2222 (related to discussion #2221) +* Change Glances repology URL +* Add example for the date format +* Correct Flake8 configuration file +* Drop UT for Python 3.5 and 3.6 (no more available in Ubuntu 22.04) +* Correct unitary test with Python 3.5 +* Update Makefile with comments +* Update Python minimal requirement for py3nvlm +* Update security policy (user can open private issue directly in Github) +* Add a simple run script. Entry point for IDE debugger + +Cyber security update: + +* Security alert on ujson < 5.4 +* Merge pull request #2243 from nicolargo/renovate/nvidia-cuda-12.x +* Merge pull request #2244 from nicolargo/renovate/crazy-max-ghaction-docker-meta-4.x +* Merge pull request #2228 from nicolargo/renovate/zeroconf-0.x +* Merge pull request #2242 from nicolargo/renovate/crazy-max-ghaction-docker-meta-4.x +* Merge pull request #2239 from mfridge/action-command-split +* Merge pull request #2165 from nicolargo/renovate/zeroconf-0.x +* Merge pull request #2199 from nicolargo/renovate/alpine-3.x +* Merge pull request #2202 from chncaption/oscs_fix_cdr0ts8au51t49so8c6g +* Bump loader-utils from 2.0.0 to 2.0.3 in /glances/outputs/static #2187 - Update Web lib + +Contributors for this version: + +* Nicolargo +* renovate[bot] +* chncaption +* fkwong +* *mfridge + +And also a big thanks to @RazCrimson (https://github.com/RazCrimson) for the support to the Glances community ! + +=============== +Version 3.3.0.4 +=============== + +Refactor the Docker images factory, from now, only Alpine image will be provided. + +The following Docker images (nicolargo/glances) are availables: + +- *latest-full* for a full Alpine Glances image (latest release) with all dependencies +- *latest* for a basic Alpine Glances (latest release) version with minimal dependencies (Bottle and Docker) +- *dev* for a basic Alpine Glances image (based on development branch) with all dependencies (Warning: may be instable) + +=============== +Version 3.3.0.2 +=============== + +Bug corrected: +* Password files in same configuration dir in effect #2143 +* Fail to load config file on Python 3.10 #2176 + +=============== +Version 3.3.0.1 +=============== + +Just a version to rebuild the Docker images. + +=============== +Version 3.3.0 +=============== + +Enhancements: + +* Migration from AngularJS to Angular/React/Vue #2100 (many thanks to @fr4nc0is) +* Improve the IP module with a link to Censys #2105 +* Add the public IP information to the WebUI #2105 +* Add an option to show a configurable clock/time module to display #2150 +* Add sort information on Docker plugin (console mode). Related to #2138 +* Password files in same configuration dir in effect #2143 +* If the container name is long, then display the start, not the end - Related to #1732 +* Make the Web UI same than Console for CPU plugin +* [WINDOWS] Reorganise CPU stats display #2131 +* Remove the static exportable_plugins list from glances_export.py #1556 +* Limiting data exported for economic storage #1443 + +Bug corrected: + +* glances.conf FS hide not applying #1666 +* AMP: regex with special chars #2152 +* fix(help-screen): add missing shortcuts and columnize algorithmically #2135 +* Correct issue with the regexp filter (use fullmatch instead of match) +* Errors when running Glances as web service #1702 +* Apply alias to Duplicate sensor name #1686 +* Make the hide function in sensors section compliant with lower/uppercase #1590 +* Web UI truncates the days part of CPU time counter of the process list #2108 +* Correct alignment issue with the diskio plugin (Console UI) + +Documentation and CI: + +* Refactor Docker file CI +* Add Codespell to the CI pipeline #2148 +* Please add docker-compose example and document example. #2151 +* [DOC] Glances failed to start and some other issues - BSD #2106 +* [REQUEST Docker image] Output log to stdout #2128 (for debian) +* Fix code scanning alert - Clear-text logging of sensitive information #2124 +* Improve makefile (with online documentation) +* buildx failed with: ERROR: failed to solve: python:3.10-slim-buster: no match for platform in manifest #2120 +* [Update docs] Can I export only the fields I need in csv report? #2113 +* Windows Python 3 installation fails on dependency package "future" #2109 + +Contributors for this version: + +* fr4nc0is : a very special thanks to @fr4nc0is for his huge work on the Glances v3.3.0 WebUI !!! +* Kostis Anagnostopoulos +* Kian-Meng Ang +* dependabot[bot] +* matthewaaronthacker +* and your servant Nicolargo + +=============== +Version 3.2.7 +=============== + +Enhancements: + +* Config to disable all plugins by default (or enable an exclusive list) #2089 +* Keybind(s) for modifying nice level #2081 +* [WEBUI] Reorganize help screen #2037 +* Add a Json stdout option #2060 +* Improve error message when export error occurs +* Improve error message when MQTT error occurs +* Change the way core are displayed +* Remove unused key in the process list +* Refactor top menu of the curse interface +* Improve Irix display for the load plugin + +Bug corrected: + +* In the sensor plugin thresholds in the configuration file should overwrite system ones #2058 +* Drive names truncated in Web UI #2055 +* Correct issue with CPU label + +Documentation and CI: + +* Improve makefile help #2078 +* Add quote to the update command line (already ok for the installation). Related to #2073 +* Make Glances (almost) compliant with REUSE #2042 +* Update README for Debian package users +* Update documentation for Docker +* Update docs for new shortcut +* Disable Pyright on the Git actions pipeline +* Refactor comments +* Except datutil import error +* Another dep issue solved in the Alpine Docker + issue in the outdated method + +Contributors for this version: + +* Nicolargo +* Sylvain MOUQUET +* FastThenLeft +* Jiajie Chen +* dbrennand +* ewuerger + +=============== +Version 3.2.6 +=============== + +Enhancement requests: + +* Create a Show option in the configuration file to only show some stats #2052 +* Use glances.conf file inside docker-compose folder for Docker images +* Optionally disable public ip #2030 +* Update public ip at intervals #2029 + +Bug corrected: + +* Unitary tests should run loopback interface #2051 +* Add python-datutil dep for Focker plugin #2045 +* Add venv to list of .PHONY in Makefile #2043 +* Glances API Documentation displays non valid json #2036 + +A big thanks to @RazCrimson for his contribution ! + +Thanks for others contributors: + +* Steven Conaway +* aekoroglu + +=============== +Version 3.2.5 +=============== + +Enhancement requests: + +* Add a Accumulated per program function to the Glances process list needs test new feature plugin/ps #2015 +* Including battery and AC adapter health in Glances enhancement new feature #1049 +* Display uptime of a docker container enhancement plugin/docker #2004 +* Add a code formatter enhancement #1964 + +Bugs corrected: + +* Threading.Event.isSet is deprecated in Python 3.10 #2017 +* Fix code scanning alert - Clear-text logging of sensitive information security #2006 +* The gpu temperature unit are displayed incorrectly in web ui bug #2002 +* Doc for 'alert' Restful/JSON API response documentation #1994 +* Show the spinning state of a disk documentation #1993 +* Web server status check endpoint enhancement #1988 +* --time parameter being ignored for client/server mode bug #1978 +* Amp with pipe do not work documentation #1976 +* glances_ip.py plugin relies on low rating / malicious site domain bug security #1975 +* "N" command freezes/unfreezes the current time instead of show/hide bug #1974 +* Missing commands in help "h" screen enhancement needs contributor #1973 +* Grafana dashboards not displayed with influxdb2 enhancement needs contributor #1960 +* Glances reports different amounts of used memory than free -m or top documentation #1924 +* Missing: Help command doesn't have info on TCP Connections bug documentation enhancement needs contributor #1675 +* Docstring convention documentation enhancement #940 + +Thanks for the bug report and the patch: @RazCrimson, @Karthikeyan Singaravelan, @Moldavite, @ledwards + +=============== +Version 3.2.4.1 +=============== + +Bugs corrected: + +* Missing packaging dependency when using pip install #1955 + +=============== +Version 3.2.4 +=============== + +Bugs corrected: + +* Failure to start on Apple M1 Max #1939 +* Influxdb2 via SSL #1934 +* Update WebUI (security patch). Thanks to @notFloran. +* Switch from black <> white theme with the '9' hotkey - Related to issue #976 +* Fix: Docker plugin - Invalid IO stats with Arch Linux #1945 +* Bug Fix: Docker plugin - Network stats not being displayed #1944 +* Fix Grafana CPU temperature panel #1954 +* is_disabled name fix #1949 +* Fix tipo in documentation #1932 +* distutils is deprecated in Python 3.10 #1923 +* Separate battery percentages #1920 +* Update docs and correct make docs-server target in Makefile + +Enhancement requests: + +* Improve --issue by displaying the second update iteration and not the first one. More relevant +* Improve --issue option with Python version and paths +* Correct an issue on idle display +* Refactor Mem + MemSwap Curse +* Refactor CPU Curses code + +Contributors for this version: +* Nicolargo +* RazCrimson +* Floran Brutel +* H4ckerxx44 +* Mohamad Mansour +* Néfix Estrada +* Zameer Manji + +=============== +Version 3.2.3.1 +=============== + +Patch to correct issue (regression) #1922: + +* Incorrect processes disk IO stats #1922 +* DSM 6 docker error crash /sys/class/power_supply #1921 + +=============== +Version 3.2.3 +=============== + +Bugs corrected: + +* Docker container monitoring only show half command? #1912 +* Processor name getting cut off #1917 +* batinfo not in docker image (and in requirements files...) ? #1915 +* Glances don't send hostname (tag) to influxdb2 #1913 +* Public IP address doesn't display anymore #1910 +* Debian Docker images broken with version 3.2.2 #1905 + +Enhancement requests: + +* Make the process sort list configurable through the command line #1903 +* [WebUI] truncates network name #1699 + +=============== +Version 3.2.2 +=============== + +Bugs corrected: + +* [3.2.0/3.2.1] keybinding not working anymore #1904 +* InfluxDB/InfluxDB2 Export object has no attribute hostname #1899 + +Documentation: The "make docs" generate RestFul/API documentation file. + +=============== +Version 3.2.1 +=============== + +Bugs corrected: + +* Glances 3.2.0 and influxdb export - Missing network data bug #1893 + +Enhancement requests: + +* Security audit - B411 enhancement (Monkey patch XML RPC Lib) #1025 +* Also search glances.conf file in /usr/share/doc/glances/glances.conf #1862 + +=============== +Version 3.2.0 +=============== + +This release is a major version (but minor number because the API did not change). It focus on +*CPU consumption*. I use `Flame profiling https://github.com/nicolargo/glances/wiki/Glances-FlameGraph`_ +and code optimization to *reduce CPU consumption from 20% to 50%* depending on your system. + +Enhancement and development requests: + +* Improve CPU consumption + - Make the refresh rate configurable per plugin #1870 + - Add caching for processing username and cmdline + - Correct and improve refresh time method + - Set refresh rate for global CPU percent + - Set the default refresh rate of system stats to 60 seconds + - Default refresh time for sensors is refresh rate * 2 + - Improve history perf + - Change main curses loop + - Improve Docker client connection + - Update Flame profiling +* Get system sensors temperatures thresholds #1864 +* Filter data exported from Docker plugin +* Make the Docker API connection timeout configurable +* Add --issue to Github issue template +* Add release-note in the Makefile +* Add some comments in cpu_percent +* Add some comments to the processlist.py +* Set minimal version for PSUtil to 5.3.0 +* Add comment to default glances.conf file +* Improve code quality #820 +* Update WebUI for security vuln + +Bugs corrected: + +* Quit from help should return to main screen, not exit #1874 +* AttributeError: 'NoneType' object has no attribute 'current' #1875 +* Merge pull request #1873 from metayan/fix-history-add +* Correct filter +* Correct Flake8 issue in plugins +* Pressing Q to get rid of irq not working #1792 +* Spelling correction in docs #1886 +* Starting an alias with a number causes a crash #1885 +* Network interfaces not applying in web UI #1884 +* Docker containers information missing with Docker 20.10.x #1878 +* Get system sensors temperatures thresholds #1864 + +Contributors for this version: + +* Nicolargo +* Markus Pöschl +* Clifford W. Hansen +* Blake +* Yan + +=============== +Version 3.1.7 +=============== + +Enhancements and bug corrected: + +* Security audit - B411 #1025 (by nicolargo) +* GPU temperature not shown in webview #1849 (by nicolargo) +* Remove shell=True for actions (following Bandit issue report) #1851 (by nicolargo) +* Replace Travis by Github action #1850 (by nicolargo) +* '/api/3/processlist/pid/3936'use this api can't get right info,all messy code #1828 (by nicolargo) +* Refactor the way importants stats are displayed #1826 (by nicolargo) +* Re-apply the Add hide option to sensors plugin #1596 PR (by nicolargo) +* Smart plugin error while start glances as root #1806 (by nicolargo) +* Plugin quicklook takes more than one seconds to update #1820 (by nicolargo) +* Replace Pystache by Chevron 2/2 See #1817 (by nicolargo) +* Doc. No SMART screenshot. #1799 (by nicolargo) +* Update docs following PR #1798 (by nicolargo) + +Contributors for this version: + + - Nicolargo + - Deosrc + - dependabot[bot] + - Michael J. Cohen + - Rui Chen + - Stefan Eßer + - Tuux + +=============== +Version 3.1.6.2 +=============== + +Bugs corrected: + +* Remove bad merge for a non tested feature (see https://github.com/nicolargo/glances/issues/1787#issuecomment-774682954) + +Version 3.1.6.1 +=============== + +Bugs corrected: + +* Glances crash after installing module for shown GPU information on Windows 10 #1800 + +Version 3.1.6 +============= + +Enhancements and new features: + +* Kill a process from the Curses interface #1444 +* Manual refresh on F5 in the Curses interface #1753 +* Hide function in sensors section #1590 +* Enhancement Request: .conf parameter for AMP #1690 +* Password for Web/Browser mode #1674 +* Unable to connect to Influxdb 2.0 #1776 +* ci: fix release process and improve build speeds #1782 +* Cache cpuinfo output #1700 +* sort by clicking improvements and bug #1578 +* Allow embedded AMP python script to be placed in a configurable location #1734 +* Add attributes to stdout/stdout-csv plugins #1733 +* Do not shorten container names #1723 + +Bugs corrected: + +* Version tag for docker image packaging #1754 +* Unusual characters in cmdline cause lines to disappear and corrupt the display #1692 +* UnicodeDecodeError on any command with a utf8 character in its name #1676 +* Docker image is not up to date install #1662 +* Add option to set the strftime format #1785 +* fix: docker dev build contains all optional requirements #1779 +* GPU information is incomplete via web #1697 +* [WebUI] Fix display of null values for GPU plugin #1773 +* crash on startup on Illumos when no swap is configured #1767 +* Glances crashes with 2 GPUS bug #1683 +* [Feature Request] Filter Docker containers#1748 +* Error with IP Plugin : object has no attribute #1528 +* docker-compose #1760 +* [WebUI] Fix sort by disk io #1759 +* Connection to MQTT server failst #1705 +* Misleading image tag latest-arm needs contributor packaging #1419 +* Docker nicolargo/glances:latest missing arm builds? #1746 +* Alpine image is broken packaging #1744 +* RIP Alpine? needs contributor packaging #1741 +* Manpage improvement documentation #1743 +* Make build reproducible packaging #1740 +* Automated multiarch builds for docker #1716 +* web ui of glances is not coming #1721 +* fixing command in json.rst #1724 +* Fix container rss value #1722 +* Alpine Image is broken needs test packaging #1720 +* Fix gpu plugin to handle multiple gpus with different reporting capabilities bug #1634 + +Version 3.1.5 +============= + +Enhancements and new features: + +* Enhancement: RSS for containers enhancement #1694 +* exports: support rabbitmq amqps enhancement #1687 +* Quick Look missing CPU Infos enhancement #1685 +* Add amqps protocol support for rabbitmq export #1688 +* Select host in Grafana json #1684 +* Value for free disk space is counterintuative on ext file systems enhancement #644 + +Bugs corrected: + +* Can't start server: unexpected keyword argument 'address' bug enhancement #1693 +* class AmpsList method _build_amps_list() Windows fail (glances/amps_list.py) bug #1689 +* Fix grammar in sensors documentation #1681 +* Reflect "used percent" user disk space for [fs] alert #1680 +* Bug: [fs] plugin needs to reflect user disk space usage needs test #1658 +* Fixed formatting on FS example #1673 +* Missing temperature documentation #1664 +* Wiki page for starting as a service documentation #1661 +* How to start glances with --username option on syetemd? documentation #1657 +* tests using /etc/glances/glances.conf from already installed version bug #1654 +* Unittests: Use sys.executable instead of hardcoding the python interpreter #1655 +* Glances should not phone home install #1646 +* Add lighttpd reverse proxy config to the wiki documentation #1643 +* Undefined name 'i' in plugins/glances_gpu.py bug #1635 + +Version 3.1.4 +============= + +Enhancements and new features: + +* FS filtering can be done on device name documentation enhancement #1606 +* Feature request: Include hostname in all (e.g. kafka) exports #1594 +* Threading.isAlive was removed in Python 3.9. Use is_alive. #1585 +* log file under public/shared tmp/ folders must not have deterministic name #1575 +* Install / Systemd Debian documentation #1560 +* Display load as percentage when Irix mode is disable #1554 +* [WebUI] Add a new TCP connections status plugin new feature #1547 +* Make processes.sort_key configurable enhancement #1536 +* NVIDIA GPU temperature #1523 +* Feature request: HDD S.M.A.R.T. #1288 + +Bugs corrected: + +* Glances 3.1.3: when no network interface with Public address #1615 +* NameError: name 'logger' is not defined #1602 +* Disk IO stats missing after upgrade to 5.5.x kernel #1601 +* Glances don't want to run on Crostini (LXC Container, Debian 10, python 3.7.3) #1600 +* Kafka key name needs to be bytes #1593 +* Can't start glances with glances --export mqtt #1581 +* [WEBUI] AMP plugins is not displayed correctly in the Web Interface #1574 +* Unhandled AttributeError when no config files found #1569 +* Glances writing lots of Docker Error message in logs file enhancement #1561 +* GPU stats not showing on mobile web view bug needs test #1555 +* KeyError: b'Rss:' in memory_maps #1551 +* CPU usage is always 100% #1550 +* IP plugin still exporting data when disabled #1544 +* Quicklook plugin not working on Systemd #1537 + +Version 3.1.3 +============= + +Enhancements and new features: + + * Add a new TCP connections status plugin enhancement #1526 + * Add --enable-plugin option from the command line + +Bugs corrected: + + * Fix custom refresh time in the web UI #1548 by notFloran + * Fix issue in WebUI with empty docker stats #1546 by notFloran + * Glances fails without network interface bug #1535 + * Disable option in the configuration file is now take into account + +Others: + + * Sensors plugin is disable by default (high CPU consumption on some Liux distribution). + +Version 3.1.2 +============= + +Enhancements and new features: + + * Make CSV export append instead of replace #1525 + * HDDTEMP config IP and Port #1508 + * [Feature Request] Option in config to change character used to display percentage in Quicklook #1508 + +Bugs corrected: + * Cannot restart glances with --export influxdb after update to 3.1.1 bug #1530 + * ip plugin empty interface bug #1509 + * Glances Snap doesn't run on Orange Pi Zero running Ubuntu Core 16 bug #1517 + * Error with IP Plugin : object has no attribute bug #1528 + * repair the problem that when running 'glances --stdout-csv amps' #1520 + * Possible typo in glances_influxdb.py #1514 + +Others: + + * In debug mode (-d) all duration (init, update are now logged). Grep duration in log file. + +Version 3.1.1 +============= + +Enhancements and new features: + +* Please add some sparklines! #1446 +* Add Load Average (similar to Linux) on Windows #344 +* Add authprovider for cassandra export (thanks to @EmilienMottet) #1395 +* Curses's browser server list sorting added (thanks to @limfreee) #1396 +* ElasticSearch: add date to index, unbreak object push (thanks to @genevera) #1438 +* Performance issue with large folder #1491 +* Can't connect to influxdb with https enabled #1497 + +Bugs corrected: + +* Fix Cassandra table name export #1402 +* 500 Internal Server Error /api/3/network/interface_name #1401 +* Connection to MQTT server failed : getaddrinfo() argument 2 must be integer or string #1450 +* `l` keypress (hide alert log) not working after some time #1449 +* Too less data using prometheus exporter #1462 +* Getting an error when running with prometheus exporter #1469 +* Stack trace when starts Glances on CentOS #1470 +* UnicodeEncodeError: 'ascii' codec can't encode character u'\u25cf' - Raspbian stretch #1483 +* Prometheus integration broken with latest prometheus_client #1397 +* "sorted by ?" is displayed when setting the sort criterion to "USER" #1407 +* IP plugin displays incorrect subnet mask #1417 +* Glances PsUtil ValueError on IoCounter with TASK kernel options #1440 +* Per CPU in Web UI have some display issues. #1494 +* Fan speed and voltages section? #1398 + +Others: + +* Documentation is unclear how to get Docker information #1386 +* Add 'all' target to the Pip install (install all dependencies) +* Allow comma separated commands in AMP + +Version 3.1 +=========== + +Enhancements and new features: + +* Add a CSV output format to the STDOUT output mode #1363 +* Feature request: HDD S.M.A.R.T. reports (thanks to @tnibert) #1288 +* Sort docker stats #1276 +* Prohibit some plug-in data from being exported to influxdb #1368 +* Disable plugin from Glances configuration file #1378 +* Curses-browser's server list paging added (thanks to @limfreee) #1385 +* Client Browser's thread management added (thanks to @limfreee) #1391 + +Bugs corrected: + +* TypeError: '<' not supported between instances of 'float' and 'str' #1315 +* GPU plugin not exported to influxdb #1333 +* Crash after running fine for several hours #1335 +* Timezone listed doesn’t match system timezone, outputs wrong time #1337 +* Compare issue with Process.cpu_times() #1339 +* ERROR -- Can not grab extended stats (invalid attr name 'num_fds') #1351 +* Action on port/web plugins is not working #1358 +* Support for monochrome (serial) terminals e.g. vt220 #1362 +* TypeError on opening (Wifi plugin) #1373 +* Some field name are incorrect in CSV export #1372 +* Standard output misbehaviour (need to flush) #1376 +* Create an option to set the username to use in Web or RPC Server mode #1381 +* Missing kernel task names when the webui is switched to long process names #1371 +* Drive name with special characters causes crash #1383 +* Cannot get stats in Cloud plugin (404) #1384 + +Others: + +* Add Docker documentation (thanks to @rgarrigue) +* Refactor Glances logs (now called Glances events) +* "chart" extra dep replace by "graph" #1389 + +Version 3.0.2 +============= + +Bug corrected: + +* Glances IO Errorno 22 - Invalid argument #1326 + +Version 3.0.1 +============= + +Bug corrected: + +* AMPs error if no output are provided by the system call #1314 + +Version 3.0 +=========== + +See the release note here: https://github.com/nicolargo/glances/wiki/Glances-3.0-Release-Note + +Enhancements and new features: + +* Make the left side bar width dynamic in the Curse UI #1177 +* Add threads number in the process list #1259 +* A way to have only REST API available and disable WEB GUI access #1149 +* Refactor graph export plugin (& replace Matplolib by Pygal) #697 +* Docker module doesn't export details about stopped containers #1152 +* Add dynamic fields in all sections of the configuration file #1204 +* Make plugins and export CLI option dynamical #1173 +* Add a light mode for the console UI #1165 +* Refactor InfluxDB (API is now stable) #1166 +* Add deflate compression support to the RestAPI #1182 +* Add a code of conduct for Glances project's participants #1211 +* Context switches bottleneck identification #1212 +* Take advantage of the psutil issue #1025 (Add process_iter(attrs, ad_value)) #1105 +* Nice Process Priority Configuration #1218 +* Display debug message if dep lib is not found #1224 +* Add a new output mode to stdout #1168 +* Huge refactor of the WebUI packaging thanks to @spike008t #1239 +* Add time zone to the current time #1249 +* Use HTTPs URLs to check public IP address #1253 +* Add labels support to Promotheus exporter #1255 +* Overlap in Web UI when monitoring a machine with 16 cpu threads #1265 +* Support for exporting data to a MQTT server #1305 + + One more thing ! A new Grafana Dash is available with: +* Network interface variable +* Disk variable +* Container CPU + +Bugs corrected: + +* Crash in the Wifi plugin on my Laptop #1151 +* Failed to connect to bus: No such file or directory #1156 +* glances_plugin.py has a problem with specific docker output #1160 +* Key error 'address' in the IP plugin #1176 +* NameError: name 'mode' is not defined in case of interrupt shortly after starting the server mode #1175 +* Crash on startup: KeyError: 'hz_actual_raw' on Raspbian 9.1 #1170 +* Add missing mount-observe and system-observe interfaces #1179 +* OS specific arguments should be documented and reported #1180 +* 'ascii' codec can't encode character u'\U0001f4a9' in position 4: ordinal not in range(128) #1185 +* KeyError: 'memory_info' on stats sum #1188 +* Electron/Atom processes displayed wrong in process list #1192 +* Another encoding issue... With both Python 2 and Python 3 #1197 +* Glances do not exit when eating 'q' #1207 +* FreeBSD blackhole bug #1202 +* Glances crashes when mountpoint with non ASCII characters exists #1201 +* [WEB UI] Minor issue on the Web UI #1240 +* [Glances 3.0 RC1] Client/Server is broken #1244 +* Fixing horizontal scrolling #1248 +* Stats updated during export (thread issue) #1250 +* Glances --browser crashed when more than 40 glances servers on screen 78x45 #1256 +* OSX - Python 3 and empty percent and res #1251 +* Crashes when influxdb option set #1260 +* AMP for kernel process is not working #1261 +* Arch linux package (2.11.1-2) psutil (v5.4.1): RuntimeWarning: ignoring OSError #1203 +* Glances crash with extended process stats #1283 +* Terminal window stuck at the last accessed *protected* server #1275 +* Glances shows mdadm RAID0 as degraded when chunksize=128k and the array isn't degraded. #1299 +* Never starts in a server on Google Cloud and FreeBSD #1292 + +Backward-incompatible changes: + +* Support for Python 3.3 has been dropped (EOL 2017-09-29) +* Support for psutil < 5.3.0 has been dropped +* Minimum supported Docker API version is now 1.21 (Docker plugins) +* Support for InfluxDB < 0.9 is deprecated (InfluxDB exporter) +* Zeroconf lib should be pinned to 0.19.1 for Python 2.x +* --disable- no longer available (use --disable-plugin ) +* --export- no longer available (use --export ) + +News command line options: + + --disable-webui Disable the WebUI (only RESTful API will respond) + --enable-light Enable the light mode for the UI interface + --modules-list Display plugins and exporters list + --disable-plugin plugin1,plugin2 + Disable a list of comma separated plugins + --export exporter1,exporter2 + Export stats to a comma separated exporters + --stdout plugin1,plugin2.attribute + Display stats to stdout + +News configuration keys in the glances.conf file: + +Graph: + + [graph] + # Configuration for the --export graph option + # Set the path where the graph (.svg files) will be created + # Can be overwrite by the --graph-path command line option + path=/tmp + # It is possible to generate the graphs automatically by setting the + # generate_every to a non zero value corresponding to the seconds between + # two generation. Set it to 0 to disable graph auto generation. + generate_every=60 + # See following configuration keys definitions in the Pygal lib documentation + # http://pygal.org/en/stable/documentation/index.html + width=800 + height=600 + style=DarkStyle + +Processes list Nice value: + + [processlist] + # Nice priorities range from -20 to 19. + # Configure nice levels using a comma-separated list. + # + # Nice: Example 1, non-zero is warning (default behavior) + nice_warning=-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 + # + # Nice: Example 2, low priority processes escalate from careful to critical + #nice_careful=1,2,3,4,5,6,7,8,9 + #nice_warning=10,11,12,13,14 + #nice_critical=15,16,17,18,19 + +Docker plugin (related to #1152) + + [docker] + # By default, Glances only display running containers + # Set the following key to True to display all containers + all=False + +All configuration file values (related to #1204) + + [influxdb] + # It is possible to use dynamic system command + prefix=`hostname` + tags=foo:bar,spam:eggs,system:`uname -a` + +============================================================================== +Glances Version 2 +============================================================================== + +Version 2.11.1 +============== + +* [WebUI] Sensors not showing on Web (issue #1142) +* Client and Quiet mode don't work together (issue #1139) + +Version 2.11 +============ + +Enhancements and new features: + +* New export plugin: standard and configurable RESTful exporter (issue #1129) +* Add a JSON export module (issue #1130) +* [WIP] Refactoring of the WebUI + +Bugs corrected: + +* Installing GPU plugin crashes entire Glances (issue #1102) +* Potential memory leak in Windows WebUI (issue #1056) +* glances_network `OSError: [Errno 19] No such device` (issue #1106) +* GPU plugin. : ... not JSON serializable"> (issue #1112) +* PermissionError on macOS (issue #1120) +* Can't move up or down in glances --browser (issue #1113) +* Unable to give aliases to or hide network interfaces and disks (issue #1126) +* `UnicodeDecodeError` on mountpoints with non-breaking spaces (issue #1128) + +Installation: + +* Create a Snap of Glances (issue #1101) + +Version 2.10 +============ + +Enhancements and new features: + +* New plugin to scan remote Web sites (URL) (issue #981) +* Add trends in the Curses interface (issue #1077) +* Add new repeat function to the action (issue #952) +* Use -> and <- arrows keys to switch between processing sort (issue #1075) +* Refactor __init__ and main scripts (issue #1050) +* [WebUI] Improve WebUI for Windows 10 (issue #1052) + +Bugs corrected: + +* StatsD export prefix option is ignored (issue #1074) +* Some FS and LAN metrics fail to export correctly to StatsD (issue #1068) +* Problem with non breaking space in file system name (issue #1065) +* TypeError: string indices must be integers (Network plugin) (issue #1054) +* No Offline status for timeouted ports? (issue #1084) +* When exporting, uptime values loop after 1 day (issue #1092) + +Installation: + + * Create a package.sh script to generate .DEB, .RPM and others... (issue #722) + ==> https://github.com/nicolargo/glancesautopkg + * OSX: can't python setup.py install due to python 3.5 constraint (issue #1064) + +Version 2.9.1 +============= + +Bugs corrected: + +* Glances PerCPU issues with Curses UI on Android (issue #1071) +* Remove extra } in format string (issue #1073) + +Version 2.9.0 +============= + +Enhancements and new features: + +* Add a Prometheus export module (issue #930) +* Add a Kafka export module (issue #858) +* Port in the -c URI (-c hostname:port) (issue #996) + +Bugs corrected: + +* On Windows --export-statsd terminates immediately and does not export (issue #1067) +* Glances v2.8.7 issues with Curses UI on Android (issue #1053) +* Fails to start, OSError in sensors_temperatures (issue #1057) +* Crashes after long time running the glances --browser (issue #1059) +* Sensor values don't refresh since psutil backend (issue #1061) +* glances-version.db Permission denied (issue #1066) + +Version 2.8.8 +============= + +Bugs corrected: + +* Drop requests to check for outdated Glances version +* Glances cannot load "Powersupply" (issue #1051) + +Version 2.8.7 +============= + +Bugs corrected: + +* Windows OS - Global name standalone not defined again (issue #1030) + +Version 2.8.6 +============= + +Bugs corrected: + +* Windows OS - Global name standalone not defined (issue #1030) + +Version 2.8.5 +============= + +Bugs corrected: + +* Cloud plugin error: Name 'requests' is not defined (issue #1047) + +Version 2.8.4 +============= + +Bugs corrected: + +* Correct issue on Travis CI test + +Version 2.8.3 +============= + +Enhancements and new features: + +* Use new sensors-related APIs of psutil 5.1.0 (issue #1018) +* Add a "Cloud" plugin to grab stats inside the AWS EC2 API (issue #1029) + +Bugs corrected: + +* Unable to launch Glances on Windows (issue #1021) +* Glances --export-influxdb starts Webserver (issue #1038) +* Cut mount point name if it is too long (issue #1045) +* TypeError: string indices must be integers in per cpu (issue #1027) +* Glances crash on RPi 1 running ArchLinuxARM (issue #1046) + +Version 2.8.2 +============= + +Bugs corrected: + +* InfluxDB export in 2.8.1 is broken (issue #1026) + +Version 2.8.1 +============= + +Enhancements and new features: + +* Enable docker plugin on Windows (issue #1009) - Thanks to @fraoustin + +Bugs corrected: + +* Glances export issue with CPU and SENSORS (issue #1024) +* Can't export data to a CSV file in Client/Server mode (issue #1023) +* Autodiscover error while binding on IPv6 addresses (issue #1002) +* GPU plugin is display when hitting '4' or '5' shortkeys (issue #1012) +* Interrupts and usb_fiq (issue #1007) +* Docker image does not work in web server mode! (issue #1017) +* IRQ plugin is not display anymore (issue #1013) +* Autodiscover error while binding on IPv6 addresses (issue #1002) + +Version 2.8 +=========== + +Changes: + +* The curses interface on Windows is no more. The web-based interface is now + the default. (issue #946) +* The name of the log file now contains the name of the current user logged in, + i.e., 'glances-USERNAME.log'. +* IRQ plugin off by default. '--disable-irq' option replaced by '--enable-irq'. + +Enhancements and new features: + +* GPU monitoring (limited to NVidia) (issue #170) +* WebUI CPU consumption optimization (issue #836) +* Not compatible with the new Docker API 2.0 (Docker 1.13) (issue #1000) +* Add ZeroMQ exporter (issue #939) +* Add CouchDB exporter (issue #928) +* Add hotspot Wifi information (issue #937) +* Add default interface speed and automatic rate thresholds (issue #718) +* Highlight max stats in the processes list (issue #878) +* Docker alerts and actions (issue #875) +* Glances API returns the processes PPID (issue #926) +* Configure server cached time from the command line --cached-time (issue #901) +* Make the log logger configurable (issue #900) +* System uptime in export (issue #890) +* Refactor the --disable-* options (issue #948) +* PID column too small if kernel.pid_max is > 99999 (issue #959) + +Bugs corrected: + +* Glances RAID plugin Traceback (issue #927) +* Default AMP crashes when 'command' given (issue #933) +* Default AMP ignores `enable` setting (issue #932) +* /proc/interrupts not found in an OpenVZ container (issue #947) + +Version 2.7.1 +============= + +Bugs corrected: + +* AMP plugin crashes on start with Python 3 (issue #917) +* Ports plugin crashes on start with Python 3 (issue #918) + +Version 2.7 +=========== + +Backward-incompatible changes: + +* Drop support for Python 2.6 (issue #300) + +Deprecated: + +* Monitoring process list module is replaced by AMP (see issue #780) +* Use --export-graph instead of --enable-history (issue #696) +* Use --path-graph instead of --path-history (issue #696) + +Enhancements and new features: + +* Add Application Monitoring Process plugin (issue #780) +* Add a new "Ports scanner" plugin (issue #734) +* Add a new IRQ monitoring plugin (issue #911) +* Improve IP plugin to display public IP address (issue #646) +* CPU additional stats monitoring: Context switch, Interrupts... (issue #810) +* Filter processes by others stats (username) (issue #748) +* [Folders] Differentiate permission issue and non-existence of a directory (issue #828) +* [Web UI] Add cpu name in quicklook plugin (issue #825) +* Allow theme to be set in configuration file (issue #862) +* Display a warning message when Glances is outdated (issue #865) +* Refactor stats history and export to graph. History available through API (issue #696) +* Add Cassandra/Scylla export plugin (issue #857) +* Huge pull request by Nicolas Hart to optimize the WebUI (issue #906) +* Improve documentation: http://glances.readthedocs.io (issue #872) + +Bugs corrected: + +* Crash on launch when viewing temperature of laptop HDD in sleep mode (issue #824) +* [Web UI] Fix folders plugin never displayed (issue #829) +* Correct issue IP plugin: VPN with no internet access (issue #842) +* Idle process is back on FreeBSD and Windows (issue #844) +* On Windows, Glances try to display unexisting Load stats (issue #871) +* Check CPU info (issue #881) +* Unicode error on processlist on Windows server 2008 (french) (issue #886) +* PermissionError/OSError when starting glances (issue #885) +* Zeroconf problem with zeroconf_type = "_%s._tcp." % __appname__ (issue #888) +* Zeroconf problem with zeroconf service name (issue #889) +* [WebUI] Glances will not get past loading screen - Windows OS (issue #815) +* Improper bytes/unicode in glances_hddtemp.py (issue #887) +* Top 3 processes are back in the alert summary + +Code quality follow up: from 5.93 to 6.24 (source: https://scrutinizer-ci.com/g/nicolargo/glances) + +Version 2.6.2 +============= + +Bugs corrected: + +* Crash with Docker 1.11 (issue #848) + +Version 2.6.1 +============= + +Enhancements and new features: + +* Add a connector to Riemann (issue #822 by Greogo Nagy) + +Bugs corrected: + +* Browsing for servers which are in the [serverlist] is broken (issue #819) +* [WebUI] Glances will not get past loading screen (issue #815) opened 9 days ago +* Python error after upgrading from 2.5.1 to 2.6 bug (issue #813) + +Version 2.6 +=========== + +Deprecations: + +* Add deprecation warning for Python 2.6. + Python 2.6 support will be dropped in future releases. + Please switch to at least Python 2.7 or 3.3+ as soon as possible. + See http://www.snarky.ca/stop-using-python-2-6 for more information. + +Enhancements and new features: + +* Add a connector to ElasticSearch (welcome to Kibana dashboard) (issue #311) +* New folders' monitoring plugins (issue #721) +* Use wildcard (regexp) to the hide configuration option for network, diskio and fs sections (issue #799 ) +* Command line arguments are now take into account in the WebUI (#789 by @notFloran) +* Change username for server and web server authentication (issue #693) +* Add an option to disable top menu (issue #766) +* Add IOps in the DiskIO plugin (issue #763) +* Add hide configuration key for FS Plugin (issue #736) +* Add process summary min/max stats (issue #703) +* Add timestamp to the CSV export module (issue #708) +* Add a shortcut 'E' to delete process filter (issue #699) +* By default, hide disk I/O ram1-** (issue #714) +* When Glances is starting the notifications should be delayed (issue #732) +* Add option (--disable-bg) to disable ANSI background colours (issue #738 by okdana) +* [WebUI] add "pointer" cursor for sortable columns (issue #704 by @notFloran) +* [WebUI] Make web page title configurable (issue #724) +* Do not show interface in down state (issue #765) +* InfluxDB > 0.9.3 needs float and not int for numerical value (issue#749 and issue#750 by nicolargo) + +Bugs corrected: + +* Can't read sensors on a Thinkpad (issue #711) +* InfluxDB/OpenTSDB: tag parsing broken (issue #713) +* Grafana Dashboard outdated for InfluxDB 0.9.x (issue #648) +* '--tree' breaks process filter on Debian 8 (issue #768) +* Fix highlighting of process when it contains whitespaces (issue #546 by Alessio Sergi) +* Fix RAID support in Python 3 (issue #793 by Alessio Sergi) +* Use dict view objects to avoid issue (issue #758 by Alessio Sergi) +* System exit if Cpu not supported by the Cpuinfo lib (issue #754 by nicolargo) +* KeyError: 'cpucore' when exporting data to InfluxDB (issue #729 by nicolargo) + +Others: +* A new Glances docker container to monitor your Docker infrastructure is available here (issue #728): https://hub.docker.com/r/nicolargo/glances/ +* Documentation is now generated automatically thanks to Sphinx and the Alessio Sergi patch (https://glances.readthedocs.io/en/latest/) + +Contributors summary: +* Nicolas Hennion: 112 commits +* Alessio Sergi: 55 commits +* Floran Brutel: 19 commits +* Nicolas Hart: 8 commits +* @desbma: 4 commits +* @dana: 2 commits +* Damien Martin, Raju Kadam, @georgewhewell: 1 commit + +Version 2.5.1 +============= + +Bugs corrected: + +* Unable to unlock password protected servers in browser mode bug (issue #694) +* Correct issue when Glances is started in console on Windows OS +* [WebUI] when alert is ongoing hide level enhancement (issue #692) + +Version 2.5 +=========== + +Enhancements and new features: + +* Allow export of Docker and sensors plugins stats to InfluxDB, StatsD... (issue #600) +* Docker plugin shows IO and network bitrate (issue #520) +* Server password configuration for the browser mode (issue #500) +* Add support for OpenTSDB export (issue #638) +* Add additional stats (iowait, steal) to the perCPU plugin (issue #672) +* Support Fahrenheit unit in the sensor plugin using the --fahrenheit command line option (issue #620) +* When a process filter is set, display sum of CPU, MEM... (issue #681) +* Improve the QuickLookplugin by adding hardware CPU info (issue #673) +* WebUI display a message if server is not available (issue #564) +* Display an error if export is not used in the standalone/client mode (issue #614) +* New --disable-quicklook, --disable-cpu, --disable-mem, --disable-swap, --disable-load tags (issue #631) +* Complete refactoring of the WebUI thanks to the (awesome) Floran pull (issue #656) +* Network cumulative /combination feature available in the WebUI (issue #552) +* IRIX mode off implementation (issue#628) +* Short process name displays arguments (issue #609) +* Server password configuration for the browser mode (issue #500) +* Display an error if export is not used in the standalone/client mode (issue #614) + +Bugs corrected: + +* The WebUI displays bad sensors stats (issue #632) +* Filter processes crashes with a bad regular expression pattern (issue #665) +* Error with IP plugin (issue #651) +* Crach with Docker plugin (issue #649) +* Docker plugin crashes with webserver mode (issue #654) +* Infrequently crashing due to assert (issue #623) +* Value for free disk space is counterintuative on ext file systems (issue #644) +* Try/catch for unexpected psutil.NoSuchProcess: process no longer exists (issue #432) +* Fatal error using Python 3.4 and Docker plugin bug (issue #602) +* Add missing new line before g man option (issue #595) +* Remove unnecessary type="text/css" for link (HTML5) (issue #595) +* Correct server mode issue when no network interface is available (issue #528) +* Avoid crach on olds kernels (issue #554) +* Avoid crashing if LC_ALL is not defined by user (issue #517) +* Add a disable HDD temperature option on the command line (issue #515) + + +Version 2.4.2 +============= + +Bugs corrected: + +* Process no longer exists (again) (issue #613) +* Crash when "top extended stats" is enabled on OS X (issue #612) +* Graphical percentage bar displays "?" (issue #608) +* Quick look doesn't work (issue #605) +* [Web UI] Display empty Battery sensors enhancement (issue #601) +* [Web UI] Per CPU plugin has to be improved (issue #566) + +Version 2.4.1 +============= + +Bugs corrected: + +* Fatal error using Python 3.4 and Docker plugin bug (issue #602) + +Version 2.4 +=========== + +Changes: + +* Glances doesn't provide a system-wide configuration file by default anymore. + Just copy it in any of the supported locations. See glances-doc.html for + more information. (issue #541) +* The default key bindings have been changed to: + - 'u': sort processes by USER + - 'U': show cumulative network I/O +* No more translations + +Enhancements and new features: + +* The Web user interface is now based on AngularJS (issue #473, #508, #468) +* Implement a 'quick look' plugin (issue #505) +* Add sort processes by USER (issue #531) +* Add a new IP information plugin (issue #509) +* Add RabbitMQ export module (issue #540 Thk to @Katyucha) +* Add a quiet mode (-q), can be useful using with export module +* Grab FAN speed in the Glances sensors plugin (issue #501) +* Allow logical mounts points in the FS plugin (issue #448) +* Add a --disable-hddtemp to disable HDD temperature module at startup (issue #515) +* Increase alert minimal delay to 6 seconds (issue #522) +* If the Curses application raises an exception, restore the terminal correctly (issue #537) + +Bugs corrected: + +* Monitor list, all processes are take into account (issue #507) +* Duplicated --enable-history in the doc (issue #511) +* Sensors title is displayed if no sensors are detected (issue #510) +* Server mode issue when no network interface is available (issue #528) +* DEBUG mode activated by default with Python 2.6 (issue #512) +* Glances display of time trims the hours showing only minutes and seconds (issue #543) +* Process list header not decorating when sorting by command (issue #551) + +Version 2.3 +=========== + +Enhancements and new features: + +* Add the Docker plugin (issue #440) with per container CPU and memory monitoring (issue #490) +* Add the RAID plugin (issue #447) +* Add actions on alerts (issue #132). It is now possible to run action (command line) by triggers. Action could contain {{tag}} (Mustache) with stat value. +* Add InfluxDB export module (--export-influxdb) (issue #455) +* Add StatsD export module (--export-statsd) (issue #465) +* Refactor export module (CSV export option is now --export-csv). It is now possible to export stats from the Glances client mode (issue #463) +* The Web interface is now based on Bootstrap / RWD grid (issue #417, #366 and #461) Thanks to Nicolas Hart @nclsHart +* It is now possible, through the configuration file, to define if an alarm should be logged or not (using the _log option) (issue #437) +* You can now set alarm for Disk IO +* API: add getAllLimits and getAllViews methods (issue #481) and allow CORS request (issue #479) +* SNMP client support NetApp appliance (issue #394) + +Bugs corrected: + +* R/W error with the glances.log file (issue #474) + +Other enhancement: + +* Alert < 3 seconds are no longer displayed + +Version 2.2.1 +============= + +* Fix incorrect kernel thread detection with --hide-kernel-threads (issue #457) +* Handle IOError exception if no /etc/os-release to use Glances on Synology DSM (issue #458) +* Check issue error in client/server mode (issue #459) + +Version 2.2 +=========== + +Enhancements and new features: + +* Add centralized curse interface with a Glances servers list to monitor (issue #418) +* Add processes tree view (--tree) (issue #444) +* Improve graph history feature (issue #69) +* Extended stats is disable by default (use --enable-process-extended to enable it - issue #430) +* Add a short key ('F') and a command line option (--fs-free-space) to display FS free space instead of used space (issue #411) +* Add a short key ('2') and a command line option (--disable-left-sidebar) to disable/enable the side bar (issue #429) +* Add CPU times sort short key ('t') in the curse interface (issue #449) +* Refactor operating system detection for GNU/Linux operating system +* Code optimization + +Bugs corrected: + +* Correct a bug with Glances pip install --user (issue #383) +* Correct issue on battery stat update (issue #433) +* Correct issue on process no longer exist (issues #414 and #432) + +Version 2.1.2 +============= + + Maintenance version (only needed for Mac OS X). + +Bugs corrected: + +* Mac OS X: Error if Glances is not ran with sudo (issue #426) + +Version 2.1.1 +============= + +Enhancement: + +* Automatically compute top processes number for the current screen (issue #408) +* CPU and Memory footprint optimization (issue #401) + +Bugs corrected: + +* Mac OS X 10.9: Exception at start (issue #423) +* Process no longer exists (issue #421) +* Error with Glances Client with Python 3.4.1 (issue #419) +* TypeError: memory_maps() takes exactly 2 arguments (issue #413) +* No filesystem information since Glances 2.0 bug enhancement (issue #381) + +Version 2.1 +=========== + +* Add user process filter feature + User can define a process filter pattern (as a regular expression). + The pattern could be defined from the command line (-f ) + or by pressing the ENTER key in the curse interface. + For the moment, process filter feature is only available in standalone mode. +* Add extended processes information for top process + Top process stats availables: CPU affinity, extended memory information (shared, text, lib, datat, dirty, swap), open threads/files and TCP/UDP network sessions, IO nice level + For the moment, extended processes stats are only available in standalone mode. +* Add --process-short-name tag and '/' key to switch between short/command line +* Create a max_processes key in the configuration file + The goal is to reduce the number of displayed processes in the curses UI and + so limit the CPU footprint of the Glances standalone mode. + The API always return all the processes, the key is only active in the curses UI. + If the key is not define, all the processes will be displayed. + The default value is 20 (processes displayed). + For the moment, this feature is only available in standalone mode. +* Alias for network interfaces, disks and sensors + Users can configure alias from the Glances configuration file. +* Add Glances log message (in the /tmp/glances.log file) + The default log level is INFO, you can switch to the DEBUG mode using the -d option on the command line. +* Add RESTful API to the Web server mode + RESTful API doc: https://github.com/nicolargo/glances/wiki/The-Glances-RESTFUL-JSON-API +* Improve SNMP fallback mode for Cisco IOS, VMware ESXi +* Add --theme-white feature to optimize display for white background +* Experimental history feature (--enable-history option on the command line) + This feature allows users to generate graphs within the curse interface. + Graphs are available for CPU, LOAD and MEM. + To generate graph, click on the 'g' key. + To reset the history, press the 'r' key. + Note: This feature uses the matplotlib library. +* CI: Improve Travis coverage + +Bugs corrected: + +* Quitting glances leaves a column layout to the current terminal (issue #392) +* Glances crashes with malformed UTF-8 sequences in process command lines (issue #391) +* SNMP fallback mode is not Python 3 compliant (issue #386) +* Trouble using batinfo, hddtemp, pysensors w/ Python (issue #324) + + +Version 2.0.1 +============= + +Maintenance version. + +Bugs corrected: + +* Error when displaying numeric process user names (#380) +* Display users without username correctly (#379) +* Bug when parsing configuration file (#378) +* The sda2 partition is not seen by glances (#376) +* Client crash if server is ended during XML request (#375) +* Error with the Sensors module on Debian/Ubuntu (#373) +* Windows don't view all processes (#319) + +Version 2.0 +=========== + + Glances v2.0 is not a simple upgrade of the version 1.x but a complete code refactoring. + Based on a plugins system, it aims at providing an easy way to add new features. + - Core defines the basics and commons functions. + - all stats are grabbed through plugins (see the glances/plugins source folder). + - also outputs methods (Curse, Web mode, CSV) are managed as plugins. + + The Curse interface is almost the same than the version 1.7. Some improvements have been made: + - space optimisation for the CPU, LOAD and MEM stats (justified alignment) + - CPU: + . CPU stats are displayed as soon as Glances is started + . steal CPU alerts are no more logged + - LOAD: + . 5 min LOAD alerts are no more logged + - File System: + . Display the device name (if space is available) + - Sensors: + . Sensors and HDD temperature are displayed in the same block + - Process list: + . Refactor columns: CPU%, MEM%, VIRT, RES, PID, USER, NICE, STATUS, TIME, IO, Command/name + . The running processes status is highlighted + . The process name is highlighted in the command line + + Glances 2.0 brings a brand new Web Interface. You can run Glances in Web server mode and + consult the stats directly from a standard Web Browser. + + The client mode can now fallback to a simple SNMP mode if Glances server is not found on the remote machine. + + Complete release notes: +* Cut ifName and DiskName if they are too long in the curses interface (by Nicolargo) +* Windows CLI is OK but early experimental (by Nicolargo) +* Add bitrate limits to the networks interfaces (by Nicolargo) +* Batteries % stats are now in the sensors list (by Nicolargo) +* Refactor the client/server password security: using SHA256 (by Nicolargo, + based on Alessio Sergi's example script) +* Refactor the CSV output (by Nicolargo) +* Glances client fallback to SNMP server if Glances one not found (by Nicolargo) +* Process list: Highlight running/basename processes (by Alessio Sergi) +* New Web server mode thk to the Bottle library (by Nicolargo) +* Responsive design for Bottle interface (by Nicolargo) +* Remove HTML output (by Nicolargo) +* Enable/disable for optional plugins through the command line (by Nicolargo) +* Refactor the API (by Nicolargo) +* Load-5 alert are no longer logged (by Nicolargo) +* Rename In/Out by Read/Write for DiskIO according to #339 (by Nicolargo) +* Migrate from pysensors to py3sensors (by Alessio Sergi) +* Migration to psutil 2.x (by Nicolargo) +* New plugins system (by Nicolargo) +* Python 2.x and 3.x compatibility (by Alessio Sergi) +* Code quality improvements (by Alessio Sergi) +* Refactor unitaries tests (by Nicolargo) +* Development now follow the git flow workflow (by Nicolargo) + + +============================================================================== +Glances Version 1 +============================================================================== + +Version 1.7.7 +============= + +* Fix CVS export [issue #348] +* Adapt to psutil 2.1.1 +* Compatibility with Python 3.4 +* Improve German update + +Version 1.7.6 +============= + +* Adapt to psutil 2.0.0 API +* Fixed psutil 0.5.x support on Windows +* Fix help screen in 80x24 terminal size +* Implement toggle of process list display ('z' key) + +Version 1.7.5 +============= + +* Force the PyPI installer to use the psutil branch 1.x (#333) + +Version 1.7.4 +============= + +* Add threads number in the task summary line (#308) +* Add system uptime (#276) +* Add CPU steal % to cpu extended stats (#309) +* You can hide disk from the IOdisk view using the conf file (#304) +* You can hide network interface from the Network view using the conf file +* Optimisation of CPU consumption (around ~10%) +* Correct issue #314: Client/server mode always asks for password +* Correct issue #315: Defining password in client/server mode doesn't work as intended +* Correct issue #316: Crash in client server mode +* Correct issue #318: Argument parser, try-except blocks never get triggered + +Version 1.7.3 +============= + +* Add --password argument to enter the client/server password from the prompt +* Fix an issue with the configuration file path (#296) +* Fix an issue with the HTML template (#301) + +Version 1.7.2 +============= + +* Console interface is now Microsoft Windows compatible (thk to @fraoustin) +* Update documentation and Wiki regarding the API +* Added package name for python sources/headers in openSUSE/SLES/SLED +* Add FreeBSD packager +* Bugs corrected + +Version 1.7.1 +============= + +* Fix IoWait error on FreeBSD / Mac OS +* HDDTemp module is now Python v3 compatible +* Don't warn a process is not running if countmin=0 +* Add PyPI badge on the README.rst +* Update documentation +* Add document structure for http://readthedocs.org + +Version 1.7 +=========== + +* Add monitored processes list +* Add hard disk temperature monitoring (thanks to the HDDtemp daemon) +* Add batteries capacities information (thanks to the Batinfo lib) +* Add command line argument -r toggles processes (reduce CPU usage) +* Add command line argument -1 to run Glances in per CPU mode +* Platform/architecture is more specific now +* XML-RPC server: Add IPv6 support for the client/server mode +* Add support for local conf file +* Add a uninstall script +* Add getNetTimeSinceLastUpdate() getDiskTimeSinceLastUpdate() and getProcessDiskTimeSinceLastUpdate() in the API +* Add more translation: Italien, Chinese +* and last but not least... up to 100 hundred bugs corrected / software and +* docs improvements + +Version 1.6.1 +============= + +* Add per-user settings (configuration file) support +* Add -z/--nobold option for better appearance under Solarized terminal +* Key 'u' shows cumulative net traffic +* Work in improving autoUnit +* Take into account the number of core in the CPU process limit +* API improvement add time_since_update for disk, process_disk and network +* Improve help display +* Add more dummy FS to the ignore list +* Code refactory: psutil < 0.4.1 is deprecated (Thk to Alessio) +* Correct a bug on the CPU process limit +* Fix crash bug when specifying custom server port +* Add Debian style init script for the Glances server + +Version 1.6 +=========== + +* Configuration file: user can defines limits +* In client/server mode, limits are set by the server side +* Display limits in the help screen +* Add per process IO (read and write) rate in B per second + IO rate only available on Linux from a root account +* If CPU iowait alert then sort by processes by IO rate +* Per CPU display IOwait (if data is available) +* Add password for the client/server mode (-P password) +* Process column style auto (underline) or manual (bold) +* Display a sort indicator (is space is available) +* Change the table key in the help screen + +Version 1.5.2 +============= + +* Add sensors module (enable it with -e option) +* Improve CPU stats (IO wait, Nice, IRQ) +* More stats in lower space (yes it's possible) +* Refactor processes list and count (lower CPU/MEM footprint) +* Add functions to the RCP method +* Completed unit test +* and fixes... + +Version 1.5.1 +============= + +* Patch for psutil 0.4 compatibility +* Test psutil version before running Glances + +Version 1.5 +=========== + +* Add a client/server mode (XMLRPC) for remote monitoring +* Correct a bug on process IO with non root users +* Add 'w' shortkey to delete finished warning message +* Add 'x' shortkey to delete finished warning/critical message +* Bugs correction +* Code optimization + +Version 1.4.2.2 +=============== + +* Add switch between bit/sec and byte/sec for network IO +* Add Changelog (generated with gitchangelog) + +Version 1.4.2.1 +=============== + +* Minor patch to solve memomy issue (#94) on Mac OS X + +Version 1.4.2 +============= + +* Use the new virtual_memory() and virtual_swap() fct (psutil) +* Display "Top process" in logs +* Minor patch on man page for Debian packaging +* Code optimization (less try and except) + +Version 1.4.1.1 +=============== + +* Minor patch to disable Process IO for OS X (not available in psutil) + +Version 1.4.1 +============= + +* Per core CPU stats (if space is available) +* Add Process IO Read/Write information (if space is available) +* Uniformize units + +Version 1.4 +=========== + +* Goodby StatGrab... Welcome to the psutil library ! +* No more autotools, use setup.py to install (or package) +* Only major stats (CPU, Load and memory) use background colors +* Improve operating system name detection +* New system info: one-line layout and add Arch Linux support +* No decimal places for values < GB +* New memory and swap layout +* Add percentage of usage for both memory and swap +* Add MEM% usage, NICE, STATUS, UID, PID and running TIME per process +* Add sort by MEM% ('m' key) +* Add sort by Process name ('p' key) +* Multiple minor fixes, changes and improvements +* Disable Disk IO module from the command line (-d) +* Disable Mount module from the command line (-m) +* Disable Net rate module from the command line (-n) +* Improved FreeBSD support +* Cleaning code and style +* Code is now checked with pep8 +* CSV and HTML output (experimental functions, no yet documentation) + +Version 1.3.7 +============= + +* Display (if terminal space is available) an alerts history (logs) +* Add a limits class to manage stats limits +* Manage black and white console (issue #31) + +Version 1.3.6 +============= + +* Add control before libs import +* Change static Python path (issue #20) +* Correct a bug with a network interface disaippear (issue #27) +* Add French and Spanish translation (thx to Jean Bob) + +Version 1.3.5 +============= + +* Add an help panel when Glances is running (key: 'h') +* Add keys descriptions in the syntax (--help | -h) + +Version 1.3.4 +============= + +* New key: 'n' to enable/disable network stats +* New key: 'd' to enable/disable disk IO stats +* New key: 'f' to enable/disable FS stats +* Reorganised the screen when stat are not available|disable +* Force Glances to use the enmbeded fs stats (issue #16) + +Version 1.3.3 +============= + +* Automatically switch between process short and long name +* Center the host / system information +* Always put the hour/date in the bottom/right +* Correct a bug if there is a lot of Disk/IO +* Add control about available libstatgrab functions + +Version 1.3.2 +============= + +* Add alert for network bit rate° +* Change the caption +* Optimised net, disk IO and fs display (share the space) + Disable on Ubuntu because the libstatgrab return a zero value + for the network interface speed. + +Version 1.3.1 +============= + +* Add alert on load (depend on number of CPU core) +* Fix bug when the FS list is very long + +Version 1.3 +=========== + +* Add file system stats (total and used space) +* Adapt unit dynamically (K, M, G) +* Add man page (Thanks to Edouard Bourguignon) + +Version 1.2 +=========== + +* Resize the terminal and the windows are adapted dynamically +* Refresh screen instantanetly when a key is pressed + +Version 1.1.3 +============= + +* Add disk IO monitoring +* Add caption +* Correct a bug when computing the bitrate with the option -t +* Catch CTRL-C before init the screen (Bug #2) +* Check if mem.total = 0 before division (Bug #1) diff --git a/README-pypi.rst b/README-pypi.rst new file mode 100644 index 0000000000..ed0db1311d --- /dev/null +++ b/README-pypi.rst @@ -0,0 +1,385 @@ +Glances 🌟 +========== + +**Glances** is an open-source system cross-platform monitoring tool. +It allows real-time monitoring of various aspects of your system such as +CPU, memory, disk, network usage etc. It also allows monitoring of running processes, +logged in users, temperatures, voltages, fan speeds etc. +It also supports container monitoring, it supports different container management +systems such as Docker, LXC. The information is presented in an easy to read dashboard +and can also be used for remote monitoring of systems via a web interface or command +line interface. It is easy to install and use and can be customized to show only +the information that you are interested in. + +In client/server mode, remote monitoring could be done via terminal, +Web interface or API (XML-RPC and RESTful). +Stats can also be exported to files or external time/value databases, CSV or direct +output to STDOUT. + +Glances is written in Python and uses libraries to grab information from +your system. It is based on an open architecture where developers can +add new plugins or exports modules. + +Usage 👋 +======== + +For the standalone mode, just run: + +.. code-block:: console + + $ glances + +.. image:: https://github.com/nicolargo/glances/raw/refs/heads/master/docs/_static/glances-responsive-webdesign.png + +For the Web server mode, run: + +.. code-block:: console + + $ glances -w + +and enter the URL ``http://:61208`` in your favorite web browser. + +In this mode, a HTTP/Restful API is exposed, see document `RestfulApi`_ for more details. + +.. image:: https://github.com/nicolargo/glances/raw/refs/heads/master/docs/_static/screenshot-web.png + +For the client/server mode (remote monitoring through XML-RPC), run the following command on the server: + +.. code-block:: console + + $ glances -s + +and this one on the client: + +.. code-block:: console + + $ glances -c + +You can also detect and display all Glances servers available on your +network (or defined in the configuration file) in TUI: + +.. code-block:: console + + $ glances --browser + +or WebUI: + +.. code-block:: console + + $ glances -w --browser + +It possible to display raw stats on stdout: + +.. code-block:: console + + $ glances --stdout cpu.user,mem.used,load + cpu.user: 30.7 + mem.used: 3278204928 + load: {'cpucore': 4, 'min1': 0.21, 'min5': 0.4, 'min15': 0.27} + cpu.user: 3.4 + mem.used: 3275251712 + load: {'cpucore': 4, 'min1': 0.19, 'min5': 0.39, 'min15': 0.27} + ... + +or in a CSV format thanks to the stdout-csv option: + +.. code-block:: console + + $ glances --stdout-csv now,cpu.user,mem.used,load + now,cpu.user,mem.used,load.cpucore,load.min1,load.min5,load.min15 + 2018-12-08 22:04:20 CEST,7.3,5948149760,4,1.04,0.99,1.04 + 2018-12-08 22:04:23 CEST,5.4,5949136896,4,1.04,0.99,1.04 + ... + +or in a JSON format thanks to the stdout-json option (attribute not supported in this mode in order to have a real JSON object in output): + +.. code-block:: console + + $ glances --stdout-json cpu,mem + cpu: {"total": 29.0, "user": 24.7, "nice": 0.0, "system": 3.8, "idle": 71.4, "iowait": 0.0, "irq": 0.0, "softirq": 0.0, "steal": 0.0, "guest": 0.0, "guest_nice": 0.0, "time_since_update": 1, "cpucore": 4, "ctx_switches": 0, "interrupts": 0, "soft_interrupts": 0, "syscalls": 0} + mem: {"total": 7837949952, "available": 2919079936, "percent": 62.8, "used": 4918870016, "free": 2919079936, "active": 2841214976, "inactive": 3340550144, "buffers": 546799616, "cached": 3068141568, "shared": 788156416} + ... + +Last but not least, you can use the fetch mode to get a quick look of a machine: + +.. code-block:: console + + $ glances --fetch + +Results look like this: + +.. image:: https://github.com/nicolargo/glances/raw/refs/heads/master/docs/_static/screenshot-fetch.png + +Use Glances as a Python library 📚 +================================== + +You can access the Glances API by importing the `glances.api` module and creating an +instance of the `GlancesAPI` class. This instance provides access to all Glances plugins +and their fields. For example, to access the CPU plugin and its total field, you can +use the following code: + +.. code-block:: python + + >>> from glances import api + >>> gl = api.GlancesAPI() + >>> gl.cpu + {'cpucore': 16, + 'ctx_switches': 1214157811, + 'guest': 0.0, + 'idle': 91.4, + 'interrupts': 991768733, + 'iowait': 0.3, + 'irq': 0.0, + 'nice': 0.0, + 'soft_interrupts': 423297898, + 'steal': 0.0, + 'syscalls': 0, + 'system': 5.4, + 'total': 7.3, + 'user': 3.0} + >>> gl.cpu["total"] + 7.3 + >>> gl.mem["used"] + 12498582144 + >>> gl.auto_unit(gl.mem["used"]) + 11.6G + +If the stats return a list of items (like network interfaces or processes), you can +access them by their name: + +.. code-block:: python + + >>> gl.network.keys() + ['wlp0s20f3', 'veth33b370c', 'veth19c7711'] + >>> gl.network["wlp0s20f3"] + {'alias': None, + 'bytes_all': 362, + 'bytes_all_gauge': 9242285709, + 'bytes_all_rate_per_sec': 1032.0, + 'bytes_recv': 210, + 'bytes_recv_gauge': 7420522678, + 'bytes_recv_rate_per_sec': 599.0, + 'bytes_sent': 152, + 'bytes_sent_gauge': 1821763031, + 'bytes_sent_rate_per_sec': 433.0, + 'interface_name': 'wlp0s20f3', + 'key': 'interface_name', + 'speed': 0, + 'time_since_update': 0.3504955768585205} + +For a complete example of how to use Glances as a library, have a look to the `PythonApi`_. + +Documentation 📜 +================ + +For complete documentation have a look at the readthedocs_ website. + +If you have any question (after RTFM! and the `FAQ`_), please post it on the official Reddit `forum`_ or in GitHub `Discussions`_. + +Gateway to other services 🌐 +============================ + +Glances can export stats to: + +- ``CSV`` file +- ``JSON`` file +- ``InfluxDB`` server +- ``Cassandra`` server +- ``CouchDB`` server +- ``OpenTSDB`` server +- ``Prometheus`` server +- ``StatsD`` server +- ``ElasticSearch`` server +- ``PostgreSQL/TimeScale`` server +- ``RabbitMQ/ActiveMQ`` broker +- ``ZeroMQ`` broker +- ``Kafka`` broker +- ``Riemann`` server +- ``Graphite`` server +- ``RESTful`` endpoint + +Installation 🚀 +=============== + +There are several methods to test/install Glances on your system. Choose your weapon! + +PyPI: Pip, the standard way +--------------------------- + +Glances is on ``PyPI``. By using PyPI, you will be using the latest stable version. + +To install Glances, simply use the ``pip`` command line. + +Warning: on modern Linux operating systems, you may have an externally-managed-environment +error message when you try to use ``pip``. In this case, go to the the PipX section below. + +.. code-block:: console + + pip install --user glances + +*Note*: Python headers are required to install `psutil`_, a Glances +dependency. For example, on Debian/Ubuntu **the simplest** is +``apt install python3-psutil`` or alternatively need to install first +the *python-dev* package and gcc (*python-devel* on Fedora/CentOS/RHEL). +For Windows, just install psutil from the binary installation file. + +By default, Glances is installed **without** the Web interface dependencies. +To install it, use the following command: + +.. code-block:: console + + pip install --user 'glances[web]' + +For a full installation (with all features, see features list bellow): + +.. code-block:: console + + pip install --user 'glances[all]' + +Features list: + +- all: install dependencies for all features +- action: install dependencies for action feature +- browser: install dependencies for Glances centram browser +- cloud: install dependencies for cloud plugin +- containers: install dependencies for container plugin +- export: install dependencies for all exports modules +- gpu: install dependencies for GPU plugin +- graph: install dependencies for graph export +- ip: install dependencies for IP public option +- raid: install dependencies for RAID plugin +- sensors: install dependencies for sensors plugin +- smart: install dependencies for smart plugin +- snmp: install dependencies for SNMP +- sparklines: install dependencies for sparklines option +- web: install dependencies for Webserver (WebUI) and Web API +- wifi: install dependencies for Wifi plugin + +To upgrade Glances to the latest version: + +.. code-block:: console + + pip install --user --upgrade glances + +The current develop branch is published to the test.pypi.org package index. +If you want to test the develop version (could be instable), enter: + +.. code-block:: console + + pip install --user -i https://test.pypi.org/simple/ Glances + +PyPI: PipX, the alternative way +------------------------------- + +Install PipX on your system (apt install pipx on Ubuntu). + +Install Glances (with all features): + +.. code-block:: console + + pipx install 'glances[all]' + +The glances script will be installed in the ~/.local/bin folder. + +Shell tab completion 🔍 +======================= + +Glances 4.3.2 and higher includes shell tab autocompletion thanks to the --print-completion option. + +For example, on a Linux operating system with bash shell: + +.. code-block:: console + + $ mkdir -p ${XDG_DATA_HOME:="$HOME/.local/share"}/bash-completion + $ glances --print-completion bash > ${XDG_DATA_HOME:="$HOME/.local/share"}/bash-completion/glances + $ source ${XDG_DATA_HOME:="$HOME/.local/share"}/bash-completion/glances + +Following shells are supported: bash, zsh and tcsh. + +Requirements 🧩 +=============== + +Glances is developed in Python. A minimal Python version 3.10 or higher +should be installed on your system. + +*Note for Python 2 users* + +Glances version 4 or higher do not support Python 2 (and Python 3 < 3.10). +Please uses Glances version 3.4.x if you need Python 2 support. + +Dependencies: + +- ``psutil`` (better with latest version) +- ``defusedxml`` (in order to monkey patch xmlrpc) +- ``packaging`` (for the version comparison) +- ``windows-curses`` (Windows Curses implementation) [Windows-only] +- ``shtab`` (Shell autocompletion) [All but Windows] +- ``jinja2`` (for fetch mode and templating) + +Extra dependencies: + +- ``batinfo`` (for battery monitoring) +- ``bernhard`` (for the Riemann export module) +- ``cassandra-driver`` (for the Cassandra export module) +- ``chevron`` (for the action script feature) +- ``docker`` (for the Containers Docker monitoring support) +- ``elasticsearch`` (for the Elastic Search export module) +- ``FastAPI`` and ``Uvicorn`` (for Web server mode) +- ``graphitesender`` (For the Graphite export module) +- ``hddtemp`` (for HDD temperature monitoring support) [Linux-only] +- ``influxdb`` (for the InfluxDB version 1 export module) +- ``influxdb-client`` (for the InfluxDB version 2 export module) +- ``kafka-python`` (for the Kafka export module) +- ``nvidia-ml-py`` (for the GPU plugin) +- ``pycouchdb`` (for the CouchDB export module) +- ``pika`` (for the RabbitMQ/ActiveMQ export module) +- ``podman`` (for the Containers Podman monitoring support) +- ``potsdb`` (for the OpenTSDB export module) +- ``prometheus_client`` (for the Prometheus export module) +- ``psycopg[binary]`` (for the PostgreSQL/TimeScale export module) +- ``pygal`` (for the graph export module) +- ``pymdstat`` (for RAID support) [Linux-only] +- ``pymongo`` (for the MongoDB export module) +- ``pysnmp-lextudio`` (for SNMP support) +- ``pySMART.smartx`` (for HDD Smart support) [Linux-only] +- ``pyzmq`` (for the ZeroMQ export module) +- ``requests`` (for the Ports, Cloud plugins and RESTful export module) +- ``sparklines`` (for the Quick Plugin sparklines option) +- ``statsd`` (for the StatsD export module) +- ``wifi`` (for the wifi plugin) [Linux-only] +- ``zeroconf`` (for the autodiscover mode) + +Project sponsorship 🙌 +====================== + +You can help me to achieve my goals of improving this open-source project +or just say "thank you" by: + +- sponsor me using one-time or monthly tier Github sponsors_ page +- send me some pieces of bitcoin: 185KN9FCix3svJYp7JQM7hRMfSKyeaJR4X +- buy me a gift on my wishlist_ page + +Any and all contributions are greatly appreciated. + +Authors and Contributors 🔥 +=========================== + +Nicolas Hennion (@nicolargo) + +.. image:: https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40nicolargo + :target: https://twitter.com/nicolargo + +License 📜 +========== + +Glances is distributed under the LGPL version 3 license. See ``COPYING`` for more details. + +.. _psutil: https://github.com/giampaolo/psutil +.. _readthedocs: https://glances.readthedocs.io/ +.. _forum: https://www.reddit.com/r/glances/ +.. _sponsors: https://github.com/sponsors/nicolargo +.. _wishlist: https://www.amazon.fr/hz/wishlist/ls/BWAAQKWFR3FI?ref_=wl_share +.. _PythonApi: https://glances.readthedocs.io/en/develop/api/python.html +.. _RestfulApi: https://glances.readthedocs.io/en/develop/api/restful.html +.. _FAQ: https://github.com/nicolargo/glances/blob/develop/docs/faq.rst +.. _Discussions: https://github.com/nicolargo/glances/discussions diff --git a/README.rst b/README.rst index d84c7c0e0f..ac583f2eff 100644 --- a/README.rst +++ b/README.rst @@ -1,115 +1,488 @@ -Follow Glances on Twitter: `@nicolargo`_ or `@glances_system`_ +.. raw:: html -=============================== -Glances - An eye on your system -=============================== +
-.. image:: https://api.flattr.com/button/flattr-badge-large.png - :target: https://flattr.com/thing/484466/nicolargoglances-on-GitHub -.. image:: https://travis-ci.org/nicolargo/glances.png?branch=master - :target: https://travis-ci.org/nicolargo/glances -.. image:: https://badge.fury.io/py/Glances.png - :target: http://badge.fury.io/py/Glances -.. image:: https://pypip.in/d/Glances/badge.png - :target: https://pypi.python.org/pypi/Glances/ - :alt: Downloads -.. image:: https://d2weczhvl823v0.cloudfront.net/nicolargo/glances/trend.png - :target: https://bitdeli.com/nicolargo -.. image:: https://raw.github.com/nicolargo/glances/master/docs/images/glances-white-256.png - :width: 128 +.. image:: ./docs/_static/glances-responsive-webdesign.png -**Glances** is a cross-platform curses-based system monitoring tool written in Python. +.. raw:: html -It uses the `psutil`_ library to get information from your system. +

Glances

-.. image:: https://raw.github.com/nicolargo/glances/master/docs/images/screenshot-wide.png +An Eye on your System -Requirements -============ +| |pypi| |test| |contributors| |quality| +| |starts| |docker| |pypistat| |sponsors| +| |reddit| -- ``python >= 2.6`` (tested with version 2.6, 2.7, 3.3, 3.4) -- ``psutil >= 2.0.0`` -- ``setuptools`` +.. |pypi| image:: https://img.shields.io/pypi/v/glances.svg + :target: https://pypi.python.org/pypi/Glances -Optional dependencies: +.. |starts| image:: https://img.shields.io/github/stars/nicolargo/glances.svg + :target: https://github.com/nicolargo/glances/ + :alt: Github stars -- ``bottle`` (for Web Server mode) -- ``py3sensors`` (for hardware monitoring support) [Linux-only] -- ``hddtemp`` (for HDD temperature monitoring support) -- ``batinfo`` (for battery monitoring support) [Linux-only] +.. |docker| image:: https://img.shields.io/docker/pulls/nicolargo/glances + :target: https://hub.docker.com/r/nicolargo/glances/ + :alt: Docker pull -Installation -============ +.. |pypistat| image:: https://pepy.tech/badge/glances/month + :target: https://pepy.tech/project/glances + :alt: Pypi downloads -PyPI: The simple way --------------------- +.. |test| image:: https://github.com/nicolargo/glances/actions/workflows/ci.yml/badge.svg?branch=develop + :target: https://github.com/nicolargo/glances/actions + :alt: Linux tests (GitHub Actions) -Glances is on `PyPI`_. By using Pypi, you are sure to have the latest stable version. +.. |contributors| image:: https://img.shields.io/github/contributors/nicolargo/glances + :target: https://github.com/nicolargo/glances/issues?q=is%3Aissue+is%3Aopen+label%3A%22needs+contributor%22 + :alt: Contributors -To install, simply use `pip`_: +.. |quality| image:: https://scrutinizer-ci.com/g/nicolargo/glances/badges/quality-score.png?b=develop + :target: https://scrutinizer-ci.com/g/nicolargo/glances/?branch=develop + :alt: Code quality + +.. |sponsors| image:: https://img.shields.io/github/sponsors/nicolargo + :target: https://github.com/sponsors/nicolargo + :alt: Sponsors + +.. |twitter| image:: https://img.shields.io/badge/X-000000?style=for-the-badge&logo=x&logoColor=white + :target: https://twitter.com/nicolargo + :alt: @nicolargo + +.. |reddit| image:: https://img.shields.io/badge/Reddit-FF4500?style=for-the-badge&logo=reddit&logoColor=white + :target: https://www.reddit.com/r/glances/ + :alt: @reddit + +.. raw:: html + +
+ +Summary 🌟 +========== + +**Glances** is an open-source system cross-platform monitoring tool. +It allows real-time monitoring of various aspects of your system such as +CPU, memory, disk, network usage etc. It also allows monitoring of running processes, +logged in users, temperatures, voltages, fan speeds etc. +It also supports container monitoring, it supports different container management +systems such as Docker, LXC. The information is presented in an easy to read dashboard +and can also be used for remote monitoring of systems via a web interface or command +line interface. It is easy to install and use and can be customized to show only +the information that you are interested in. + +In client/server mode, remote monitoring could be done via terminal, +Web interface or API (XML-RPC and RESTful). +Stats can also be exported to files or external time/value databases, CSV or direct +output to STDOUT. + +AI assistants (Claude, Cursor, …) can query Glances directly through the built-in +MCP server (available in Glances 4.5.1 and higher). + +Glances is written in Python and uses libraries to grab information from +your system. It is based on an open architecture where developers can +add new plugins or exports modules. + +Usage 👋 +======== + +For the standalone mode, just run: + +.. code-block:: console + + $ glances + +.. image:: ./docs/_static/glances-summary.png + +For the Web server mode, run: + +.. code-block:: console + + $ glances -w + +and enter the URL ``http://:61208`` in your favorite web browser. + +In this mode, a HTTP/Restful API is exposed, see document `RestfulApi`_ for more details. + +.. image:: ./docs/_static/screenshot-web.png + +To also expose a `MCP (Model Context Protocol)`_ server (for AI assistants), add ``--enable-mcp``: + +.. code-block:: console + + $ glances -w --enable-mcp + +The MCP endpoint (SSE transport) is then available at ``http://:61208/mcp/sse``. +See the `McpApi`_ documentation for client configuration and usage. + +You can also detect and display all Glances servers available on your +network (or defined in the configuration file) in TUI: + +.. code-block:: console + + $ glances --browser + +or WebUI: + +.. code-block:: console + + $ glances -w --browser + +It possible to display raw stats on stdout: .. code-block:: console - pip install Glances + $ glances --stdout cpu.user,mem.used,load + cpu.user: 30.7 + mem.used: 3278204928 + load: {'cpucore': 4, 'min1': 0.21, 'min5': 0.4, 'min15': 0.27} + cpu.user: 3.4 + mem.used: 3275251712 + load: {'cpucore': 4, 'min1': 0.19, 'min5': 0.39, 'min15': 0.27} + ... -*Note*: Python headers are required to install PSutil. For example, -on Debian/Ubuntu you need to install first the *python-dev* package. +or in a CSV format thanks to the stdout-csv option: + +.. code-block:: console + + $ glances --stdout-csv now,cpu.user,mem.used,load + now,cpu.user,mem.used,load.cpucore,load.min1,load.min5,load.min15 + 2018-12-08 22:04:20 CEST,7.3,5948149760,4,1.04,0.99,1.04 + 2018-12-08 22:04:23 CEST,5.4,5949136896,4,1.04,0.99,1.04 + ... + +or in a JSON format thanks to the stdout-json option (attribute not supported in this mode in order to have a real JSON object in output): + +.. code-block:: console + + $ glances --stdout-json cpu,mem + cpu: {"total": 29.0, "user": 24.7, "nice": 0.0, "system": 3.8, "idle": 71.4, "iowait": 0.0, "irq": 0.0, "softirq": 0.0, "steal": 0.0, "guest": 0.0, "guest_nice": 0.0, "time_since_update": 1, "cpucore": 4, "ctx_switches": 0, "interrupts": 0, "soft_interrupts": 0, "syscalls": 0} + mem: {"total": 7837949952, "available": 2919079936, "percent": 62.8, "used": 4918870016, "free": 2919079936, "active": 2841214976, "inactive": 3340550144, "buffers": 546799616, "cached": 3068141568, "shared": 788156416} + ... + +Last but not least, you can use the fetch mode to get a quick look of a machine: + +.. code-block:: console + + $ glances --fetch + +Results look like this: + +.. image:: ./docs/_static/screenshot-fetch.png + +For the record, Glances also have a XML-RPC client/server mode, run the following command on the server: + +.. code-block:: console + + $ glances -s + +and this one on the client: + +.. code-block:: console + + $ glances -c + +Use Glances as a Python library 📚 +================================== + +You can access the Glances API by importing the `glances.api` module and creating an +instance of the `GlancesAPI` class. This instance provides access to all Glances plugins +and their fields. For example, to access the CPU plugin and its total field, you can +use the following code: + +.. code-block:: python + + >>> from glances import api + >>> gl = api.GlancesAPI() + >>> gl.cpu + {'cpucore': 16, + 'ctx_switches': 1214157811, + 'guest': 0.0, + 'idle': 91.4, + 'interrupts': 991768733, + 'iowait': 0.3, + 'irq': 0.0, + 'nice': 0.0, + 'soft_interrupts': 423297898, + 'steal': 0.0, + 'syscalls': 0, + 'system': 5.4, + 'total': 7.3, + 'user': 3.0} + >>> gl.cpu.get("total") + 7.3 + >>> gl.mem.get("used") + 12498582144 + >>> gl.auto_unit(gl.mem.get("used")) + 11.6G + +If the stats return a list of items (like network interfaces or processes), you can +access them by their name: + +.. code-block:: python + + >>> gl.network.keys() + ['wlp0s20f3', 'veth33b370c', 'veth19c7711'] + >>> gl.network.get("wlp0s20f3") + {'alias': None, + 'bytes_all': 362, + 'bytes_all_gauge': 9242285709, + 'bytes_all_rate_per_sec': 1032.0, + 'bytes_recv': 210, + 'bytes_recv_gauge': 7420522678, + 'bytes_recv_rate_per_sec': 599.0, + 'bytes_sent': 152, + 'bytes_sent_gauge': 1821763031, + 'bytes_sent_rate_per_sec': 433.0, + 'interface_name': 'wlp0s20f3', + 'key': 'interface_name', + 'speed': 0, + 'time_since_update': 0.3504955768585205} + +For a complete example of how to use Glances as a library, have a look to the `PythonApi`_. + +Documentation 📜 +================ + +For complete documentation have a look at the readthedocs_ website. + +If you have any question (after RTFM! and the `FAQ`_), please post it on the official Reddit `forum`_ or in GitHub `Discussions`_. + +Gateway to other services 🌐 +============================ + +Glances can export stats to: + +- files: ``CSV`` and ``JSON`` +- databases: ``InfluxDB``, ``ElasticSearch``, ``PostgreSQL/TimeScale``, ``Cassandra``, ``CouchDB``, ``OpenTSDB``, ``Prometheus``, ``StatsD``, ``Riemann`` and ``Graphite`` +- brokers: ``RabbitMQ/ActiveMQ``, ``NATS``, ``ZeroMQ`` and ``Kafka`` +- others: ``RESTful`` endpoint + +Installation 🚀 +=============== + +There are several methods to test/install Glances on your system. Choose your weapon! + +PyPI: Pip, the standard way +--------------------------- + +Glances is on ``PyPI``. By using PyPI, you will be using the latest stable version. + +To install Glances, simply use the ``pip`` command line in an virtual environment. + +.. code-block:: console + + cd ~ + python3 -m venv ~/.venv + source ~/.venv/bin/activate + pip install glances + +*Note*: Python headers are required to install `psutil`_, a Glances +dependency. For example, on Debian/Ubuntu **the simplest** is +``apt install python3-psutil`` or alternatively need to install first +the *python-dev* package and gcc (*python-devel* on Fedora/CentOS/RHEL). +For Windows, just install psutil from the binary installation file. + +By default, Glances is installed **without** the Web interface dependencies. + +To install it, use the following command: + +.. code-block:: console + + pip install 'glances[web]' + +For a full installation (with all features, see features list bellow): + +.. code-block:: console + + pip install 'glances[all]' + +Features list: + +- all: install dependencies for all features +- action: install dependencies for action feature +- browser: install dependencies for Glances centram browser +- cloud: install dependencies for cloud plugin +- containers: install dependencies for container plugin +- export: install dependencies for all exports modules +- gpu: install dependencies for GPU plugin +- graph: install dependencies for graph export +- ip: install dependencies for IP public option +- mcp: install dependencies for the MCP server (AI assistant integration) +- raid: install dependencies for RAID plugin +- sensors: install dependencies for sensors plugin +- smart: install dependencies for smart plugin +- snmp: install dependencies for SNMP +- sparklines: install dependencies for sparklines option +- web: install dependencies for Webserver (WebUI) and Web API +- wifi: install dependencies for Wifi plugin To upgrade Glances to the latest version: .. code-block:: console - pip install --upgrade Glances + pip install --upgrade glances + +UVx, the magic way +------------------ + +Install and run directly Glances with the one line: + +.. code-block:: console -GNU/Linux ---------- + uvx glances -At the moment, packages exist for the following GNU/Linux distributions: +Note: `Uv`_ should be installed on your system. -- Arch Linux -- Debian (Testing/Sid) -- Fedora/CentOS/RHEL -- Gentoo -- Slackware -- Ubuntu (13.04+) -- Void Linux +PyPI: PipX, the alternative way +------------------------------- -So you should be able to install it using your favorite package manager. +Install PipX on your system. For example on Ubuntu/Debian: + +.. code-block:: console + + sudo apt install pipx + +Then install Glances (with all features): + +.. code-block:: console + + pipx install 'glances[all]' + +The glances script will be installed in the ~/.local/bin folder. + +To upgrade Glances to the latest version: + +.. code-block:: console + + pipx upgrade glances + +Docker: the cloudy way +---------------------- + +Glances Docker images are available. You can use it to monitor your +server and all your containers ! + +The following tags are available: + +- *latest-full* for a full Alpine Glances image (latest release) with all dependencies +- *latest* for a basic Alpine Glances (latest release) version with minimal dependencies (FastAPI and Docker) +- *dev* for a basic Alpine Glances image (based on development branch) with all dependencies (Warning: may be instable) +- *ubuntu-latest-full* for a full Ubuntu Glances image (latest release) with all dependencies +- *ubuntu-latest* for a basic Ubuntu Glances (latest release) version with minimal dependencies (FastAPI and Docker) +- *ubuntu-dev* for a basic Ubuntu Glances image (based on development branch) with all dependencies (Warning: may be instable) + +Run last version of Glances container in *console mode*: + +.. code-block:: console + + docker run --rm -e TZ="${TZ}" -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host --network host -it nicolargo/glances:latest-full + +By default, the /etc/glances/glances.conf file is used (based on docker-compose/glances.conf). + +Additionally, if you want to use your own glances.conf file, you can +create your own Dockerfile: + +.. code-block:: console + + FROM nicolargo/glances:latest + COPY glances.conf /root/.config/glances/glances.conf + CMD python -m glances -C /root/.config/glances/glances.conf $GLANCES_OPT + +Alternatively, you can specify something along the same lines with +docker run options (notice the `GLANCES_OPT` environment +variable setting parameters for the glances startup command): + +.. code-block:: console + + docker run -e TZ="${TZ}" -v $HOME/.config/glances/glances.conf:/glances.conf:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host -e GLANCES_OPT="-C /glances.conf" -it nicolargo/glances:latest-full + +Where $HOME/.config/glances/glances.conf is a local directory containing your glances.conf file. + +Run the container in *Web server mode*: + +.. code-block:: console + + docker run -d --restart="always" -p 61208-61209:61208-61209 -e TZ="${TZ}" -e GLANCES_OPT="-w" -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host nicolargo/glances:latest-full + +For a full list of options, see the Glances `Docker`_ documentation page. + +It is also possible to use a simple Docker compose file (see in ./docker-compose/docker-compose.yml): + +.. code-block:: console + + cd ./docker-compose + docker-compose up + +It will start a Glances server with WebUI. + +Brew: The missing package manager +--------------------------------- + +For Linux and Mac OS, it is also possible to install Glances with `Brew`_: + +.. code-block:: console + + brew install glances + +GNU/Linux package +----------------- + +`Glances` is available on many Linux distributions, so you should be +able to install it using your favorite package manager. Nevetheless, +i do not recommend it. Be aware that when you use this method the operating +system `package`_ for `Glances` may not be the latest version and only basics +plugins are enabled. + +Note: The Debian package (and all other Debian-based distributions) do +not include anymore the JS statics files used by the Web interface +(see ``issue2021``). If you want to add it to your Glances installation, +follow the instructions: ``issue2021comment``. In Glances version 4 and +higher, the path to the statics file is configurable (see ``issue2612``). FreeBSD ------- -To install the binary package: +On FreeBSD, package name depends on the Python version. + +Check for Python version: + +.. code-block:: console + + # python --version + +Install the Glances package: .. code-block:: console - # pkg_add -r py27-glances + # pkg install pyXY-glances -Using pkgng: +Where X and Y are the Major and Minor Values of your Python System. .. code-block:: console - # pkg install py27-glances + # Example for Python 3.11.3: pkg install py311-glances -To install Glances from ports: +**NOTE:** Check Glances Binary Package Version for your System Architecture. +You must have the Correct Python Version Installed which corresponds to the Glances Binary Package. + +To install Glances from Ports: .. code-block:: console # cd /usr/ports/sysutils/py-glances/ # make install clean -OS X ----- +macOS +----- -OS X users can install Glances using `Homebrew`_ or `MacPorts`_. +MacOS users can install Glances using ``Homebrew`` or ``MacPorts``. Homebrew ```````` .. code-block:: console - $ brew install python - $ pip install Glances + $ brew install glances MacPorts ```````` @@ -121,92 +494,191 @@ MacPorts Windows ------- -Glances proposes a Windows client based on the `colorconsole`_ Python library. +Install `Python`_ for Windows (Python 3.4+ ship with pip) and +follow the Glances Pip install procedure. -To install Glances on Windows OS, you have to follow these steps: +Android +------- -- Install Python for Windows: http://www.python.org/getit/ -- Install the psutil library: https://pypi.python.org/pypi?:action=display&name=psutil#downloads -- Install the colorconsole library: http://code.google.com/p/colorconsole/downloads/list -- Download Glances from here: http://nicolargo.github.io/glances/ +You need a rooted device and the `Termux`_ application (available on the +Google Play Store). -Source ------- - -To install Glances version X.Y from source: +Start Termux on your device and enter: .. code-block:: console - $ curl -L https://github.com/nicolargo/glances/archive/vX.Y.tar.gz -o glances-X.Y.tar.gz - $ tar -zxvf glances-*.tar.gz - $ cd glances-* - # python setup.py install - -*Note*: Python headers are required to install psutil. For example, -on Debian/Ubuntu you need to install first the *python-dev* package. + $ apt update + $ apt upgrade + $ apt install clang python + $ pip install fastapi uvicorn jinja2 + $ pip install glances -Puppet ------- - -You can install Glances using `Puppet`_: https://github.com/rverchere/puppet-glances - -Usage -===== - -For the standalone mode, just run: +And start Glances: .. code-block:: console $ glances +You can also run Glances in server mode (-s or -w) in order to remotely +monitor your Android device. -For the Web server mode, run: +Source +------ + +To install Glances from source: .. code-block:: console - $ glances -w + $ pip install https://github.com/nicolargo/glances/archive/vX.Y.tar.gz -and enter the URL http://:61208 in your favorite Web Browser. +*Note*: Python headers are required to install psutil. -For the client/server mode, run: +Chef +---- -.. code-block:: console +An awesome ``Chef`` cookbook is available to monitor your infrastructure: +https://supermarket.chef.io/cookbooks/glances (thanks to Antoine Rouyer) - $ glances -s +Puppet +------ -on the server side and run: +You can install Glances using ``Puppet``: https://github.com/rverchere/puppet-glances -.. code-block:: console +Ansible +------- - $ glances -c +A Glances ``Ansible`` role is available: https://galaxy.ansible.com/zaxos/glances-ansible-role/ -on the client one. +Shell tab completion 🔍 +======================= -And RTFM, always. +Glances 4.3.2 and higher includes shell tab autocompletion thanks to the --print-completion option. -Documentation -============= +For example, on a Linux operating system with bash shell: -For complete documentation see `glances-doc`_. +.. code-block:: console -Author -====== + $ mkdir -p ${XDG_DATA_HOME:="$HOME/.local/share"}/bash-completion + $ glances --print-completion bash > ${XDG_DATA_HOME:="$HOME/.local/share"}/bash-completion/glances + $ source ${XDG_DATA_HOME:="$HOME/.local/share"}/bash-completion/glances + +Following shells are supported: bash, zsh and tcsh. + +Requirements 🧩 +=============== + +Glances is developed in Python. A minimal Python version 3.10 or higher +should be installed on your system. + +*Note for Python 2 users* + +Glances version 4 or higher do not support Python 2 (and Python 3 < 3.10). +Please uses Glances version 3.4.x if you need Python 2 support. + +Dependencies: + +- ``psutil`` (better with latest version) +- ``defusedxml`` (in order to monkey patch xmlrpc) +- ``packaging`` (for the version comparison) +- ``windows-curses`` (Windows Curses implementation) [Windows-only] +- ``shtab`` (Shell autocompletion) [All but Windows] +- ``jinja2`` (for fetch mode and templating) + +Extra dependencies: + +- ``batinfo`` (for battery monitoring) +- ``bernhard`` (for the Riemann export module) +- ``cassandra-driver`` (for the Cassandra export module) +- ``chevron`` (for the action script feature) +- ``docker`` (for the Containers Docker monitoring support) +- ``elasticsearch`` (for the Elastic Search export module) +- ``FastAPI`` and ``Uvicorn`` (for Web server mode) +- ``mcp`` (for the MCP server — AI assistant integration) +- ``graphitesender`` (For the Graphite export module) +- ``hddtemp`` (for HDD temperature monitoring support) [Linux-only] +- ``influxdb`` (for the InfluxDB version 1 export module) +- ``influxdb-client`` (for the InfluxDB version 2 export module) +- ``kafka-python`` (for the Kafka export module) +- ``nats-py`` (for the NATS export module) +- ``nvidia-ml-py`` (for the GPU plugin) +- ``pycouchdb`` (for the CouchDB export module) +- ``pika`` (for the RabbitMQ/ActiveMQ export module) +- ``podman`` (for the Containers Podman monitoring support) +- ``potsdb`` (for the OpenTSDB export module) +- ``prometheus_client`` (for the Prometheus export module) +- ``psycopg[binary]`` (for the PostgreSQL/TimeScale export module) +- ``pygal`` (for the graph export module) +- ``pymdstat`` (for RAID support) [Linux-only] +- ``pymongo`` (for the MongoDB export module) +- ``pysnmp-lextudio`` (for SNMP support) +- ``pySMART.smartx`` (for HDD Smart support) [Linux-only] +- ``pyzmq`` (for the ZeroMQ export module) +- ``requests`` (for the Ports, Cloud plugins and RESTful export module) +- ``sparklines`` (for the Quick Plugin sparklines option) +- ``statsd`` (for the StatsD export module) +- ``wifi`` (for the wifi plugin) [Linux-only] +- ``zeroconf`` (for the autodiscover mode) + +How to contribute ? 🤝 +====================== + +If you want to contribute to the Glances project, read this `wiki`_ page. + +There is also a chat dedicated to the Glances developers: + +.. image:: https://badges.gitter.im/Join%20Chat.svg + :target: https://gitter.im/nicolargo/glances?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge + +Project sponsorship 🙌 +====================== + +You can help me to achieve my goals of improving this open-source project +or just say "thank you" by: + +- sponsor me using one-time or monthly tier Github sponsors_ page +- send me some pieces of bitcoin: 185KN9FCix3svJYp7JQM7hRMfSKyeaJR4X +- buy me a gift on my wishlist_ page + +Any and all contributions are greatly appreciated. + +Authors and Contributors 🔥 +=========================== Nicolas Hennion (@nicolargo) -License -======= - -LGPL. See ``COPYING`` for more details. - -.. _psutil: https://code.google.com/p/psutil/ -.. _@nicolargo: https://twitter.com/nicolargo -.. _@glances_system: https://twitter.com/glances_system -.. _PyPI: https://pypi.python.org/pypi -.. _pip: http://www.pip-installer.org/ -.. _Homebrew: http://brew.sh/ -.. _MacPorts: https://www.macports.org/ -.. _Glances-1.7.2-win32.msi: http://glances.s3.amazonaws.com/Glances-1.7.2-win32.msi -.. _colorconsole: https://pypi.python.org/pypi/colorconsole -.. _Puppet: https://puppetlabs.com/puppet/what-is-puppet/ -.. _glances-doc: https://github.com/nicolargo/glances/blob/master/docs/glances-doc.rst +.. image:: https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40nicolargo + :target: https://twitter.com/nicolargo + +License 📜 +========== + +Glances is distributed under the LGPL version 3 license. See ``COPYING`` for more details. + +More stars ! 🌟 +=============== + +Please give us a star on `GitHub`_ if you like this project. + +.. image:: https://api.star-history.com/svg?repos=nicolargo/glances&type=Date + :target: https://www.star-history.com/#nicolargo/glances&Date + :alt: Star history + +.. _psutil: https://github.com/giampaolo/psutil +.. _Brew: https://formulae.brew.sh/formula/glances +.. _Python: https://www.python.org/getit/ +.. _Termux: https://play.google.com/store/apps/details?id=com.termux +.. _readthedocs: https://glances.readthedocs.io/ +.. _forum: https://www.reddit.com/r/glances/ +.. _wiki: https://github.com/nicolargo/glances/wiki/How-to-contribute-to-Glances-%3F +.. _package: https://repology.org/project/glances/versions +.. _sponsors: https://github.com/sponsors/nicolargo +.. _wishlist: https://www.amazon.fr/hz/wishlist/ls/BWAAQKWFR3FI?ref_=wl_share +.. _Uv: https://docs.astral.sh/uv/getting-started/installation/ +.. _Docker: https://github.com/nicolargo/glances/blob/master/docs/docker.rst +.. _GitHub: https://github.com/nicolargo/glances +.. _PythonApi: https://glances.readthedocs.io/en/develop/api/python.html +.. _RestfulApi: https://glances.readthedocs.io/en/develop/api/restful.html +.. _McpApi: https://glances.readthedocs.io/en/develop/api/mcp.html +.. _`MCP (Model Context Protocol)`: https://modelcontextprotocol.io +.. _FAQ: https://github.com/nicolargo/glances/blob/develop/docs/faq.rst +.. _Discussions: https://github.com/nicolargo/glances/discussions diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..7b112925a2 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,30 @@ +# Security Policy + +## Supported Versions + +| Version | Support security updates | +| ------- | ------------------------ | +| 4.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +If there are any vulnerabilities in {{cookiecutter.project_name}}, don't hesitate to report them. + + 1. Describe the vulnerability. + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + + 2. If you have a fix, that is most welcome -- please attach or summarize it in your message! + + 3. We will evaluate the vulnerability and, if necessary, release a fix or mitigating steps to address it. We will contact you to let you know the outcome, and will credit you in the report. + + 4. Please do not disclose the vulnerability publicly until a fix is released! + +Once we have either a) published a fix, or b) declined to address the vulnerability for whatever reason, you are free to publicly disclose it. diff --git a/all-requirements.txt b/all-requirements.txt new file mode 100644 index 0000000000..ba176bed07 --- /dev/null +++ b/all-requirements.txt @@ -0,0 +1,301 @@ +# This file was autogenerated by uv via the following command: +# uv export --no-emit-workspace --no-hashes --all-extras --no-group dev --output-file all-requirements.txt +annotated-doc==0.0.4 + # via fastapi +annotated-types==0.7.0 + # via pydantic +anyio==4.12.1 + # via + # elasticsearch + # httpx + # mcp + # sse-starlette + # starlette +attrs==25.4.0 + # via + # jsonschema + # referencing +batinfo==0.4.2 ; sys_platform == 'linux' + # via glances +bernhard==0.2.6 + # via glances +certifi==2026.2.25 + # via + # elastic-transport + # httpcore + # httpx + # influxdb-client + # influxdb3-python + # requests +cffi==2.0.0 ; implementation_name == 'pypy' or platform_python_implementation != 'PyPy' + # via + # cryptography + # pyzmq +chardet==7.0.1 + # via pysmart +charset-normalizer==3.4.5 + # via requests +chevron==0.14.0 + # via glances +click==8.1.8 + # via uvicorn +colorama==0.4.6 ; sys_platform == 'win32' + # via click +cryptography==46.0.5 + # via + # pyjwt + # pysnmpcrypto + # python-jose +defusedxml==0.7.1 + # via glances +dnspython==2.8.0 + # via pymongo +docker==7.1.0 + # via glances +ecdsa==0.19.1 + # via python-jose +elastic-transport==9.2.1 + # via elasticsearch +elasticsearch==9.3.0 + # via glances +exceptiongroup==1.2.2 ; python_full_version < '3.11' + # via anyio +fastapi==0.135.1 + # via glances +graphitesender==0.11.2 + # via glances +h11==0.16.0 + # via + # httpcore + # uvicorn +httpcore==1.0.9 + # via httpx +httpx==0.28.1 + # via mcp +httpx-sse==0.4.3 + # via mcp +humanfriendly==10.0 + # via pysmart +ibm-cloud-sdk-core==3.24.4 + # via ibmcloudant +ibmcloudant==0.11.4 + # via glances +idna==3.11 + # via + # anyio + # httpx + # requests +ifaddr==0.2.0 + # via zeroconf +importlib-metadata==8.7.1 + # via pygal +influxdb==5.3.2 + # via glances +influxdb-client==1.50.0 + # via glances +influxdb3-python==0.18.0 + # via glances +jinja2==3.1.6 + # via + # glances + # pysmi-lextudio +jsonschema==4.25.1 + # via mcp +jsonschema-specifications==2025.9.1 + # via jsonschema +kafka-python==2.3.0 + # via glances +markupsafe==3.0.3 + # via jinja2 +mcp==1.23.3 + # via glances +msgpack==1.1.2 + # via influxdb +nats-py==2.14.0 + # via glances +nvidia-ml-py==13.590.48 + # via glances +packaging==26.0 + # via glances +paho-mqtt==2.1.0 + # via glances +pbkdf2==1.3 + # via wifi +pika==1.3.2 + # via glances +ply==3.11 + # via pysmi-lextudio +podman==5.7.0 + # via glances +potsdb==1.0.3 + # via glances +prometheus-client==0.24.1 + # via glances +protobuf==6.33.5 + # via bernhard +psutil==7.2.2 + # via glances +psycopg==3.3.3 + # via glances +psycopg-binary==3.3.3 ; implementation_name != 'pypy' + # via psycopg +pyarrow==23.0.1 + # via influxdb3-python +pyasn1==0.6.2 + # via + # pysnmp-lextudio + # python-jose + # rsa +pycparser==3.0 ; (implementation_name != 'PyPy' and platform_python_implementation != 'PyPy') or (implementation_name == 'pypy' and platform_python_implementation == 'PyPy') + # via cffi +pydantic==2.12.5 + # via + # fastapi + # mcp + # pydantic-settings +pydantic-core==2.41.5 + # via pydantic +pydantic-settings==2.13.1 + # via mcp +pygal==3.1.0 + # via glances +pyinstrument==5.1.2 + # via glances +pyjwt==2.11.0 + # via + # ibm-cloud-sdk-core + # ibmcloudant + # mcp +pymdstat==0.5.1 + # via glances +pymongo==4.16.0 + # via glances +pyreadline3==3.5.4 ; sys_platform == 'win32' + # via humanfriendly +pysmart==1.4.2 + # via glances +pysmi-lextudio==1.4.3 + # via pysnmp-lextudio +pysnmp-lextudio==6.1.2 + # via glances +pysnmpcrypto==0.0.4 + # via pysnmp-lextudio +python-dateutil==2.9.0.post0 + # via + # elasticsearch + # glances + # ibm-cloud-sdk-core + # ibmcloudant + # influxdb + # influxdb-client + # influxdb3-python +python-dotenv==1.2.2 + # via pydantic-settings +python-jose==3.5.0 + # via glances +python-multipart==0.0.22 + # via mcp +pytz==2026.1.post1 + # via influxdb +pywin32==311 ; sys_platform == 'win32' + # via + # docker + # mcp +pyzmq==27.1.0 + # via glances +reactivex==4.1.0 + # via + # influxdb-client + # influxdb3-python +referencing==0.37.0 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.5 + # via + # docker + # glances + # ibm-cloud-sdk-core + # ibmcloudant + # influxdb + # podman + # pysmi-lextudio +rpds-py==0.30.0 + # via + # jsonschema + # referencing +rsa==4.9.1 + # via python-jose +setuptools==82.0.0 + # via wifi +shtab==1.8.0 ; sys_platform != 'win32' + # via glances +six==1.17.0 + # via + # ecdsa + # glances + # influxdb + # python-dateutil +sniffio==1.3.1 + # via + # elastic-transport + # elasticsearch +sparklines==0.7.0 + # via glances +sse-starlette==3.3.2 + # via mcp +starlette==0.52.1 + # via + # fastapi + # mcp + # sse-starlette +statsd==4.0.1 + # via glances +termcolor==3.3.0 + # via sparklines +tomli==2.0.2 ; python_full_version < '3.11' + # via podman +typing-extensions==4.15.0 + # via + # anyio + # cryptography + # elasticsearch + # fastapi + # mcp + # psycopg + # pydantic + # pydantic-core + # reactivex + # referencing + # starlette + # typing-inspection + # uvicorn +typing-inspection==0.4.2 + # via + # fastapi + # mcp + # pydantic + # pydantic-settings +tzdata==2025.3 ; sys_platform == 'win32' + # via psycopg +urllib3==2.6.3 + # via + # docker + # elastic-transport + # ibm-cloud-sdk-core + # influxdb-client + # influxdb3-python + # podman + # requests +uvicorn==0.41.0 + # via + # glances + # mcp +wifi==0.3.8 + # via glances +windows-curses==2.4.1 ; sys_platform == 'win32' + # via glances +zeroconf==0.148.0 + # via glances +zipp==3.23.0 + # via importlib-metadata diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..e006979aec --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,18 @@ +image: Visual Studio 2022 + +environment: + matrix: + - PYTHON: "C:\\Python310-x64" + - PYTHON: "C:\\Python311-x64" + - PYTHON: "C:\\Python312-x64" + +install: + - "%PYTHON%\\python.exe -m pip install --upgrade pip" + - "%PYTHON%\\python.exe -m pip install -r requirements.txt" + - "%PYTHON%\\python.exe -m pip install -r dev-requirements.txt" + - "%PYTHON%\\python.exe -m pip install \".[web]\"" + +build: off + +test_script: + - "%PYTHON%\\python.exe -m pytest tests/" diff --git a/conf/empty.conf b/conf/empty.conf new file mode 100644 index 0000000000..f2548e6cd9 --- /dev/null +++ b/conf/empty.conf @@ -0,0 +1 @@ +# Empty conf, only for test diff --git a/conf/fetch-templates/short.jinja b/conf/fetch-templates/short.jinja new file mode 100644 index 0000000000..a58df8ddd1 --- /dev/null +++ b/conf/fetch-templates/short.jinja @@ -0,0 +1,9 @@ +✨ {{ gl.system['hostname'] }}{{ ' - ' + gl.ip['address'] if gl.ip['address'] else '' }} +⚙️ {{ gl.system['hr_name'] }} | Uptime: {{ gl.uptime }} + +💡 LOAD {{ '%0.2f'| format(gl.load['min1']) }} {{ '%0.2f'| format(gl.load['min5']) }} {{ '%0.2f'| format(gl.load['min15']) }} +⚡ CPU {{ gl.bar(gl.cpu['total']) }} {{ gl.cpu['total'] }}% of {{ gl.core['log'] }} cores +🧠 MEM {{ gl.bar(gl.mem['percent']) }} {{ gl.mem['percent'] }}% ({{ gl.auto_unit(gl.mem['used']) }} {{ gl.auto_unit(gl.mem['total']) }}) +{% for fs in gl.fs.keys() %}💾 {% if loop.index == 1 %}DISK{% else %} {% endif %} {{ gl.bar(gl.fs[fs]['percent']) }} {{ gl.fs[fs]['percent'] }}% ({{ gl.auto_unit(gl.fs[fs]['used']) }} {{ gl.auto_unit(gl.fs[fs]['size']) }}) for {{ fs }} +{% endfor %}{% for net in gl.network.keys() %}📡 {% if loop.index == 1 %}NET{% else %} {% endif %} ↓ {{ gl.auto_unit(gl.network[net]['bytes_recv_rate_per_sec']) }}b/s ↑ {{ gl.auto_unit(gl.network[net]['bytes_sent_rate_per_sec']) }}b/s for {{ net }} +{% endfor %} diff --git a/conf/fetch-templates/with-logo.jinja b/conf/fetch-templates/with-logo.jinja new file mode 100644 index 0000000000..d58083a7b6 --- /dev/null +++ b/conf/fetch-templates/with-logo.jinja @@ -0,0 +1,23 @@ + _____ _ + / ____| | + | | __| | __ _ _ __ ___ ___ ___ + | | |_ | |/ _` | '_ \ / __/ _ \/ __| + | |__| | | (_| | | | | (_| __/\__ + \_____|_|\__,_|_| |_|\___\___||___/ + + +✨ {{ gl.system['hostname'] }}{{ ' - ' + gl.ip['address'] if gl.ip['address'] else '' }} +⚙️ {{ gl.system['hr_name'] }} | Uptime: {{ gl.uptime }} + +💡 LOAD {{ '%0.2f'| format(gl.load['min1']) }} {{ '%0.2f'| format(gl.load['min5']) }} {{ '%0.2f'| format(gl.load['min15']) }} +⚡ CPU {{ gl.bar(gl.cpu['total']) }} {{ gl.cpu['total'] }}% of {{ gl.core['log'] }} cores +🧠 MEM {{ gl.bar(gl.mem['percent']) }} {{ gl.mem['percent'] }}% ({{ gl.auto_unit(gl.mem['used']) }} {{ gl.auto_unit(gl.mem['total']) }}) +{% for fs in gl.fs.keys() %}💾 {% if loop.index == 1 %}DISK{% else %} {% endif %} {{ gl.bar(gl.fs[fs]['percent']) }} {{ gl.fs[fs]['percent'] }}% ({{ gl.auto_unit(gl.fs[fs]['used']) }} {{ gl.auto_unit(gl.fs[fs]['size']) }}) for {{ fs }} +{% endfor %}{% for net in gl.network.keys() %}📡 {% if loop.index == 1 %}NET{% else %} {% endif %} ↓ {{ gl.auto_unit(gl.network[net]['bytes_recv_rate_per_sec']) }}b/s ↑ {{ gl.auto_unit(gl.network[net]['bytes_sent_rate_per_sec']) }}b/s for {{ net }} +{% endfor %} +🔥 TOP PROCESS by CPU +{% for process in gl.top_process() %}{{ loop.index }}️⃣ {{ process['name'][:20] }}{{ ' ' * (20 - process['name'][:20] | length) }} ⚡ {{ process['cpu_percent'] }}% CPU{{ ' ' * (8 - (gl.auto_unit(process['cpu_percent']) | length)) }} 🧠 {{ gl.auto_unit(process['memory_info']['rss']) }}B MEM +{% endfor %} +🔥 TOP PROCESS by MEM +{% for process in gl.top_process(sorted_by='memory_percent', sorted_by_secondary='cpu_percent') %}{{ loop.index }}️⃣ {{ process['name'][:20] }}{{ ' ' * (20 - process['name'][:20] | length) }} 🧠 {{ gl.auto_unit(process['memory_info']['rss']) }}B MEM{{ ' ' * (7 - (gl.auto_unit(process['memory_info']['rss']) | length)) }} ⚡ {{ process['cpu_percent'] }}% CPU +{% endfor %} \ No newline at end of file diff --git a/conf/glances-grafana-flux.json b/conf/glances-grafana-flux.json new file mode 100644 index 0000000000..9e6aa4ad72 --- /dev/null +++ b/conf/glances-grafana-flux.json @@ -0,0 +1,2297 @@ +{ + "__inputs": [ + { + "name": "DS_GLANCES", + "label": "glances", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.2.5" + }, + { + "type": "panel", + "id": "heatmap", + "name": "Heatmap", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "iteration": 1638092370245, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 29, + "panels": [], + "title": "Glances $host", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "${DS_GLANCES}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 5, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "column": "cpucore", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + } + ], + "measurement": "load", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"cpucore\" and\n r.hostname == \"${host}\"\n )\n |> last()", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["cpucore"], + "type": "field" + }, + { + "params": [], + "type": "max" + } + ] + ], + "series": "load", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "title": "Core", + "type": "stat" + }, + { + "datasource": "${DS_GLANCES}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 20, + "x": 2, + "y": 1 + }, + "id": 4, + "links": [], + "options": { + "legend": { + "calcs": ["mean", "max", "min"], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "alias": "1min", + "column": "min1", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "load", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"min5\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean5\")\n \n ", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["min1"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "load", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "randomWalk('random walk')" + }, + { + "alias": "1min", + "column": "min1", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "hide": false, + "measurement": "load", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"min15\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean15\")\n \n ", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["min1"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "load", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "randomWalk('random walk')" + }, + { + "alias": "1min", + "column": "min1", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "hide": false, + "measurement": "load", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"min1\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean1\")\n \n ", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["min1"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "load", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "randomWalk('random walk')" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Load", + "type": "timeseries" + }, + { + "cacheTimeout": null, + "datasource": "${DS_GLANCES}", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 2, + "x": 22, + "y": 1 + }, + "id": 18, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["mean"], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "column": "total", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + } + ], + "measurement": "processcount", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"processcount\" and\n r._field == \"total\" and\n r.hostname == \"${host}\"\n )\n |> last()", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["total"], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "series": "processcount", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "title": "Processes", + "type": "stat" + }, + { + "datasource": "${DS_GLANCES}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 6, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "alias": "User", + "column": "user", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "cpu", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"user\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"user\")\n \n ", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["user"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "cpu", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + }, + { + "alias": "System", + "column": "system", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "cpu", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"system\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"system\")\n \n ", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["system"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "cpu", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + }, + { + "alias": "IoWait", + "column": "iowait", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "cpu", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"iowait\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"iowait\")\n \n ", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["iowait"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "cpu", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU (%)", + "type": "timeseries" + }, + { + "datasource": "${DS_GLANCES}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/.*total./" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + }, + { + "id": "custom.lineWidth", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/^used.*$/" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 30 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 7 + }, + "id": 7, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "alias": "Used", + "column": "used", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "mem", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"mem\" and\n r._field == \"used\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"used\")\n \n ", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["used"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "mem", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + }, + { + "alias": "Max", + "column": "total", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "mem", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"mem\" and\n r._field == \"total\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"total\")\n \n ", + "rawQuery": false, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["total"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "mem", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "MEM", + "type": "timeseries" + }, + { + "datasource": "${DS_GLANCES}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 9, + "links": [], + "options": { + "legend": { + "calcs": ["mean", "max", "min"], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "alias": "In", + "column": "enp0s25.rx", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["null"], + "type": "fill" + } + ], + "hide": false, + "interval": "", + "measurement": "$host.network", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"network\" and\n (r._field == \"rx\" or r._field == \"time_since_update\") and\n r.interface_name == \"${interface}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.rx / r.time_since_update) * 8.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"rx_rate\"})\n", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["eth0.rx"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "network", + "tags": [] + }, + { + "alias": "Out", + "column": "eth0.tx*-1", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["null"], + "type": "fill" + } + ], + "measurement": "$host.network", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"network\" and\n (r._field == \"tx\" or r._field == \"time_since_update\") and\n r.interface_name == \"${interface}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.tx / r.time_since_update) * -8.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"tx_rate\"})\n", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["eth0.tx"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "network", + "tags": [], + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "$interface network interface", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": "${DS_GLANCES}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/total.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + }, + { + "id": "custom.lineWidth", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/used.*/" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 30 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 8, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "alias": "Used", + "column": "used", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + } + ], + "measurement": "$host.memswap", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"memswap\" and\n r._field == \"used\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"used\")\n ", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["used"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "memswap", + "tags": [] + }, + { + "alias": "Max", + "column": "total", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + } + ], + "measurement": "$host.memswap", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"memswap\" and\n r._field == \"total\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"total\")\n \n ", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["total"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "memswap", + "tags": [], + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "SWAP", + "type": "timeseries" + }, + { + "datasource": "${DS_GLANCES}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 15, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 21 + }, + "id": 10, + "links": [], + "options": { + "legend": { + "calcs": ["mean", "max", "min"], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "alias": "Read", + "column": "sda2.read_bytes", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "$host.diskio", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"diskio\" and\n (r._field == \"read_bytes\" or r._field == \"time_since_update\") and\n r.disk_name == \"${disk}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.read_bytes / r.time_since_update) }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"read_rate\"})\n", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["sda2.read_bytes"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "diskio", + "tags": [] + }, + { + "alias": "Write", + "column": "sda2.write_bytes", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "$host.diskio", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"diskio\" and\n (r._field == \"write_bytes\" or r._field == \"time_since_update\") and\n r.disk_name == \"${disk}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.write_bytes / r.time_since_update) * -1.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"write_rate\"})\n", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["sda2.write_bytes"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "diskio", + "tags": [], + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "$disk disk IO", + "type": "timeseries" + }, + { + "datasource": "${DS_GLANCES}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 3, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#BF1B00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 100 + }, + { + "id": "custom.fillOpacity", + "value": 80 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 10, + "x": 12, + "y": 21 + }, + "id": 11, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "alias": "Used", + "column": "\"/.used\"", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "fs", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"fs\" and\n r._field == \"used\" and\n r.mnt_point == \"/\" and \n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"used\")\n \n ", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["used"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "fs", + "tags": [ + { + "key": "mnt_point", + "operator": "=", + "value": "/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + }, + { + "alias": "Max", + "column": "\"/.size\"", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "fs", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"fs\" and\n r._field == \"size\" and\n r.mnt_point == \"/\" and \n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"size\")\n \n ", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["size"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "fs", + "tags": [ + { + "key": "mnt_point", + "operator": "=", + "value": "/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "/ Size", + "type": "timeseries" + }, + { + "cacheTimeout": null, + "datasource": "${DS_GLANCES}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(71, 212, 59, 0.4)", + "value": null + }, + { + "color": "rgba(245, 150, 40, 0.73)", + "value": 70 + }, + { + "color": "rgba(225, 40, 40, 0.59)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 22, + "y": 21 + }, + "id": 16, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["mean"], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.5", + "targets": [ + { + "column": "\"/.percent\"", + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + } + ], + "measurement": "fs", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"fs\" and\n r._field == \"percent\" and\n r.mnt_point == \"/\" and \n r.hostname == \"${host}\"\n )\n |> last()\n", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["percent"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "fs", + "tags": [ + { + "key": "mnt_point", + "operator": "=", + "value": "/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "title": "/ used", + "type": "stat" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 33, + "panels": [], + "title": "Sensors $host", + "type": "row" + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "rgb(255, 0, 0)", + "colorScale": "sqrt", + "colorScheme": "interpolateReds", + "exponent": 1, + "min": null, + "mode": "opacity" + }, + "dataFormat": "timeseries", + "datasource": "${DS_GLANCES}", + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 29 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 21, + "legend": { + "show": false + }, + "links": [], + "reverseYBuckets": false, + "targets": [ + { + "alias": "AmbientTemperature", + "dsType": "influxdb", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["null"], + "type": "fill" + } + ], + "measurement": "sensors", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"sensors\" and\n r._field == \"value\" and\n r.label == \"Ambient\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"Ambient\")\n \n ", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["value"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "label", + "operator": "=", + "value": "Ambient" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "title": "Ambient temperature", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "celsius", + "logBase": 1, + "max": null, + "min": "0", + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "rgb(255, 0, 0)", + "colorScale": "sqrt", + "colorScheme": "interpolateOranges", + "exponent": 1, + "mode": "opacity" + }, + "dataFormat": "timeseries", + "datasource": "${DS_GLANCES}", + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 29 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 23, + "legend": { + "show": false + }, + "links": [], + "reverseYBuckets": false, + "targets": [ + { + "alias": "CpuTemperature", + "dsType": "influxdb", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["null"], + "type": "fill" + } + ], + "measurement": "sensors", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"sensors\" and\n r._field == \"value\" and\n r.label == \"CPU\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"Ambient\")\n \n ", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["value"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "label", + "operator": "=", + "value": "CPU" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "title": "CPU temperature", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "celsius", + "logBase": 1, + "max": null, + "min": "0", + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 35 + }, + "id": 37, + "panels": [], + "title": "Containers hosted on $host", + "type": "row" + }, + { + "datasource": "${DS_GLANCES}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "cpu_percent" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#cca300", + "mode": "fixed" + } + }, + { + "id": "unit", + "value": "percent" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "memory_usage" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#2f575e", + "mode": "fixed" + } + }, + { + "id": "unit", + "value": "decbytes" + }, + { + "id": "custom.fillOpacity", + "value": 36 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 36 + }, + "id": 25, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.5", + "repeat": "container", + "repeatDirection": "v", + "targets": [ + { + "alias": "MEM", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "hide": false, + "measurement": "containers", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"containers\" and\n r._field == \"memory_usage\" and\n r.name == \"${container}\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"MEM\")\n \n ", + "rawQuery": false, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["memory_usage"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$container$/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + }, + { + "alias": "CPU%", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "hide": false, + "measurement": "containers", + "orderByTime": "ASC", + "policy": "default", + "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"containers\" and\n r._field == \"cpu_percent\" and\n r.name == \"${container}\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"CPU%\")\n \n ", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["cpu_percent"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$container$/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "$container container", + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 32, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "${DS_GLANCES}", + "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"hostname\",\n predicate: (r) => true,\n start: -1d\n)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "host", + "options": [], + "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"hostname\",\n predicate: (r) => true,\n start: -1d\n)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_GLANCES}", + "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"name\",\n predicate: (r) => true,\n start: -1d\n)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "container", + "options": [], + "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"name\",\n predicate: (r) => true,\n start: -1d\n)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_GLANCES}", + "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"interface_name\",\n predicate: (r) => true,\n start: -1d\n)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "interface", + "options": [], + "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"interface_name\",\n predicate: (r) => true,\n start: -1d\n)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_GLANCES}", + "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"disk_name\",\n predicate: (r) => true,\n start: -1d\n)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "disk", + "options": [], + "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"disk_name\",\n predicate: (r) => true,\n start: -1d\n)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "collapse": false, + "enable": true, + "notice": false, + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "status": "Stable", + "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"], + "type": "timepicker" + }, + "timezone": "browser", + "title": "Glances For FLUX", + "uid": "ESYAe0tnk", + "version": 21 +} diff --git a/conf/glances-grafana-influxql.json b/conf/glances-grafana-influxql.json new file mode 100644 index 0000000000..e4e70c6e4f --- /dev/null +++ b/conf/glances-grafana-influxql.json @@ -0,0 +1,2655 @@ +{ + "__inputs": [ + { + "name": "DS_GLANCES", + "label": "glances", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + }, + { + "name": "DS_LSAT1", + "label": "lsat1", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.4.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 2, + "x": 0, + "y": 0 + }, + "id": 5, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["mean"], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "column": "cpucore", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + } + ], + "measurement": "load", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"cpucore\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["cpucore"], + "type": "field" + }, + { + "params": [], + "type": "max" + } + ] + ], + "series": "load", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "title": "Core", + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 20, + "x": 2, + "y": 0 + }, + "id": 4, + "options": { + "legend": { + "calcs": ["mean", "max", "min"], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "alias": "1min", + "column": "min1", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "load", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"min1\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval) fill(null)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["min1"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "load", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "randomWalk('random walk')" + }, + { + "alias": "5mins", + "column": "min5", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "load", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"min5\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval) fill(null)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["min5"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "load", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + }, + { + "alias": "15mins", + "column": "min15", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "load", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"min15\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval) fill(null)", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["min15"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "load", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + } + ], + "title": "Load", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 2, + "x": 22, + "y": 0 + }, + "id": 18, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["mean"], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "column": "total", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + } + ], + "measurement": "processcount", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"total\") FROM \"$host.processcount\" WHERE $timeFilter GROUP BY time($interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["total"], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "series": "processcount", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "title": "Processes", + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "alias": "User", + "column": "user", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "cpu", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"user\") FROM \"$host.cpu\" WHERE $timeFilter GROUP BY time($interval) fill(null)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["user"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "cpu", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + }, + { + "alias": "System", + "column": "system", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "cpu", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"system\") FROM \"$host.cpu\" WHERE $timeFilter GROUP BY time($interval) fill(null)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["system"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "cpu", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + }, + { + "alias": "IoWait", + "column": "iowait", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "cpu", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"iowait\") FROM \"$host.cpu\" WHERE $timeFilter GROUP BY time($interval) fill(null)", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["iowait"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "cpu", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + } + ], + "title": "CPU (%)", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#BF1B00", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "alias": "Used", + "column": "used", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "mem", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"used\") FROM \"mem\" WHERE (\"hostname\" =~ /^$host$/) AND $timeFilter GROUP BY time($__interval) fill(none)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["used"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "mem", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + }, + { + "alias": "Max", + "column": "total", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "mem", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"total\") FROM \"mem\" WHERE $timeFilter GROUP BY time($__interval) fill(none)", + "rawQuery": false, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["total"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "mem", + "tags": [ + { + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + } + ], + "title": "MEM", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 9, + "options": { + "legend": { + "calcs": ["mean", "max", "min"], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "alias": "In", + "column": "enp0s25.rx", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["null"], + "type": "fill" + } + ], + "interval": "", + "measurement": "$host.network", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"rx\")/mean(\"time_since_update\")*8 FROM \"network\" WHERE (\"hostname\" =~ /^$host$/) AND (\"interface_name\" =~ /^$interface$/) AND $timeFilter GROUP BY time($interval) fill(none)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["eth0.rx"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "network", + "tags": [] + }, + { + "alias": "Out", + "column": "eth0.tx*-1", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["null"], + "type": "fill" + } + ], + "measurement": "$host.network", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"tx\")/mean(\"time_since_update\")*-8 FROM \"network\" WHERE (\"hostname\" =~ /^$host$/) AND (\"interface_name\" =~ /^$interface$/) AND $timeFilter GROUP BY time($interval) fill(none)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["eth0.tx"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "network", + "tags": [], + "target": "" + } + ], + "title": "$interface network interface", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#BF1B00", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "alias": "Used", + "column": "used", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + } + ], + "measurement": "$host.memswap", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"used\") FROM \"memswap\" WHERE (\"hostname\" =~ /^$host$/) AND $timeFilter GROUP BY time($__interval) fill(none)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["used"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "memswap", + "tags": [] + }, + { + "alias": "Max", + "column": "total", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + } + ], + "measurement": "$host.memswap", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"total\") FROM \"memswap\" WHERE (\"hostname\" =~ /^$host$/) AND $timeFilter GROUP BY time($__interval) fill(none)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["total"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "memswap", + "tags": [], + "target": "" + } + ], + "title": "SWAP", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 10, + "options": { + "legend": { + "calcs": ["mean", "max", "min"], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "alias": "Read", + "column": "sda2.read_bytes", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "$host.diskio", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"read_bytes\")/mean(\"time_since_update\") FROM \"diskio\" WHERE (\"hostname\" =~ /^$host$/) AND (\"disk_name\" =~ /^$disk$/) AND $timeFilter GROUP BY time($__interval) fill(none)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["sda2.read_bytes"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "diskio", + "tags": [] + }, + { + "alias": "Write", + "column": "sda2.write_bytes", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "$host.diskio", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"write_bytes\")/mean(\"time_since_update\") FROM \"diskio\" WHERE (\"hostname\" =~ /^$host$/) AND (\"disk_name\" =~ /^$disk$/) AND $timeFilter GROUP BY time($__interval) fill(none)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["sda2.write_bytes"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "diskio", + "tags": [], + "target": "" + } + ], + "title": "$disk disk IO", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 3, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#BF1B00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 100 + }, + { + "id": "custom.fillOpacity", + "value": 80 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 12, + "y": 20 + }, + "id": 11, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "alias": "Used", + "column": "\"/.used\"", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "fs", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"/.used\") FROM \"$host.fs\" WHERE $timeFilter GROUP BY time($interval) fill(null)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["used"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "fs", + "tags": [ + { + "key": "mnt_point", + "operator": "=", + "value": "/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + }, + { + "alias": "Max", + "column": "\"/.size\"", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "measurement": "fs", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"/.size\") FROM \"$host.fs\" WHERE $timeFilter GROUP BY time($interval) fill(null)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["size"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "fs", + "tags": [ + { + "key": "mnt_point", + "operator": "=", + "value": "/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ], + "target": "" + } + ], + "title": "/ Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(71, 212, 59, 0.4)", + "value": null + }, + { + "color": "rgba(245, 150, 40, 0.73)", + "value": 70 + }, + { + "color": "rgba(225, 40, 40, 0.59)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 20, + "y": 20 + }, + "id": 16, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["mean"], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "column": "\"/.percent\"", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + } + ], + "measurement": "fs", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"/.percent\") FROM \"$host.fs\" WHERE $timeFilter GROUP BY time($interval)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["percent"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "fs", + "tags": [ + { + "key": "mnt_point", + "operator": "=", + "value": "/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "title": "/ used", + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(71, 212, 59, 0.4)", + "value": null + }, + { + "color": "rgba(245, 150, 40, 0.73)", + "value": 70 + }, + { + "color": "rgba(225, 40, 40, 0.59)", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 22, + "y": 20 + }, + "id": 17, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["mean"], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "column": "\"/home.percent\"", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "function": "mean", + "groupBy": [ + { + "params": ["auto"], + "type": "time" + } + ], + "measurement": "fs", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"percent\") FROM \"fs\" WHERE (\"hostname\" =~ /^$host$/) AND (\"mnt_point\" = '/boot') AND $timeFilter GROUP BY time($__interval)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["percent"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "series": "fs", + "tags": [ + { + "key": "mnt_point", + "operator": "=", + "value": "/boot" + } + ] + } + ], + "title": "/boot used", + "type": "stat" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_LSAT1}" + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 22, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "markdown" + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_LSAT1}" + }, + "refId": "A" + } + ], + "title": "Sensors", + "type": "text" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "celsius" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 30 + }, + "id": 21, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "alias": "$tag_label", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["label::tag"], + "type": "tag" + }, + { + "params": ["null"], + "type": "fill" + } + ], + "measurement": "sensors", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["value"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "type", + "operator": "=~", + "value": "/^SensorType.CPU_TEMP$/" + } + ] + } + ], + "title": "CPU temperature", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "rotrpm" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 30 + }, + "id": 32, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "alias": "$tag_label", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "dsType": "influxdb", + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["label::tag"], + "type": "tag" + }, + { + "params": ["null"], + "type": "fill" + } + ], + "measurement": "sensors", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["value"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "type", + "operator": "=~", + "value": "/^SensorType.FAN_SPEED$/" + } + ] + } + ], + "title": "FAN speed", + "type": "timeseries" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_LSAT1}" + }, + "editable": true, + "error": false, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 36 + }, + "id": 13, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "markdown" + }, + "pluginVersion": "10.4.1", + "style": {}, + "targets": [ + { + "datasource": { + "type": "influxdb", + "uid": "${DS_LSAT1}" + }, + "refId": "A" + } + ], + "title": "Containers", + "type": "text" + }, + { + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "MEM" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "$host.docker.mean" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#ba43a9", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU%" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#cca300", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "MEM" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#2f575e", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "MEM" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "MEM" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 100 + }, + { + "id": "custom.fillOpacity", + "value": 80 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 39 + }, + "id": 25, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "repeat": "container", + "repeatDirection": "v", + "targets": [ + { + "alias": "CPU%", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "hide": false, + "measurement": "containers", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"cpu_percent\") FROM \"$host.docker\" WHERE $timeFilter GROUP BY time($__interval) fill(none)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["cpu_percent"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$container$/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + }, + { + "alias": "MEM", + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "groupBy": [ + { + "params": ["$__interval"], + "type": "time" + }, + { + "params": ["none"], + "type": "fill" + } + ], + "hide": false, + "measurement": "containers", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"cpu_percent\") FROM \"$host.docker\" WHERE $timeFilter GROUP BY time($__interval) fill(none)", + "rawQuery": false, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": ["memory_usage"], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$container$/" + }, + { + "condition": "AND", + "key": "hostname", + "operator": "=~", + "value": "/^$host$/" + } + ] + } + ], + "title": "$container container", + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "definition": "show tag values with key=\"hostname\"", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "host", + "options": [], + "query": "show tag values with key=\"hostname\"", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": {}, + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "definition": "show tag values with key=\"name\"", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "container", + "options": [], + "query": "show tag values with key=\"name\"", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": {}, + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "definition": "show tag values with key=\"interface_name\"", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "interface", + "options": [], + "query": "show tag values with key=\"interface_name\"", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": {}, + "datasource": { + "type": "influxdb", + "uid": "${DS_GLANCES}" + }, + "definition": "show tag values with key=\"disk_name\"", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "disk", + "options": [], + "query": "show tag values with key=\"disk_name\"", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "collapse": false, + "enable": true, + "notice": false, + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "status": "Stable", + "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"], + "type": "timepicker" + }, + "timezone": "browser", + "title": "Glances", + "uid": "000000002", + "version": 5, + "weekStart": "" +} diff --git a/conf/glances-monitor.conf b/conf/glances-monitor.conf deleted file mode 100644 index 94fb17a03b..0000000000 --- a/conf/glances-monitor.conf +++ /dev/null @@ -1,123 +0,0 @@ -[cpu] -# Default values if not defined: 50/70/90 -user_careful=50 -user_warning=70 -user_critical=90 -iowait_careful=50 -iowait_warning=70 -iowait_critical=90 -system_careful=50 -system_warning=70 -system_critical=90 -steal_careful=50 -steal_warning=70 -steal_critical=90 - -[percpu] -# Default values if not defined: 50/70/90 -user_careful=50 -user_warning=70 -user_critical=90 -iowait_careful=50 -iowait_warning=70 -iowait_critical=90 -system_careful=50 -system_warning=70 -system_critical=90 - -[load] -# Value * number of cores -# Default values if not defined: 0.7/1.0/5.0 per number of cores -# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages -# http://www.linuxjournal.com/article/9001 -careful=0.7 -warning=1.0 -critical=5.0 - -[mem] -# Default limits for free RAM memory in % -# Default values if not defined: 50/70/90 -careful=50 -warning=70 -critical=90 - -[memswap] -# Default limits for free swap memory in % -# Default values if not defined: 50/70/90 -careful=50 -warning=70 -critical=90 - -[network] -# Define the list of hidden network interfaces (comma separeted) -hide=lo -# Default limits (in bits per second aka bps) for interface bitrate -wlan0_rx_careful=4000000 -wlan0_rx_warning=5000000 -wlan0_rx_critical=6000000 -wlan0_tx_careful=700000 -wlan0_tx_warning=900000 -wlan0_tx_critical=1000000 - -[diskio] -# Define the list of hidden disks (comma separeted) -hide=sda2,sda5 - -[fs] -# Default limits for free filesytem space in % -# Default values if not defined: 50/70/90 -careful=50 -warning=70 -critical=90 - -[sensors] -# Sensors core limits -# Default values if not defined: 60/70/80 -temperature_core_careful=60 -temperature_core_warning=70 -temperature_core_critical=80 -# Temperatures in °C for hddtemp -# Default values if not defined: 45/52/60 -temperature_hdd_careful=45 -temperature_hdd_warning=52 -temperature_hdd_critical=60 -# Battery % limits -battery_careful=80 -battery_warning=90 -battery_critical=95 - -[processlist] -# Limit values for CPU/MEM per process in % -# Default values if not defined: 50/70/90 -cpu_careful=50 -cpu_warning=70 -cpu_critical=90 -mem_careful=50 -mem_warning=70 -mem_critical=90 - -[monitor] -# Define the list of processes to monitor -# *** This section is optional *** -# The list is composed of items (list_#nb <= 10) -# An item is defined: -# * description: Description of the processes (max 16 chars) -# * regex: regular expression of the processes to monitor -# * command: (optional) full path to shell command/script for extended stat -# Use with caution. Should return a single line string. -# Only execute when at least one process is running -# By default display CPU and MEM % -# Limitation: Do not use in client / server mode -# * countmin: (optional) minimal number of processes -# A warning will be displayed if number of process < count -# * countmax: (optional) maximum number of processes -# A warning will be displayed if number of process > count -list_1_description=Dropbox -list_1_regex=.*dropbox.* -list_1_countmin=1 -list_1_command=dropbox status | head -1 -list_2_description=Python programs -list_2_regex=.*python.* -list_3_description=Famous Xeyes -list_3_regex=.*xeyes.* -list_3_countmin=1 diff --git a/conf/glances.conf b/conf/glances.conf index c315e7fc9d..e2933fb082 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -1,19 +1,179 @@ +############################################################################## +# Globals Glances parameters +############################################################################## + +[global] +# Stats refresh rate (default is a minimum of 2 seconds) +# Can be overwrite by the -t option +# It is also possible to overwrite it in each plugin sections +refresh=2 +# Does Glances should check if a newer version is available on PyPI ? +check_update=true +# History size (maximum number of values) +# Default is 1200 values (~1h with the default refresh rate) +history_size=1200 +# Set the way Glances should display the date (default is %Y-%m-%d %H:%M:%S %Z) +#strftime_format=%Y-%m-%d %H:%M:%S %Z +# Define external directory for loading additional plugins +# The layout follows the glances standard for plugin definitions +#plugin_dir=/home/user/dev/plugins + +############################################################################## +# User interface +############################################################################## + +[outputs] +# Options for all UIs +#-------------------- +# Separator in the Curses and WebUI interface (between top and others plugins) +#separator=True +# Set the the Curses and WebUI interface left menu plugin list (comma-separated) +#left_menu=network,wifi,connections,ports,diskio,fs,irq,folders,raid,smart,sensors,now +# Limit the number of processes to display (in the WebUI) +#max_processes_display=25 +# +# Specifics options for TUI +#-------------------------- +# Disable background color +#disable_bg=True +# +# Specifics options for WebUI +#---------------------------- +# Set URL prefix for the WebUI and the API +# Example: url_prefix=/glances/ => http://localhost/glances/ +# Note: The final / is mandatory +# Default is no prefix (/) +#url_prefix=/glances/ +# Set root path for WebUI statics files +# Why ? On Debian system, WebUI statics files are not provided. +# You can download it in a specific folder +# thanks to https://github.com/nicolargo/glances/issues/2021 +# then configure this folder with the webui_root_path key +# Default is folder where glances_restful_api.py is hosted +#webui_root_path= +# +# CORS options +# Comma separated list of origins that should be permitted to make cross-origin requests. +# Default is * +#cors_origins=* +# Indicate that cookies should be supported for cross-origin requests. +# Default is True +#cors_credentials=True +# Comma separated list of HTTP methods that should be allowed for cross-origin requests. +# Default is * +#cors_methods=* +# Comma separated list of HTTP request headers that should be supported for cross-origin requests. +# Default is * +#cors_headers=* +# +# Define SSL files (keyfile_password is optional) +#ssl_keyfile_password=kfp +#ssl_keyfile=./glances.local+3-key.pem +#ssl_certfile=./glances.local+3.pem +# +# JWT Authentication settings +# Secret key for signing JWT tokens (generate with: openssl rand -hex 32) +# If not set, a random key is generated per server instance (tokens won't survive restart) +#jwt_secret_key=your-secure-secret-key-here +# Token expiration time in minutes (default: 60) +#jwt_expire_minutes=60 +# +# MCP +# Overwrite the default MCP path +#mcp_path=/mcp +# Allowed Host headers for the MCP SSE endpoint (DNS rebinding protection). +# Comma-separated list. Defaults to localhost,127.0.0.1 when not set. +# Set to * to allow any host - use only behind a trusted reverse proxy. +#mcp_allowed_hosts=localhost,127.0.0.1,myserver.example.com + +############################################################################## +# Plugins +############################################################################## + +[quicklook] +# Set to true to disable a plugin +# Note: you can also disable it from the command line (see --disable-plugin ) +disable=False +# Stats list (default is cpu,mem,load) +# Available stats are: cpu,mem,load,swap +list=cpu,mem,load +# Graphical bar char used in the terminal user interface (default is |) +bar_char=▪ +# Define CPU, MEM and SWAP thresholds in % +cpu_careful=50 +cpu_warning=70 +cpu_critical=90 +mem_careful=50 +mem_warning=70 +mem_critical=90 +swap_careful=50 +swap_warning=70 +swap_critical=90 +# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages +# With 1 CPU core, the load should be lower than 1.00 ~ 100% +load_careful=70 +load_warning=100 +load_critical=500 + +[system] +# This plugin display the first line in the Glances UI with: +# Hostname / Operating system name / Architecture information +# Set to true to disable a plugin +disable=False +# Default refresh rate is 60 seconds +#refresh=60 +# System information to display (a string where {key} will be replaced by the value) +# Available information are: hostname, os_name, os_version, os_arch, linux_distro, platform +#system_info_msg= | My {os_name} system | + [cpu] -# Default values if not defined: 50/70/90 +disable=False +# See https://scoutapm.com/blog/slow_server_flow_chart +# +# I/O wait percentage should be lower than 1/# (# = Logical CPU cores) +# Leave commented to just use the default config: +# Careful=1/#*100-20% / Warning=1/#*100-10% / Critical=1/#*100 +#iowait_careful=30 +#iowait_warning=40 +#iowait_critical=50 +# +# Total % is 100 - idle +total_careful=65 +total_warning=75 +total_critical=85 +total_log=True +# +# Default values if not defined: 50/70/90 (except for iowait) user_careful=50 user_warning=70 user_critical=90 -iowait_careful=50 -iowait_warning=70 -iowait_critical=90 +user_log=False +#user_critical_action=echo "{{time}} User CPU {{user}} higher than {{critical}}" > /tmp/cpu.alert +# system_careful=50 system_warning=70 system_critical=90 +system_log=False +# steal_careful=50 steal_warning=70 steal_critical=90 +#steal_log=True +# +# Context switch limit (core / second) +# Leave commented to just use the default config critical is 50000*(Logical CPU cores) +#ctx_switches_careful=10000 +#ctx_switches_warning=12000 +#ctx_switches_critical=14000 [percpu] +disable=False +# Define the maximum number of CPU displayed at a time +# If the number of CPU is higher than the one configured in max_cpu_display then: +# - display top 'max_cpu_display' (sorted by CPU consumption) +# - a last line will be added with the mean of all other CPUs +max_cpu_display=4 +# Define CPU thresholds in % # Default values if not defined: 50/70/90 user_careful=50 user_warning=70 @@ -25,69 +185,315 @@ system_careful=50 system_warning=70 system_critical=90 -[load] -# Value * number of cores -# Default values if not defined: 0.7/1.0/5.0 per number of cores -# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages -# http://www.linuxjournal.com/article/9001 -careful=0.7 -warning=1.0 -critical=5.0 +[gpu] +disable=False +# Default GPU load thresholds in % +proc_careful=50 +proc_warning=70 +proc_critical=90 +# Default GPU memory thresholds in % +mem_careful=50 +mem_warning=70 +mem_critical=90 +# Default GPU temperature thresholds in degrees Celsus +temperature_careful=60 +temperature_warning=70 +temperature_critical=80 + +[npu] +disable=True +# Default NPU load thresholds in % +load_careful=50 +load_warning=70 +load_critical=90 +# Default NPU frequency thresholds in % +freq_careful=50 +freq_warning=70 +freq_critical=90 [mem] -# Default limits for free RAM memory in % +disable=False +# Display available memory instead of used memory +#available=True +# Define RAM thresholds in % # Default values if not defined: 50/70/90 careful=50 warning=70 critical=90 +#critical_action_repeat=echo "{{time}} {{percent}} higher than {{critical}}"" >> /tmp/memory.alert [memswap] -# Default limits for free swap memory in % +disable=False +# Define SWAP thresholds in % # Default values if not defined: 50/70/90 careful=50 warning=70 critical=90 +#warning_action=echo "{{time}} {{percent}} higher than {{warning}}"" > /tmp/memory.alert + +[load] +disable=False +# Define LOAD thresholds +# Value * number of cores +# Default values if not defined: 0.7/1.0/5.0 per number of cores +# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages +# http://www.linuxjournal.com/article/9001 +careful=0.7 +warning=1.0 +critical=5.0 +#log=False [network] -# Define the list of hidden network interfaces (comma separeted) -hide=lo -# Default limits (in bits per second aka bps) for interface bitrate -wlan0_rx_careful=4000000 -wlan0_rx_warning=5000000 -wlan0_rx_critical=6000000 -wlan0_tx_careful=700000 -wlan0_tx_warning=900000 -wlan0_tx_critical=1000000 +disable=False +# Default bitrate thresholds in % of the network interface speed +# Default values if not defined: 70/80/90 +rx_careful=70 +rx_warning=80 +rx_critical=90 +tx_careful=70 +tx_warning=80 +tx_critical=90 +# Define the list of hidden network interfaces (comma-separated regexp) +hide=docker.*,lo +# Define the list of wireless network interfaces to be show (comma-separated) +#show=docker.* +# Automatically hide interface not up (default is False) +hide_no_up=True +# Automatically hide interface with no IP address (default is False) +hide_no_ip=True +# Set hide_zero to True to automatically hide interface with no traffic +hide_zero=False +# Set hide_threshold_bytes to an integer value to automatically hide +# interface with traffic less or equal than this value +#hide_threshold_bytes=0 +# It is possible to overwrite the bitrate thresholds per interface +# WLAN 0 Default limits (in bits per second aka bps) for interface bitrate +#wlan0_rx_careful=4000000 +#wlan0_rx_warning=5000000 +#wlan0_rx_critical=6000000 +#wlan0_rx_log=True +#wlan0_tx_careful=700000 +#wlan0_tx_warning=900000 +#wlan0_tx_critical=1000000 +#wlan0_tx_log=True +#wlan0_rx_critical_action=echo "{{time}} {{interface_name}} RX {{bytes_recv_rate_per_sec}}Bps" > /tmp/network.alert +# Alias for network interface name +#alias=wlp0s20f3:WIFI + +[ip] +# Disable display of private IP address +disable=False +# Configure the online service where public IP address information will be downloaded +# - public_disabled: Disable public IP address information (set to True for offline platform) +# - public_refresh_interval: Refresh interval between to calls to the online service +# - public_api: URL of the API (the API should return an JSON object) +# - public_username: Login for the online service (if needed) +# - public_password: Password for the online service (if needed) +# - public_field: Field name of the public IP address in onlibe service JSON message +# - public_template: Template to build the public message +# +# Example for IPLeak service: +# public_api=https://ipv4.ipleak.net/json/ +# public_field=ip +# public_template={ip} {continent_name}/{country_name}/{city_name} +# +public_disabled=True +public_refresh_interval=300 +public_api=https://ipv4.ipleak.net/json/ +#public_username= +#public_password= +public_field=ip +public_template={continent_name}/{country_name}/{city_name} + +[connections] +# Display additional information about TCP connections +# This plugin is disabled by default because it consumes lots of CPU +disable=True +# nf_conntrack thresholds in % +nf_conntrack_percent_careful=70 +nf_conntrack_percent_warning=80 +nf_conntrack_percent_critical=90 + +[wifi] +disable=False +# Define SIGNAL thresholds in dBm (lower is better...) +# Based on: http://serverfault.com/questions/501025/industry-standard-for-minimum-wifi-signal-strength +careful=-65 +warning=-75 +critical=-85 [diskio] -# Define the list of hidden disks (comma separeted) -hide=sda2,sda5 +disable=False +# Define the list of hidden disks (comma-separated regexp) +#hide=sda2,sda5,loop.* +hide=loop.*,/dev/loop.* +# Set hide_zero to True to automatically hide disk with no read/write +hide_zero=False +# Set hide_threshold_bytes to an integer value to automatically hide +# interface with traffic less or equal than this value +#hide_threshold_bytes=0 +# Define the list of disks to be show (comma-separated) +#show=sda.* +# Alias for sda1 and sdb1 +#alias=sda1:SystemDisk,sdb1:DataDisk +# Default latency thresholds (in ms) (rx = read / tx = write) +rx_latency_careful=10 +rx_latency_warning=20 +rx_latency_critical=50 +tx_latency_careful=10 +tx_latency_warning=20 +tx_latency_critical=50 +# Set latency thresholds (latency in ms) for a given disk name (rx = read / tx = write) +# dm-0_rx_latency_careful=10 +# dm-0_rx_latency_warning=20 +# dm-0_rx_latency_critical=50 +# dm-0_rx_latency_log=False +# dm-0_tx_latency_careful=10 +# dm-0_tx_latency_warning=20 +# dm-0_tx_latency_critical=50 +# dm-0_tx_latency_log=False +# There is no default bitrate thresholds for disk (because it is not possible to know the disk speed) +# Set bitrate thresholds (in bytes per second) for a given disk name (rx = read / tx = write) +#dm-0_rx_careful=4000000000 +#dm-0_rx_warning=5000000000 +#dm-0_rx_critical=6000000000 +#dm-0_rx_log=False +#dm-0_tx_careful=700000000 +#dm-0_tx_warning=900000000 +#dm-0_tx_critical=1000000000 +#dm-0_tx_log=False [fs] -# Default limits for free filesytem space in % +disable=False +# Define the list of file system to hide (comma-separated regexp) +hide=/boot.*,.*/snap.* +# Define the list of file system to show (comma-separated regexp) +#show=/,/srv +# Define filesystem space thresholds in % # Default values if not defined: 50/70/90 careful=50 warning=70 critical=90 +# It is also possible to define per mount point value +# Example: /_careful=40 +#/_careful=1 +#/_warning=5 +#/_critical=10 +#/_critical_action=echo "{{time}} {{mnt_point}} filesystem space {{percent}}% higher than {{critical}}%" > /tmp/fs.alert +# Allow additional file system types (comma-separated FS type) +#allow=shm +# Alias for root file system +#alias=/:Root,/zfspool:ZFS + +[irq] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/irq.html +# This plugin is disabled by default +disable=True + +[folders] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/folders.html +disable=False +# Define a folder list to monitor +# The list is composed of items (list_#nb <= 10) +# An item is defined by: +# * path: absolute path +# * careful: optional careful threshold (in MB) +# * warning: optional warning threshold (in MB) +# * critical: optional critical threshold (in MB) +# * refresh: interval in second between two refreshes +#folder_1_path=/tmp +#folder_1_careful=2500 +#folder_1_warning=3000 +#folder_1_critical=3500 +#folder_1_refresh=60 +#folder_2_path=/home/nicolargo/Videos +#folder_2_warning=17000 +#folder_2_critical=20000 +#folder_3_path=/nonexisting +#folder_4_path=/root + +[cloud] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/cloud.html +# This plugin is disabled by default +disable=True + +[raid] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/raid.html +# This plugin is disabled by default +disable=True + +[smart] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/smart.html +# This plugin is disabled by default +disable=True +# Define the list of sensors to hide (comma-separated regexp) +#hide=.*Hide_this_driver.* +# Define the list of sensors to show (comma-separated regexp) +#show=.*Drive_Temperature.* +# List of attributes to hide (comma separated) +#hide_attributes=Self-tests,Errors + +[hddtemp] +disable=False +# Define hddtemp server IP and port (default is 127.0.0.1 and 7634 (TCP)) +host=127.0.0.1 +port=7634 [sensors] -# Sensors core limits -# Default values if not defined: 60/70/80 -temperature_core_careful=60 -temperature_core_warning=70 -temperature_core_critical=80 -# Temperatures in °C for hddtemp +# Documentation: https://glances.readthedocs.io/en/latest/aoa/sensors.html +disable=False +# Set the refresh multiplicator for the sensors +# By default refresh every Glances refresh * 5 (increase to reduce CPU consumption) +#refresh=5 +# Hide some sensors (comma separated list of regexp) +hide=unknown.* +# Show only the following sensors (comma separated list of regexp) +#show=CPU.* +# Sensors core thresholds (in Celsius...) +# By default values are grabbed from the system +# Overwrite thresholds for a specific sensor +# temperature_core_Ambient_careful=40 +# temperature_core_Ambient_warning=60 +# temperature_core_Ambient_critical=85 +# temperature_core_Ambient_log=True +# temperature_core_Ambient_critical_action=echo "{{time}} {{label}} temperature {{value}}{{unit}} higher than {{critical}}{{unit}}" > /tmp/temperature.alert +# Overwrite thresholds for a specific type of sensor +#temperature_core_careful=45 +#temperature_core_warning=65 +#temperature_core_critical=80 +# Temperatures threshold in °C for hddtemp # Default values if not defined: 45/52/60 -temperature_hdd_careful=45 -temperature_hdd_warning=52 -temperature_hdd_critical=60 -# Battery % limits -battery_careful=80 -battery_warning=90 -battery_critical=95 +#temperature_hdd_careful=45 +#temperature_hdd_warning=52 +#temperature_hdd_critical=60 +# Battery threshold in % +# Default values if not defined: 70/80/90 +#battery_careful=70 +#battery_warning=80 +#battery_critical=90 +# Fan speed threshold in RPM +#fan_speed_careful=100 +# Sensors alias +#alias=core 0:CPU Core 0,core 1:CPU Core 1 + +[processcount] +disable=False +# If you want to change the refresh rate of the processing list, please uncomment: +#refresh=10 [processlist] -# Limit values for CPU/MEM per process in % +disable=False +# Sort key: if not defined, the sort is automatically done by Glances (recommended) +# Should be one of the following: +# cpu_percent, memory_percent, io_counters, name, cpu_times, username +#sort_key=memory_percent +# List of stats to disable (not grabed and not display) +# Stats that can be disabled: cpu_percent,memory_info,memory_percent,username,cpu_times,num_threads,nice,status,io_counters,cmdline,cpu_num +# Stats that can not be disable: pid,name +disable_stats=cpu_num +# Disable display of virtual memory +#disable_virtual_memory=True +# Define CPU/MEM (per process) thresholds in % # Default values if not defined: 50/70/90 cpu_careful=50 cpu_warning=70 @@ -95,3 +501,497 @@ cpu_critical=90 mem_careful=50 mem_warning=70 mem_critical=90 +# +# Nice priorities range from -20 to 19. +# Configure nice levels using a comma-separated list. +# +# Nice: Example 1, non-zero is warning (default behavior) +nice_warning=-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 +# +# Nice: Example 2, low priority processes escalate from careful to critical +#nice_ok=O +#nice_careful=1,2,3,4,5,6,7,8,9 +#nice_warning=10,11,12,13,14 +#nice_critical=15,16,17,18,19 +# +# Status: define threshold regarding the process status (first letter of process status) +# R: Running, S: Sleeping, Z: Zombie (complete list here https://psutil.readthedocs.io/en/latest/#process-status-constants) +status_ok=R,W,P,I +status_critical=Z,D +# Define the list of processes to export using: +# a comma-separated list of Glances filter +#export=.*firefox.*,pid:1234 +# Define a list of process to focus on (comma-separated list of Glances filter) +#focus=.*firefox.*,.*python.* + +[ports] +disable=False +# Interval in second between two scans +# Ports scanner plugin configuration +refresh=30 +# Set the default timeout (in second) for a scan (can be overwritten in the scan list) +timeout=3 +# If port_default_gateway is True, add the default gateway on top of the scan list +port_default_gateway=True +# +# Define the scan list (1 < x < 255) +# port_x_host (name or IP) is mandatory +# port_x_port (TCP port number) is optional (if not set, use ICMP) +# port_x_description is optional (if not set, define to host:port) +# port_x_timeout is optional and overwrite the default timeout value +# port_x_rtt_warning is optional and defines the warning threshold in ms +# +#port_1_host=192.168.0.1 +#port_1_port=80 +#port_1_description=Home Box +#port_1_timeout=1 +#port_2_host=www.free.fr +#port_2_description=My ISP +#port_3_host=www.google.com +#port_3_description=Internet ICMP +#port_3_rtt_warning=1000 +#port_4_description=Internet Web +#port_4_host=www.google.com +#port_4_port=80 +#port_4_rtt_warning=1000 +# +# Define Web (URL) monitoring list (1 < x < 255) +# web_x_url is the URL to monitor (example: http://my.site.com/folder) +# web_x_description is optional (if not set, define to URL) +# web_x_timeout is optional and overwrite the default timeout value +# web_x_rtt_warning is optional and defines the warning respond time in ms (approximately) +# +#web_1_url=https://blog.nicolargo.com +#web_1_description=My Blog +#web_1_rtt_warning=3000 +#web_2_url=https://github.com +#web_3_url=http://www.google.fr +#web_3_description=Google Fr +#web_4_url=https://blog.nicolargo.com/nonexist +#web_4_description=Intranet + +[vms] +disable=True +# Define the maximum VMs size name (default is 20 chars) +max_name_size=20 +# By default, Glances only display running VMs with states: +# 'Running', 'Paused', 'Starting' or 'Restarting' +# Set the following key to True to display all VMs regarding their states +all=False + +[containers] +disable=False +# Only show specific containers (comma-separated list of container name or regular expression) +# Comment this line to display all containers (default configuration) +; show=telegraf +# Hide some containers (comma-separated list of container name or regular expression) +# Comment this line to display all containers (default configuration) +; hide=telegraf +# Define the maximum docker size name (default is 20 chars) +max_name_size=20 +# List of stats to disable (not display) +# Following stats can be disabled: name,status,uptime,cpu,mem,diskio,networkio,ports,command +disable_stats=command +# Thresholds for CPU and MEM (in %) +; cpu_careful=50 +; cpu_warning=70 +; cpu_critical=90 +; mem_careful=20 +; mem_warning=50 +; mem_critical=70 +# +# Per container thresholds +; containername_cpu_careful=10 +; containername_cpu_warning=20 +; containername_cpu_critical=30 +# +# By default, Glances only display running containers +# Set the following key to True to display all containers +all=False +# Define Podman sock +; podman_sock=unix:///run/user/1000/podman/podman.sock + +[amps] +# AMPs configuration are defined in the bottom of this file +disable=False + +[alert] +disable=False +# Maximum number of events to display (default is 10 events) +;max_events=10 +# Minimum duration for an event to be taken into account (default is 6 seconds) +;min_duration=6 +# Minimum time between two events of the same type (default is 6 seconds) +# This is used to avoid too many alerts for the same event +# Events will be merged +;min_interval=6 + +############################################################################## +# Browser mode - Static servers definition +############################################################################## + +[serverlist] +# Define columns (comma separated list of ::()) to grab/display +# Default is: system:hr_name,load:min5,cpu:total,mem:percent +# You can also add stats with key, like sensors:value:Ambient (key is case sensitive) +#columns=system:hr_name,load:min5,cpu:total,mem:percent,memswap:percent,sensors:value:Ambient,sensors:value:Composite +# Define the static servers list +# _protocol can be: rpc (default if not defined) or rest +# List is limited to 256 servers max (1 to 256) +#server_1_name=localhost +#server_1_alias=Local WebUI +#server_1_port=61266 +#server_1_protocol=rest +#server_2_name=localhost +#server_2_alias=My local PC +#server_2_port=61209 +#server_2_protocol=rpc +#server_3_name=192.168.0.17 +#server_3_alias=Another PC on my network +#server_3_port=61209 +#server_1_protocol=rpc +#server_4_name=notagooddefinition +#server_4_port=61237 + +[passwords] +# Define the passwords list related to the [serverlist] section +# Syntax: host=password +# Where: host is the hostname +# password is the clear password +# Additionally (and optionally) a default password could be defined +#localhost=abc +#default=defaultpassword +# +# Define the path of the local '.pwd' file (default is system one) +#local_password_path=~/.config/glances + +############################################################################## +# Exports +############################################################################## + +[export] +# Common section for all exporters +# Do not export following fields (comma separated list of regex) +#exclude_fields=.*_critical,.*_careful,.*_warning,.*\.key$ + +[graph] +# Configuration for the --export graph option +# Set the path where the graph (.svg files) will be created +# Can be overwrite by the --graph-path command line option +path=/tmp/glances +# It is possible to generate the graphs automatically by setting the +# generate_every to a non zero value corresponding to the seconds between +# two generation. Set it to 0 to disable graph auto generation. +generate_every=0 +# See following configuration keys definitions in the Pygal lib documentation +# http://pygal.org/en/stable/documentation/index.html +width=800 +height=600 +style=DarkStyle + +[influxdb] +# !!! +# Will be DEPRECATED in future release. +# Please have a look on the new influxdb3 export module +# !!! +# Configuration for the --export influxdb option +# https://influxdb.com/ +host=localhost +port=8086 +protocol=http +user=root +password=root +db=glances +# Prefix will be added for all measurement name +# Ex: prefix=foo +# => foo.cpu +# => foo.mem +# You can also use dynamic values +#prefix=foo +# Following tags will be added for all measurements +# You can also use dynamic values. +# Note: hostname and name (for process) are always added as a tag +#tags=foo:bar,spam:eggs,domain:`domainname` + +[influxdb2] +# Configuration for the --export influxdb2 option +# https://influxdb.com/ +host=localhost +port=8086 +protocol=http +org=nicolargo +bucket=glances +token=PUT_YOUR_INFLUXDB2_TOKEN_HERE +# Set the interval between two exports (in seconds) +# If the interval is set to 0, the Glances refresh time is used (default behavor) +#interval=0 +# Prefix will be added for all measurement name +# Ex: prefix=foo +# => foo.cpu +# => foo.mem +# You can also use dynamic values +#prefix=foo +# Following tags will be added for all measurements +# You can also use dynamic values. +# Note: hostname and name (for process) are always added as a tag +#tags=foo:bar,spam:eggs,domain:`domainname` + +[influxdb3] +# Configuration for the --export influxdb3 option +# https://influxdb.com/ +host=http://localhost:8181 +org=nicolargo +database=glances +token=PUT_YOUR_INFLUXDB3_TOKEN_HERE +# Set the interval between two exports (in seconds) +# If the interval is set to 0, the Glances refresh time is used (default behavor) +#interval=0 +# Prefix will be added for all measurement name +# Ex: prefix=foo +# => foo.cpu +# => foo.mem +# You can also use dynamic values +#prefix=foo +# Following tags will be added for all measurements +# You can also use dynamic values. +# Note: hostname and name (for process) are always added as a tag +#tags=foo:bar,spam:eggs,domain:`domainname` + +[cassandra] +# Configuration for the --export cassandra option +# Also works for the ScyllaDB +# https://influxdb.com/ or http://www.scylladb.com/ +host=localhost +port=9042 +protocol_version=3 +keyspace=glances +replication_factor=2 +# If not define, table name is set to host key +table=localhost +# If not define, username and password will not be used +#username=cassandra +#password=password + +[opentsdb] +# Configuration for the --export opentsdb option +# http://opentsdb.net/ +host=localhost +port=4242 +#prefix=glances +#tags=foo:bar,spam:eggs + +[statsd] +# Configuration for the --export statsd option +# https://github.com/etsy/statsd +host=localhost +port=8125 +#prefix=glances + +[elasticsearch] +# Configuration for the --export elasticsearch option +# Data are available via the ES RESTful API. ex: URL//cpu +# https://www.elastic.co +scheme=http +host=localhost +port=9200 +index=glances + +[riemann] +# Configuration for the --export riemann option +# http://riemann.io +host=localhost +port=5555 + +[rabbitmq] +# Configuration for the --export rabbitmq option +host=localhost +port=5672 +user=guest +password=guest +queue=glances_queue +#protocol=amqps + +[mqtt] +# Configuration for the --export mqtt option +host=localhost +# Overwrite device name in the topic +#devicename=localhost +port=8883 +tls=false +user=guest +password=guest +topic=glances +topic_structure=per-metric +callback_api_version=2 + +[couchdb] +# Configuration for the --export couchdb option +# https://www.couchdb.org +host=localhost +port=5984 +db=glances +user=admin +password=admin + +[mongodb] +# Configuration for the --export mongodb option +# https://www.mongodb.com +host=localhost +port=27017 +db=glances +user=root +password=example + +[kafka] +# Configuration for the --export kafka option +# http://kafka.apache.org/ +host=localhost +port=9092 +topic=glances +#compression=gzip +# Tags will be added for all events +#tags=foo:bar,spam:eggs +# You can also use dynamic values +#tags=hostname:`hostname -f` + +[zeromq] +# Configuration for the --export zeromq option +# http://www.zeromq.org +# Use * to bind on all interfaces +host=* +port=5678 +# Glances envelopes the stats in a publish message with two frames: +# - First frame containing the following prefix (STRING) +# - Second frame with the Glances plugin name (STRING) +# - Third frame with the Glances plugin stats (JSON) +prefix=G + +[prometheus] +# Configuration for the --export prometheus option +# https://prometheus.io +# Create a Prometheus exporter listening on localhost:9091 (default configuration) +# Metric are exporter using the following name: +# __{labelkey:labelvalue} +# Note: You should add this exporter to your Prometheus server configuration: +# scrape_configs: +# - job_name: 'glances_exporter' +# scrape_interval: 5s +# static_configs: +# - targets: ['localhost:9091'] +# +# Labels will be added for all measurements (default is src:glances) +# labels=foo:bar,spam:eggs +# You can also use dynamic values +# labels=system:`uname -s` +# +host=localhost +port=9091 +#prefix=glances +labels=src:glances + +[restful] +# Configuration for the --export restful option +# Example, export to http://localhost:6789/ +host=localhost +port=6789 +protocol=http +path=/ + +[graphite] +# Configuration for the --export graphite option +# https://graphiteapp.org/ +host=localhost +port=2003 +# Prefix will be added for all measurement name +prefix=glances +# System name added between the prefix and the stats +# By default, system_name = FQDN +#system_name=mycomputer + +[timescaledb] +# Configuration for the --export timescaledb option +# https://www.timescale.com/ +host=localhost +port=5432 +db=glances +user=postgres +password=password +# Overwrite device name (default is the FQDN) +# Most of the time, you should not overwrite this value +#hostname=mycomputer + +[nats] +# Configuration for the --export nats option +# https://nats.io/ +# Host is a separated list of NATS nodes +host=nats://localhost:4222 +# Prefix for the subjects (default is 'glances') +prefix=glances + +############################################################################## +# AMPS +# * enable: Enable (true) or disable (false) the AMP +# * regex: Regular expression to filter the process(es) +# * refresh: The AMP is executed every refresh seconds +# * one_line: (optional) Force (if true) the AMP to be displayed in one line +# * command: (optional) command to execute when the process is detected (thk to the regex) +# * countmin: (optional) minimal number of processes +# A warning will be displayed if number of process < count +# * countmax: (optional) maximum number of processes +# A warning will be displayed if number of process > count +# * : Others variables can be defined and used in the AMP script +############################################################################## + +[amp_dropbox] +# Use the default AMP (no dedicated AMP Python script) +# Check if the Dropbox daemon is running +# Every 3 seconds, display the 'dropbox status' command line +enable=false +regex=.*dropbox.* +refresh=3 +one_line=false +command=dropbox status +countmin=1 + +[amp_python] +# Use the default AMP (no dedicated AMP Python script) +# Monitor all the Python scripts +# Alert if more than 20 Python scripts are running +enable=false +regex=.*python.* +refresh=3 +countmax=20 + +[amp_conntrack] +# Use && separator for multiple commands +# If the regex key is not defined, the AMP will be executed every refresh second +# and the process count will not be displayed (countmin and countmax will be ignore) +enable=false +refresh=30 +one_line=false +command=sysctl net.netfilter.nf_conntrack_count && sysctl net.netfilter.nf_conntrack_max + +[amp_nginx] +# Use the NGinx AMP +# Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/) +enable=false +regex=\/usr\/sbin\/nginx +refresh=60 +one_line=false +status_url=http://localhost/nginx_status + +[amp_systemd] +# Use the Systemd AMP +enable=false +regex=\/lib\/systemd\/systemd +refresh=30 +one_line=true +systemctl_cmd=/bin/systemctl --plain + +[amp_systemv] +# Use the Systemv AMP +enable=false +regex=\/sbin\/init +refresh=30 +one_line=true +service_cmd=/usr/bin/service --status-all diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000000..919848dd9b --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,420 @@ +# This file was autogenerated by uv via the following command: +# uv export --no-hashes --only-dev --output-file dev-requirements.txt +alabaster==1.0.0 + # via sphinx +annotated-doc==0.0.4 + # via typer +annotated-types==0.7.0 + # via pydantic +anyio==4.12.1 + # via + # httpx + # mcp + # sse-starlette + # starlette +attrs==25.4.0 + # via + # glom + # jsonschema + # outcome + # referencing + # reuse + # semgrep + # trio +babel==2.18.0 + # via sphinx +boltons==21.0.0 + # via + # face + # glom + # semgrep +boolean-py==5.0 + # via license-expression +bracex==2.6 + # via wcmatch +certifi==2026.2.25 + # via + # httpcore + # httpx + # requests + # selenium +cffi==2.0.0 ; (implementation_name != 'pypy' and os_name == 'nt') or platform_python_implementation != 'PyPy' + # via + # cryptography + # trio +cfgv==3.5.0 + # via pre-commit +charset-normalizer==3.4.5 + # via + # python-debian + # requests +click==8.1.8 + # via + # click-option-group + # reuse + # semgrep + # typer + # uvicorn +click-option-group==0.5.9 + # via semgrep +codespell==2.4.2 +colorama==0.4.6 + # via + # click + # pytest + # semgrep + # sphinx +contourpy==1.3.2 ; python_full_version < '3.11' + # via matplotlib +contourpy==1.3.3 ; python_full_version >= '3.11' + # via matplotlib +cryptography==46.0.5 + # via pyjwt +cycler==0.12.1 + # via matplotlib +distlib==0.4.0 + # via virtualenv +docutils==0.21.2 ; python_full_version < '3.11' + # via + # rstcheck-core + # sphinx + # sphinx-rtd-theme +docutils==0.22.4 ; python_full_version >= '3.11' + # via + # rstcheck-core + # sphinx + # sphinx-rtd-theme +exceptiongroup==1.2.2 + # via + # anyio + # pytest + # semgrep + # trio + # trio-websocket +face==26.0.0 + # via glom +filelock==3.25.0 + # via + # python-discovery + # virtualenv +fonttools==4.61.1 + # via matplotlib +glom==25.12.0 + # via semgrep +googleapis-common-protos==1.73.0 + # via opentelemetry-exporter-otlp-proto-http +gprof2dot==2025.4.14 +h11==0.16.0 + # via + # httpcore + # uvicorn + # wsproto +httpcore==1.0.9 + # via httpx +httpx==0.28.1 + # via mcp +httpx-sse==0.4.3 + # via mcp +identify==2.6.17 + # via pre-commit +idna==3.11 + # via + # anyio + # httpx + # requests + # trio +imagesize==2.0.0 + # via sphinx +importlib-metadata==8.7.1 + # via opentelemetry-api +iniconfig==2.3.0 + # via pytest +jinja2==3.1.6 + # via + # reuse + # sphinx +jsonschema==4.25.1 + # via + # mcp + # semgrep +jsonschema-specifications==2025.9.1 + # via jsonschema +kiwisolver==1.4.9 + # via matplotlib +license-expression==30.4.4 + # via reuse +markdown-it-py==4.0.0 + # via rich +markupsafe==3.0.3 + # via jinja2 +matplotlib==3.10.8 +mcp==1.23.3 + # via semgrep +mdurl==0.1.2 + # via markdown-it-py +memory-profiler==0.61.0 +nodeenv==1.10.0 + # via + # pre-commit + # pyright +numpy==2.2.6 ; python_full_version < '3.11' + # via + # contourpy + # matplotlib +numpy==2.4.2 ; python_full_version >= '3.11' + # via + # contourpy + # matplotlib +opentelemetry-api==1.37.0 + # via + # opentelemetry-exporter-otlp-proto-http + # opentelemetry-instrumentation + # opentelemetry-instrumentation-requests + # opentelemetry-instrumentation-threading + # opentelemetry-sdk + # opentelemetry-semantic-conventions + # semgrep +opentelemetry-exporter-otlp-proto-common==1.37.0 + # via opentelemetry-exporter-otlp-proto-http +opentelemetry-exporter-otlp-proto-http==1.37.0 + # via semgrep +opentelemetry-instrumentation==0.58b0 + # via + # opentelemetry-instrumentation-requests + # opentelemetry-instrumentation-threading +opentelemetry-instrumentation-requests==0.58b0 + # via semgrep +opentelemetry-instrumentation-threading==0.58b0 + # via semgrep +opentelemetry-proto==1.37.0 + # via + # opentelemetry-exporter-otlp-proto-common + # opentelemetry-exporter-otlp-proto-http +opentelemetry-sdk==1.37.0 + # via + # opentelemetry-exporter-otlp-proto-http + # semgrep +opentelemetry-semantic-conventions==0.58b0 + # via + # opentelemetry-instrumentation + # opentelemetry-instrumentation-requests + # opentelemetry-sdk +opentelemetry-util-http==0.58b0 + # via opentelemetry-instrumentation-requests +outcome==1.3.0.post0 + # via + # trio + # trio-websocket +packaging==26.0 + # via + # matplotlib + # opentelemetry-instrumentation + # pytest + # requirements-parser + # semgrep + # sphinx + # webdriver-manager +peewee==3.19.0 + # via semgrep +pillow==12.1.1 + # via matplotlib +platformdirs==4.9.4 + # via + # python-discovery + # virtualenv +pluggy==1.6.0 + # via pytest +pre-commit==4.5.1 +protobuf==6.33.5 + # via + # googleapis-common-protos + # opentelemetry-proto +psutil==7.2.2 + # via memory-profiler +py-spy==0.4.1 +pycparser==3.0 ; (implementation_name != 'PyPy' and implementation_name != 'pypy' and os_name == 'nt') or (implementation_name != 'PyPy' and platform_python_implementation != 'PyPy') + # via cffi +pydantic==2.12.5 + # via + # mcp + # pydantic-settings + # rstcheck-core +pydantic-core==2.41.5 + # via pydantic +pydantic-settings==2.13.1 + # via mcp +pygments==2.19.2 + # via + # pytest + # rich + # sphinx +pyinstrument==5.1.2 +pyjwt==2.11.0 + # via + # mcp + # semgrep +pyparsing==3.3.2 + # via matplotlib +pyright==1.1.408 +pysocks==1.7.1 + # via urllib3 +pytest==9.0.2 +python-dateutil==2.9.0.post0 + # via matplotlib +python-debian==1.1.0 + # via reuse +python-discovery==1.1.1 + # via virtualenv +python-dotenv==1.2.2 + # via + # pydantic-settings + # webdriver-manager +python-magic==0.4.27 + # via reuse +python-multipart==0.0.22 + # via mcp +pywin32==311 ; sys_platform == 'win32' + # via + # mcp + # semgrep +pyyaml==6.0.3 + # via pre-commit +referencing==0.37.0 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.5 + # via + # opentelemetry-exporter-otlp-proto-http + # semgrep + # sphinx + # webdriver-manager +requirements-parser==0.13.0 +reuse==6.2.0 +rich==14.3.3 + # via + # semgrep + # typer +roman-numerals==4.1.0 ; python_full_version >= '3.11' + # via sphinx +rpds-py==0.30.0 + # via + # jsonschema + # referencing +rstcheck==6.2.5 +rstcheck-core==1.2.2 + # via rstcheck +ruamel-yaml==0.19.1 + # via semgrep +ruamel-yaml-clib==0.2.14 + # via semgrep +ruff==0.15.5 +selenium==4.41.0 +semantic-version==2.10.0 + # via semgrep +semgrep==1.154.0 +setuptools==82.0.0 +shellingham==1.5.4 + # via typer +six==1.17.0 + # via python-dateutil +sniffio==1.3.1 + # via trio +snowballstemmer==3.0.1 + # via sphinx +sortedcontainers==2.4.0 + # via trio +sphinx==8.1.3 ; python_full_version < '3.11' + # via + # sphinx-rtd-theme + # sphinxcontrib-jquery +sphinx==9.0.4 ; python_full_version == '3.11.*' + # via + # sphinx-rtd-theme + # sphinxcontrib-jquery +sphinx==9.1.0 ; python_full_version >= '3.12' + # via + # sphinx-rtd-theme + # sphinxcontrib-jquery +sphinx-rtd-theme==3.1.0 +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx +sse-starlette==3.3.2 + # via mcp +starlette==0.52.1 + # via + # mcp + # sse-starlette +tomli==2.0.2 + # via + # pytest + # semgrep + # sphinx +tomlkit==0.14.0 + # via reuse +trio==0.33.0 + # via + # selenium + # trio-websocket +trio-websocket==0.12.2 + # via selenium +typer==0.23.1 + # via rstcheck +typing-extensions==4.15.0 + # via + # anyio + # cryptography + # mcp + # opentelemetry-api + # opentelemetry-exporter-otlp-proto-http + # opentelemetry-sdk + # opentelemetry-semantic-conventions + # pydantic + # pydantic-core + # pyright + # referencing + # selenium + # semgrep + # starlette + # typing-inspection + # uvicorn + # virtualenv +typing-inspection==0.4.2 + # via + # mcp + # pydantic + # pydantic-settings +urllib3==2.6.3 + # via + # requests + # selenium + # semgrep +uvicorn==0.41.0 ; sys_platform != 'emscripten' + # via mcp +virtualenv==21.1.0 + # via pre-commit +wcmatch==8.5.2 + # via semgrep +webdriver-manager==4.0.2 +websocket-client==1.9.0 + # via selenium +wrapt==1.17.3 + # via + # opentelemetry-instrumentation + # opentelemetry-instrumentation-threading +wsproto==1.3.2 + # via trio-websocket +zipp==3.23.0 + # via importlib-metadata diff --git a/docker-bin.sh b/docker-bin.sh new file mode 100755 index 0000000000..95e9b5b41a --- /dev/null +++ b/docker-bin.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +/venv/bin/python3 -m glances "$@" diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml new file mode 100644 index 0000000000..c353ab518e --- /dev/null +++ b/docker-compose/docker-compose.yml @@ -0,0 +1,66 @@ +services: + glances: + # See all images tags here: https://hub.docker.com/r/nicolargo/glances/tags + image: nicolargo/glances:latest-full + restart: always + + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:61208/api/4/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + + pid: "host" + network_mode: "host" + + read_only: true + privileged: false + # Uncomment next line for SATA or NVME smartctl monitoring + # cap_add: + # Uncomment next line for SATA smartctl monitoring + # - SYS_RAWIO + # Uncomment next line for NVME smartctl monitoring + # - SYS_ADMIN + # devices: + # - "/dev/nvme0" + + volumes: + - "/:/rootfs:ro" + - "/var/run/docker.sock:/var/run/docker.sock:ro" + # Uncomment for qemu/libvirt/kvm support with modular libvirt daemons + # - "/var/run/libvirt/virtqemud-sock:/var/run/libvirt/libvirt-sock:ro" + # OR monolithic libvirt daemon + # - "/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro" + - "/run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro" + - "./glances.conf:/glances/conf/glances.conf" + # Uncomment for proper distro information in upper panel. +# # Works only for distros that do have this file (most of distros do). +# - "/etc/os-release:/etc/os-release:ro" + + tmpfs: + - /tmp + + environment: + - GLANCES_OPT=-C /glances/conf/glances.conf -w --enable-mcp --enable-plugin smart + # Please set to your local timezone (or use local ${TZ} environment variable if set on your host) + - TZ=Europe/Paris + - PYTHONPYCACHEPREFIX=/tmp/py_caches + +# # Uncomment for GPU compatibility (Nvidia) inside the container +# deploy: +# resources: +# reservations: +# devices: +# - driver: nvidia +# count: 1 +# capabilities: [gpu] + + # Uncomment to protect Glances WebUI by a login/password (add --password to GLANCES_OPT) + # secrets: + # - source: glances_password + # target: /root/.config/glances/.pwd + +# secrets: +# glances_password: +# file: ./secrets/glances_password diff --git a/docker-compose/glances.conf b/docker-compose/glances.conf new file mode 100644 index 0000000000..677cfa0a13 --- /dev/null +++ b/docker-compose/glances.conf @@ -0,0 +1,997 @@ +############################################################################## +# Globals Glances parameters +############################################################################## + +[global] +# Stats refresh rate (default is a minimum of 2 seconds) +# Can be overwrite by the -t option +# It is also possible to overwrite it in each plugin sections +refresh=2 +# Does Glances should check if a newer version is available on PyPI ? +check_update=False +# History size (maximum number of values) +# Default is 1200 values (~1h with the default refresh rate) +history_size=1200 +# Set the way Glances should display the date (default is %Y-%m-%d %H:%M:%S %Z) +#strftime_format=%Y-%m-%d %H:%M:%S %Z +# Define external directory for loading additional plugins +# The layout follows the glances standard for plugin definitions +#plugin_dir=/home/user/dev/plugins + +############################################################################## +# User interface +############################################################################## + +[outputs] +# Options for all UIs +#-------------------- +# Separator in the Curses and WebUI interface (between top and others plugins) +#separator=True +# Set the the Curses and WebUI interface left menu plugin list (comma-separated) +#left_menu=network,wifi,connections,ports,diskio,fs,irq,folders,raid,smart,sensors,now +# Limit the number of processes to display (in the WebUI) +max_processes_display=25 +# +# Specifics options for TUI +#-------------------------- +# Disable background color +#disable_bg=True +# +# Specifics options for WebUI +#---------------------------- +# Set URL prefix for the WebUI and the API +# Example: url_prefix=/glances/ => http://localhost/glances/ +# Note: The final / is mandatory +# Default is no prefix (/) +#url_prefix=/glances/ +# Set root path for WebUI statics files +# Why ? On Debian system, WebUI statics files are not provided. +# You can download it in a specific folder +# thanks to https://github.com/nicolargo/glances/issues/2021 +# then configure this folder with the webui_root_path key +# Default is folder where glances_restful_api.py is hosted +#webui_root_path= +# +# CORS options +# Comma separated list of origins that should be permitted to make cross-origin requests. +# Default is * +#cors_origins=* +# Indicate that cookies should be supported for cross-origin requests. +# Default is True +#cors_credentials=True +# Comma separated list of HTTP methods that should be allowed for cross-origin requests. +# Default is * +#cors_methods=* +# Comma separated list of HTTP request headers that should be supported for cross-origin requests. +# Default is * +#cors_headers=* +# +# Define SSL files (keyfile_password is optional) +#ssl_keyfile_password=kfp +#ssl_keyfile=./glances.local+3-key.pem +#ssl_certfile=./glances.local+3.pem +# +# JWT Authentication settings +# Secret key for signing JWT tokens (generate with: openssl rand -hex 32) +# If not set, a random key is generated per server instance (tokens won't survive restart) +#jwt_secret_key=your-secure-secret-key-here +# Token expiration time in minutes (default: 60) +#jwt_expire_minutes=60 +# +# MCP +# Overwrite the default MCP path +#mcp_path=/mcp +# Allowed Host headers for the MCP SSE endpoint (DNS rebinding protection). +# Comma-separated list. Defaults to localhost,127.0.0.1 when not set. +# Set to * to allow any host - use only behind a trusted reverse proxy. +#mcp_allowed_hosts=localhost,127.0.0.1,myserver.example.com + +############################################################################## +# Plugins +############################################################################## + +[quicklook] +# Set to true to disable a plugin +# Note: you can also disable it from the command line (see --disable-plugin ) +disable=False +# Stats list (default is cpu,mem,load) +# Available stats are: cpu,mem,load,swap +list=cpu,mem,load +# Graphical bar char used in the terminal user interface (default is |) +bar_char=▪ +# Define CPU, MEM and SWAP thresholds in % +cpu_careful=50 +cpu_warning=70 +cpu_critical=90 +mem_careful=50 +mem_warning=70 +mem_critical=90 +swap_careful=50 +swap_warning=70 +swap_critical=90 +# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages +# With 1 CPU core, the load should be lower than 1.00 ~ 100% +load_careful=70 +load_warning=100 +load_critical=500 + +[system] +# This plugin display the first line in the Glances UI with: +# Hostname / Operating system name / Architecture information +# Set to true to disable a plugin +disable=False +# Default refresh rate is 60 seconds +#refresh=60 +# System information to display (a string where {key} will be replaced by the value) +# Available information are: hostname, os_name, os_version, os_arch, linux_distro, platform +#system_info_msg= | My {os_name} system | + +[cpu] +disable=False +# See https://scoutapm.com/blog/slow_server_flow_chart +# +# I/O wait percentage should be lower than 1/# (# = Logical CPU cores) +# Leave commented to just use the default config: +# Careful=1/#*100-20% / Warning=1/#*100-10% / Critical=1/#*100 +#iowait_careful=30 +#iowait_warning=40 +#iowait_critical=50 +# +# Total % is 100 - idle +total_careful=65 +total_warning=75 +total_critical=85 +total_log=True +# +# Default values if not defined: 50/70/90 (except for iowait) +user_careful=50 +user_warning=70 +user_critical=90 +user_log=False +#user_critical_action=echo "{{time}} User CPU {{user}} higher than {{critical}}" > /tmp/cpu.alert +# +system_careful=50 +system_warning=70 +system_critical=90 +system_log=False +# +steal_careful=50 +steal_warning=70 +steal_critical=90 +#steal_log=True +# +# Context switch limit (core / second) +# Leave commented to just use the default config critical is 50000*(Logical CPU cores) +#ctx_switches_careful=10000 +#ctx_switches_warning=12000 +#ctx_switches_critical=14000 + +[percpu] +disable=False +# Define the maximum number of CPU displayed at a time +# If the number of CPU is higher than the one configured in max_cpu_display then: +# - display top 'max_cpu_display' (sorted by CPU consumption) +# - a last line will be added with the mean of all other CPUs +max_cpu_display=4 +# Define CPU thresholds in % +# Default values if not defined: 50/70/90 +user_careful=50 +user_warning=70 +user_critical=90 +iowait_careful=50 +iowait_warning=70 +iowait_critical=90 +system_careful=50 +system_warning=70 +system_critical=90 + +[gpu] +disable=False +# Default GPU load thresholds in % +proc_careful=50 +proc_warning=70 +proc_critical=90 +# Default GPU memory thresholds in % +mem_careful=50 +mem_warning=70 +mem_critical=90 +# Default GPU temperature thresholds in degrees Celsus +temperature_careful=60 +temperature_warning=70 +temperature_critical=80 + +[npu] +disable=True +# Default NPU load thresholds in % +load_careful=50 +load_warning=70 +load_critical=90 +# Default NPU frequency thresholds in % +freq_careful=50 +freq_warning=70 +freq_critical=90 + +[mem] +disable=False +# Display available memory instead of used memory +#available=True +# Define RAM thresholds in % +# Default values if not defined: 50/70/90 +careful=50 +warning=70 +critical=90 +#critical_action_repeat=echo "{{time}} {{percent}} higher than {{critical}}"" >> /tmp/memory.alert + +[memswap] +disable=False +# Define SWAP thresholds in % +# Default values if not defined: 50/70/90 +careful=50 +warning=70 +critical=90 +#warning_action=echo "{{time}} {{percent}} higher than {{warning}}"" > /tmp/memory.alert + +[load] +disable=False +# Define LOAD thresholds +# Value * number of cores +# Default values if not defined: 0.7/1.0/5.0 per number of cores +# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages +# http://www.linuxjournal.com/article/9001 +careful=0.7 +warning=1.0 +critical=5.0 +#log=False + +[network] +disable=False +# Default bitrate thresholds in % of the network interface speed +# Default values if not defined: 70/80/90 +rx_careful=70 +rx_warning=80 +rx_critical=90 +tx_careful=70 +tx_warning=80 +tx_critical=90 +# Define the list of hidden network interfaces (comma-separated regexp) +#hide=docker.*,lo +# Define the list of wireless network interfaces to be show (comma-separated) +#show=docker.* +# Automatically hide interface not up (default is False) +hide_no_up=True +# Automatically hide interface with no IP address (default is False) +hide_no_ip=True +# Set hide_zero to True to automatically hide interface with no traffic +hide_zero=False +# Set hide_threshold_bytes to an integer value to automatically hide +# interface with traffic less or equal than this value +#hide_threshold_bytes=0 +# It is possible to overwrite the bitrate thresholds per interface +# WLAN 0 Default limits (in bits per second aka bps) for interface bitrate +#wlan0_rx_careful=4000000 +#wlan0_rx_warning=5000000 +#wlan0_rx_critical=6000000 +#wlan0_rx_log=True +#wlan0_tx_careful=700000 +#wlan0_tx_warning=900000 +#wlan0_tx_critical=1000000 +#wlan0_tx_log=True +#wlan0_rx_critical_action=echo "{{time}} {{interface_name}} RX {{bytes_recv_rate_per_sec}}Bps" > /tmp/network.alert +# Alias for network interface name +#alias=wlp0s20f3:WIFI + +[ip] +# Disable display of private IP address +disable=False +# Configure the online service where public IP address information will be downloaded +# - public_disabled: Disable public IP address information (set to True for offline platform) +# - public_refresh_interval: Refresh interval between to calls to the online service +# - public_api: URL of the API (the API should return an JSON object) +# - public_username: Login for the online service (if needed) +# - public_password: Password for the online service (if needed) +# - public_field: Field name of the public IP address in onlibe service JSON message +# - public_template: Template to build the public message +# +# Example for IPLeak service: +# public_api=https://ipv4.ipleak.net/json/ +# public_field=ip +# public_template={ip} {continent_name}/{country_name}/{city_name} +# +public_disabled=True +public_refresh_interval=300 +public_api=https://ipv4.ipleak.net/json/ +#public_username= +#public_password= +public_field=ip +public_template={continent_name}/{country_name}/{city_name} + +[connections] +# Display additional information about TCP connections +# This plugin is disabled by default because it consumes lots of CPU +disable=True +# nf_conntrack thresholds in % +nf_conntrack_percent_careful=70 +nf_conntrack_percent_warning=80 +nf_conntrack_percent_critical=90 + +[wifi] +disable=False +# Define SIGNAL thresholds in dBm (lower is better...) +# Based on: http://serverfault.com/questions/501025/industry-standard-for-minimum-wifi-signal-strength +careful=-65 +warning=-75 +critical=-85 + +[diskio] +disable=False +# Define the list of hidden disks (comma-separated regexp) +#hide=sda2,sda5,loop.* +hide=loop.*,/dev/loop.* +# Set hide_zero to True to automatically hide disk with no read/write +hide_zero=False +# Set hide_threshold_bytes to an integer value to automatically hide +# interface with traffic less or equal than this value +#hide_threshold_bytes=0 +# Define the list of disks to be show (comma-separated) +#show=sda.* +# Alias for sda1 and sdb1 +#alias=sda1:SystemDisk,sdb1:DataDisk +# Default latency thresholds (in ms) (rx = read / tx = write) +rx_latency_careful=10 +rx_latency_warning=20 +rx_latency_critical=50 +tx_latency_careful=10 +tx_latency_warning=20 +tx_latency_critical=50 +# Set latency thresholds (latency in ms) for a given disk name (rx = read / tx = write) +# dm-0_rx_latency_careful=10 +# dm-0_rx_latency_warning=20 +# dm-0_rx_latency_critical=50 +# dm-0_rx_latency_log=False +# dm-0_tx_latency_careful=10 +# dm-0_tx_latency_warning=20 +# dm-0_tx_latency_critical=50 +# dm-0_tx_latency_log=False +# There is no default bitrate thresholds for disk (because it is not possible to know the disk speed) +# Set bitrate thresholds (in bytes per second) for a given disk name (rx = read / tx = write) +#dm-0_rx_careful=4000000000 +#dm-0_rx_warning=5000000000 +#dm-0_rx_critical=6000000000 +#dm-0_rx_log=False +#dm-0_tx_careful=700000000 +#dm-0_tx_warning=900000000 +#dm-0_tx_critical=1000000000 +#dm-0_tx_log=False + +[fs] +disable=False +# Define the list of file system to hide (comma-separated regexp) +hide=/boot.*,.*/snap.* +# Define the list of file system to show (comma-separated regexp) +#show=/,/srv +# Define filesystem space thresholds in % +# Default values if not defined: 50/70/90 +careful=50 +warning=70 +critical=90 +# It is also possible to define per mount point value +# Example: /_careful=40 +#/_careful=1 +#/_warning=5 +#/_critical=10 +#/_critical_action=echo "{{time}} {{mnt_point}} filesystem space {{percent}}% higher than {{critical}}%" > /tmp/fs.alert +# Allow additional file system types (comma-separated FS type) +#allow=shm +# Alias for root file system +#alias=/:Root,/zfspool:ZFS + +[irq] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/irq.html +# This plugin is disabled by default +disable=True + +[folders] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/folders.html +disable=False +# Define a folder list to monitor +# The list is composed of items (list_#nb <= 10) +# An item is defined by: +# * path: absolute path +# * careful: optional careful threshold (in MB) +# * warning: optional warning threshold (in MB) +# * critical: optional critical threshold (in MB) +# * refresh: interval in second between two refreshes +#folder_1_path=/tmp +#folder_1_careful=2500 +#folder_1_warning=3000 +#folder_1_critical=3500 +#folder_1_refresh=60 +#folder_2_path=/home/nicolargo/Videos +#folder_2_warning=17000 +#folder_2_critical=20000 +#folder_3_path=/nonexisting +#folder_4_path=/root + +[cloud] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/cloud.html +# This plugin is disabled by default +disable=True + +[raid] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/raid.html +# This plugin is disabled by default +disable=True + +[smart] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/smart.html +# This plugin is disabled by default +disable=True +# Define the list of sensors to hide (comma-separated regexp) +#hide=.*Hide_this_driver.* +# Define the list of sensors to show (comma-separated regexp) +#show=.*Drive_Temperature.* +# List of attributes to hide (comma separated) +#hide_attributes=Self-tests,Errors + +[hddtemp] +disable=False +# Define hddtemp server IP and port (default is 127.0.0.1 and 7634 (TCP)) +host=127.0.0.1 +port=7634 + +[sensors] +# Documentation: https://glances.readthedocs.io/en/latest/aoa/sensors.html +disable=False +# Set the refresh multiplicator for the sensors +# By default refresh every Glances refresh * 5 (increase to reduce CPU consumption) +#refresh=5 +# Hide some sensors (comma separated list of regexp) +hide=unknown.* +# Show only the following sensors (comma separated list of regexp) +#show=CPU.* +# Sensors core thresholds (in Celsius...) +# By default values are grabbed from the system +# Overwrite thresholds for a specific sensor +# temperature_core_Ambient_careful=40 +# temperature_core_Ambient_warning=60 +# temperature_core_Ambient_critical=85 +# temperature_core_Ambient_log=True +# temperature_core_Ambient_critical_action=echo "{{time}} {{label}} temperature {{value}}{{unit}} higher than {{critical}}{{unit}}" > /tmp/temperature.alert +# Overwrite thresholds for a specific type of sensor +#temperature_core_careful=45 +#temperature_core_warning=65 +#temperature_core_critical=80 +# Temperatures threshold in °C for hddtemp +# Default values if not defined: 45/52/60 +#temperature_hdd_careful=45 +#temperature_hdd_warning=52 +#temperature_hdd_critical=60 +# Battery threshold in % +# Default values if not defined: 70/80/90 +#battery_careful=70 +#battery_warning=80 +#battery_critical=90 +# Fan speed threshold in RPM +#fan_speed_careful=100 +# Sensors alias +#alias=core 0:CPU Core 0,core 1:CPU Core 1 + +[processcount] +disable=False +# If you want to change the refresh rate of the processing list, please uncomment: +#refresh=10 + +[processlist] +disable=False +# Sort key: if not defined, the sort is automatically done by Glances (recommended) +# Should be one of the following: +# cpu_percent, memory_percent, io_counters, name, cpu_times, username +#sort_key=memory_percent +# List of stats to disable (not grabed and not display) +# Stats that can be disabled: cpu_percent,memory_info,memory_percent,username,cpu_times,num_threads,nice,status,io_counters,cmdline,cpu_num +# Stats that can not be disable: pid,name +disable_stats=cpu_num +# Disable display of virtual memory +#disable_virtual_memory=True +# Define CPU/MEM (per process) thresholds in % +# Default values if not defined: 50/70/90 +cpu_careful=50 +cpu_warning=70 +cpu_critical=90 +mem_careful=50 +mem_warning=70 +mem_critical=90 +# +# Nice priorities range from -20 to 19. +# Configure nice levels using a comma-separated list. +# +# Nice: Example 1, non-zero is warning (default behavior) +nice_warning=-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 +# +# Nice: Example 2, low priority processes escalate from careful to critical +#nice_ok=O +#nice_careful=1,2,3,4,5,6,7,8,9 +#nice_warning=10,11,12,13,14 +#nice_critical=15,16,17,18,19 +# +# Status: define threshold regarding the process status (first letter of process status) +# R: Running, S: Sleeping, Z: Zombie (complete list here https://psutil.readthedocs.io/en/latest/#process-status-constants) +status_ok=R,W,P,I +status_critical=Z,D +# Define the list of processes to export using: +# a comma-separated list of Glances filter +#export=.*firefox.*,pid:1234 +# Define a list of process to focus on (comma-separated list of Glances filter) +#focus=.*firefox.*,.*python.* + +[ports] +disable=False +# Interval in second between two scans +# Ports scanner plugin configuration +refresh=30 +# Set the default timeout (in second) for a scan (can be overwritten in the scan list) +timeout=3 +# If port_default_gateway is True, add the default gateway on top of the scan list +port_default_gateway=False +# +# Define the scan list (1 < x < 255) +# port_x_host (name or IP) is mandatory +# port_x_port (TCP port number) is optional (if not set, use ICMP) +# port_x_description is optional (if not set, define to host:port) +# port_x_timeout is optional and overwrite the default timeout value +# port_x_rtt_warning is optional and defines the warning threshold in ms +# +#port_1_host=192.168.0.1 +#port_1_port=80 +#port_1_description=Home Box +#port_1_timeout=1 +#port_2_host=www.free.fr +#port_2_description=My ISP +#port_3_host=www.google.com +#port_3_description=Internet ICMP +#port_3_rtt_warning=1000 +#port_4_description=Internet Web +#port_4_host=www.google.com +#port_4_port=80 +#port_4_rtt_warning=1000 +# +# Define Web (URL) monitoring list (1 < x < 255) +# web_x_url is the URL to monitor (example: http://my.site.com/folder) +# web_x_description is optional (if not set, define to URL) +# web_x_timeout is optional and overwrite the default timeout value +# web_x_rtt_warning is optional and defines the warning respond time in ms (approximately) +# +#web_1_url=https://blog.nicolargo.com +#web_1_description=My Blog +#web_1_rtt_warning=3000 +#web_2_url=https://github.com +#web_3_url=http://www.google.fr +#web_3_description=Google Fr +#web_4_url=https://blog.nicolargo.com/nonexist +#web_4_description=Intranet + +[vms] +disable=True +# Define the maximum VMs size name (default is 20 chars) +max_name_size=20 +# By default, Glances only display running VMs with states: +# 'Running', 'Paused', 'Starting' or 'Restarting' +# Set the following key to True to display all VMs regarding their states +all=False + +[containers] +disable=False +# Only show specific containers (comma-separated list of container name or regular expression) +# Comment this line to display all containers (default configuration) +; show=telegraf +# Hide some containers (comma-separated list of container name or regular expression) +# Comment this line to display all containers (default configuration) +; hide=telegraf +# Define the maximum docker size name (default is 20 chars) +max_name_size=20 +# List of stats to disable (not display) +# Following stats can be disabled: name,status,uptime,cpu,mem,diskio,networkio,ports,command +disable_stats=command +# Thresholds for CPU and MEM (in %) +; cpu_careful=50 +; cpu_warning=70 +; cpu_critical=90 +; mem_careful=20 +; mem_warning=50 +; mem_critical=70 +# +# Per container thresholds +; containername_cpu_careful=10 +; containername_cpu_warning=20 +; containername_cpu_critical=30 +# +# By default, Glances only display running containers +# Set the following key to True to display all containers +all=False +# Define Podman sock +; podman_sock=unix:///run/user/1000/podman/podman.sock + +[amps] +# AMPs configuration are defined in the bottom of this file +disable=False + +[alert] +disable=False +# Maximum number of events to display (default is 10 events) +;max_events=10 +# Minimum duration for an event to be taken into account (default is 6 seconds) +;min_duration=6 +# Minimum time between two events of the same type (default is 6 seconds) +# This is used to avoid too many alerts for the same event +# Events will be merged +;min_interval=6 + +############################################################################## +# Browser mode - Static servers definition +############################################################################## + +[serverlist] +# Define columns (comma separated list of ::()) to grab/display +# Default is: system:hr_name,load:min5,cpu:total,mem:percent +# You can also add stats with key, like sensors:value:Ambient (key is case sensitive) +#columns=system:hr_name,load:min5,cpu:total,mem:percent,memswap:percent,sensors:value:Ambient,sensors:value:Composite +# Define the static servers list +# _protocol can be: rpc (default if not defined) or rest +# List is limited to 256 servers max (1 to 256) +#server_1_name=localhost +#server_1_alias=Local WebUI +#server_1_port=61266 +#server_1_protocol=rest +#server_2_name=localhost +#server_2_alias=My local PC +#server_2_port=61209 +#server_2_protocol=rpc +#server_3_name=192.168.0.17 +#server_3_alias=Another PC on my network +#server_3_port=61209 +#server_1_protocol=rpc +#server_4_name=notagooddefinition +#server_4_port=61237 + +[passwords] +# Define the passwords list related to the [serverlist] section +# Syntax: host=password +# Where: host is the hostname +# password is the clear password +# Additionally (and optionally) a default password could be defined +#localhost=abc +#default=defaultpassword +# +# Define the path of the local '.pwd' file (default is system one) +#local_password_path=~/.config/glances + +############################################################################## +# Exports +############################################################################## + +[export] +# Common section for all exporters +# Do not export following fields (comma separated list of regex) +#exclude_fields=.*_critical,.*_careful,.*_warning,.*\.key$ + +[graph] +# Configuration for the --export graph option +# Set the path where the graph (.svg files) will be created +# Can be overwrite by the --graph-path command line option +path=/tmp/glances +# It is possible to generate the graphs automatically by setting the +# generate_every to a non zero value corresponding to the seconds between +# two generation. Set it to 0 to disable graph auto generation. +generate_every=0 +# See following configuration keys definitions in the Pygal lib documentation +# http://pygal.org/en/stable/documentation/index.html +width=800 +height=600 +style=DarkStyle + +[influxdb] +# !!! +# Will be DEPRECATED in future release. +# Please have a look on the new influxdb3 export module +# !!! +# Configuration for the --export influxdb option +# https://influxdb.com/ +host=localhost +port=8086 +protocol=http +user=root +password=root +db=glances +# Prefix will be added for all measurement name +# Ex: prefix=foo +# => foo.cpu +# => foo.mem +# You can also use dynamic values +#prefix=foo +# Following tags will be added for all measurements +# You can also use dynamic values. +# Note: hostname and name (for process) are always added as a tag +#tags=foo:bar,spam:eggs,domain:`domainname` + +[influxdb2] +# Configuration for the --export influxdb2 option +# https://influxdb.com/ +host=localhost +port=8086 +protocol=http +org=nicolargo +bucket=glances +token=PUT_YOUR_INFLUXDB2_TOKEN_HERE +# Set the interval between two exports (in seconds) +# If the interval is set to 0, the Glances refresh time is used (default behavor) +#interval=0 +# Prefix will be added for all measurement name +# Ex: prefix=foo +# => foo.cpu +# => foo.mem +# You can also use dynamic values +#prefix=foo +# Following tags will be added for all measurements +# You can also use dynamic values. +# Note: hostname and name (for process) are always added as a tag +#tags=foo:bar,spam:eggs,domain:`domainname` + +[influxdb3] +# Configuration for the --export influxdb3 option +# https://influxdb.com/ +host=http://localhost:8181 +org=nicolargo +database=glances +token=PUT_YOUR_INFLUXDB3_TOKEN_HERE +# Set the interval between two exports (in seconds) +# If the interval is set to 0, the Glances refresh time is used (default behavor) +#interval=0 +# Prefix will be added for all measurement name +# Ex: prefix=foo +# => foo.cpu +# => foo.mem +# You can also use dynamic values +#prefix=foo +# Following tags will be added for all measurements +# You can also use dynamic values. +# Note: hostname and name (for process) are always added as a tag +#tags=foo:bar,spam:eggs,domain:`domainname` + +[cassandra] +# Configuration for the --export cassandra option +# Also works for the ScyllaDB +# https://influxdb.com/ or http://www.scylladb.com/ +host=localhost +port=9042 +protocol_version=3 +keyspace=glances +replication_factor=2 +# If not define, table name is set to host key +table=localhost +# If not define, username and password will not be used +#username=cassandra +#password=password + +[opentsdb] +# Configuration for the --export opentsdb option +# http://opentsdb.net/ +host=localhost +port=4242 +#prefix=glances +#tags=foo:bar,spam:eggs + +[statsd] +# Configuration for the --export statsd option +# https://github.com/etsy/statsd +host=localhost +port=8125 +#prefix=glances + +[elasticsearch] +# Configuration for the --export elasticsearch option +# Data are available via the ES RESTful API. ex: URL//cpu +# https://www.elastic.co +scheme=http +host=localhost +port=9200 +index=glances + +[riemann] +# Configuration for the --export riemann option +# http://riemann.io +host=localhost +port=5555 + +[rabbitmq] +# Configuration for the --export rabbitmq option +host=localhost +port=5672 +user=guest +password=guest +queue=glances_queue +#protocol=amqps + +[mqtt] +# Configuration for the --export mqtt option +host=localhost +# Overwrite device name in the topic +#devicename=localhost +port=8883 +tls=false +user=guest +password=guest +topic=glances +topic_structure=per-metric +callback_api_version=2 + +[couchdb] +# Configuration for the --export couchdb option +# https://www.couchdb.org +host=localhost +port=5984 +db=glances +user=admin +password=admin + +[mongodb] +# Configuration for the --export mongodb option +# https://www.mongodb.com +host=localhost +port=27017 +db=glances +user=root +password=example + +[kafka] +# Configuration for the --export kafka option +# http://kafka.apache.org/ +host=localhost +port=9092 +topic=glances +#compression=gzip +# Tags will be added for all events +#tags=foo:bar,spam:eggs +# You can also use dynamic values +#tags=hostname:`hostname -f` + +[zeromq] +# Configuration for the --export zeromq option +# http://www.zeromq.org +# Use * to bind on all interfaces +host=* +port=5678 +# Glances envelopes the stats in a publish message with two frames: +# - First frame containing the following prefix (STRING) +# - Second frame with the Glances plugin name (STRING) +# - Third frame with the Glances plugin stats (JSON) +prefix=G + +[prometheus] +# Configuration for the --export prometheus option +# https://prometheus.io +# Create a Prometheus exporter listening on localhost:9091 (default configuration) +# Metric are exporter using the following name: +# __{labelkey:labelvalue} +# Note: You should add this exporter to your Prometheus server configuration: +# scrape_configs: +# - job_name: 'glances_exporter' +# scrape_interval: 5s +# static_configs: +# - targets: ['localhost:9091'] +# +# Labels will be added for all measurements (default is src:glances) +# labels=foo:bar,spam:eggs +# You can also use dynamic values +# labels=system:`uname -s` +# +host=localhost +port=9091 +#prefix=glances +labels=src:glances + +[restful] +# Configuration for the --export restful option +# Example, export to http://localhost:6789/ +host=localhost +port=6789 +protocol=http +path=/ + +[graphite] +# Configuration for the --export graphite option +# https://graphiteapp.org/ +host=localhost +port=2003 +# Prefix will be added for all measurement name +prefix=glances +# System name added between the prefix and the stats +# By default, system_name = FQDN +#system_name=mycomputer + +[timescaledb] +# Configuration for the --export timescaledb option +# https://www.timescale.com/ +host=localhost +port=5432 +db=glances +user=postgres +password=password +# Overwrite device name (default is the FQDN) +# Most of the time, you should not overwrite this value +#hostname=mycomputer + +[nats] +# Configuration for the --export nats option +# https://nats.io/ +# Host is a separated list of NATS nodes +host=nats://localhost:4222 +# Prefix for the subjects (default is 'glances') +prefix=glances + +############################################################################## +# AMPS +# * enable: Enable (true) or disable (false) the AMP +# * regex: Regular expression to filter the process(es) +# * refresh: The AMP is executed every refresh seconds +# * one_line: (optional) Force (if true) the AMP to be displayed in one line +# * command: (optional) command to execute when the process is detected (thk to the regex) +# * countmin: (optional) minimal number of processes +# A warning will be displayed if number of process < count +# * countmax: (optional) maximum number of processes +# A warning will be displayed if number of process > count +# * : Others variables can be defined and used in the AMP script +############################################################################## + +[amp_dropbox] +# Use the default AMP (no dedicated AMP Python script) +# Check if the Dropbox daemon is running +# Every 3 seconds, display the 'dropbox status' command line +enable=false +regex=.*dropbox.* +refresh=3 +one_line=false +command=dropbox status +countmin=1 + +[amp_python] +# Use the default AMP (no dedicated AMP Python script) +# Monitor all the Python scripts +# Alert if more than 20 Python scripts are running +enable=false +regex=.*python.* +refresh=3 +countmax=20 + +[amp_conntrack] +# Use && separator for multiple commands +# If the regex key is not defined, the AMP will be executed every refresh second +# and the process count will not be displayed (countmin and countmax will be ignore) +enable=false +refresh=30 +one_line=false +command=sysctl net.netfilter.nf_conntrack_count && sysctl net.netfilter.nf_conntrack_max + +[amp_nginx] +# Use the NGinx AMP +# Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/) +enable=false +regex=\/usr\/sbin\/nginx +refresh=60 +one_line=false +status_url=http://localhost/nginx_status + +[amp_systemd] +# Use the Systemd AMP +enable=false +regex=\/lib\/systemd\/systemd +refresh=30 +one_line=true +systemctl_cmd=/bin/systemctl --plain + +[amp_systemv] +# Use the Systemv AMP +enable=false +regex=\/sbin\/init +refresh=30 +one_line=true +service_cmd=/usr/bin/service --status-all diff --git a/docker-files/README.md b/docker-files/README.md new file mode 100644 index 0000000000..c198506b86 --- /dev/null +++ b/docker-files/README.md @@ -0,0 +1,11 @@ +# Dockerfiles + +```bash +make docker +``` + +Then test the image with: + +```bash +make run-docker-alpine-dev +``` diff --git a/docker-files/alpine.Dockerfile b/docker-files/alpine.Dockerfile new file mode 100644 index 0000000000..a0e0e894f1 --- /dev/null +++ b/docker-files/alpine.Dockerfile @@ -0,0 +1,151 @@ +# +# Glances Dockerfile (based on Alpine) +# +# https://github.com/nicolargo/glances +# + +# Note: ENV is for future running containers. ARG for building your Docker image. + +# WARNING: the Alpine image version and Python version should be set. +# Alpine 3.18 tag is a link to the latest 3.18.x version. +# Be aware that if you change the Alpine version, you may have to change the Python version. +ARG IMAGE_VERSION=3.23 +ARG PYTHON_VERSION=3.12 + +############################################################################## +# Base layer to be used for building dependencies and the release images +FROM alpine:${IMAGE_VERSION} AS base + +# Upgrade the system +RUN apk update \ + && apk upgrade --no-cache + +# Install the minimal set of packages +RUN apk add --no-cache \ + python3 \ + curl \ + lm-sensors \ + wireless-tools \ + smartmontools \ + iputils \ + tzdata + +############################################################################## +# BUILD Stages +############################################################################## +# BUILD: Base image shared by all build images +FROM base AS build +ARG PYTHON_VERSION + +RUN apk add --no-cache \ + python3-dev \ + py3-pip \ + py3-wheel \ + musl-dev \ + linux-headers \ + build-base \ + libzmq \ + zeromq-dev \ + # Required for 'cryptography' dependency of optional requirement 'cassandra-driver' \ + # Refer: https://cryptography.io/en/latest/installation/#alpine \ + # `git` required to clone cargo crates (dependencies) + git \ + gcc \ + cargo \ + pkgconfig \ + libffi-dev \ + openssl-dev \ + cmake + # for cmake: Issue: https://github.com/nicolargo/glances/issues/2735 + +RUN python${PYTHON_VERSION} -m venv venv-build +RUN /venv-build/bin/python${PYTHON_VERSION} -m pip install --upgrade pip + +RUN python${PYTHON_VERSION} -m venv --without-pip venv + +COPY pyproject.toml docker-requirements.txt all-requirements.txt ./ + +############################################################################## +# BUILD: Install the minimal image deps +FROM build AS buildminimal +ARG PYTHON_VERSION + +RUN /venv-build/bin/python${PYTHON_VERSION} -m pip install --target="/venv/lib/python${PYTHON_VERSION}/site-packages" \ + -r docker-requirements.txt + +############################################################################## +# BUILD: Install all the deps +FROM build AS buildfull +ARG PYTHON_VERSION + +# Required for optional dependency cassandra-driver +ARG CASS_DRIVER_NO_CYTHON=1 +# See issue 2368 +ARG CARGO_NET_GIT_FETCH_WITH_CLI=true + +RUN /venv-build/bin/python${PYTHON_VERSION} -m pip install --target="/venv/lib/python${PYTHON_VERSION}/site-packages" \ + -r all-requirements.txt + +############################################################################## +# RELEASE Stages +############################################################################## +# Base image shared by all releases +FROM base AS release +ARG PYTHON_VERSION + +# Copy source code and config file +COPY ./docker-compose/glances.conf /etc/glances/glances.conf +COPY ./glances/. /app/glances/ + +# Copy binary and update PATH +COPY docker-bin.sh /usr/local/bin/glances +RUN chmod a+x /usr/local/bin/glances +ENV PATH="/venv/bin:$PATH" + +# EXPOSE PORT (XMLRPC / WebUI) +EXPOSE 61209 61208 + +# Add glances user +# RUN addgroup -g 1000 glances && \ +# adduser -D -u 1000 -G glances glances && \ +# chown -R glances:glances /app + +# Define default command. +WORKDIR /app +ENV PYTHON_VERSION=${PYTHON_VERSION} +CMD ["/bin/sh", "-c", "/venv/bin/python${PYTHON_VERSION} -m glances ${GLANCES_OPT}"] + +################################################################################ +# RELEASE: minimal +FROM release AS minimal + +COPY --from=buildminimal /venv /venv + +# USER glances + +################################################################################ +# RELEASE: full +FROM release AS full + +RUN apk add --no-cache \ + libzmq \ + libvirt-client + +COPY --from=buildfull /venv /venv + +# USER glances + +################################################################################ +# RELEASE: dev - to be compatible with CI +FROM full AS dev + +# Add the specific logger configuration file for Docker dev +# All logs will be forwarded to stdout +COPY ./docker-files/docker-logger.json /app +ENV LOG_CFG=/app/docker-logger.json + +# USER glances + +WORKDIR /app +ENV PYTHON_VERSION=${PYTHON_VERSION} +CMD ["/bin/sh", "-c", "/venv/bin/python${PYTHON_VERSION} -m glances ${GLANCES_OPT}"] diff --git a/docker-files/docker-logger.json b/docker-files/docker-logger.json new file mode 100644 index 0000000000..113158b869 --- /dev/null +++ b/docker-files/docker-logger.json @@ -0,0 +1,24 @@ +{ + "version": 1, + "disable_existing_loggers": "False", + "root": { "level": "INFO", "handlers": ["console"] }, + "formatters": { + "standard": { "format": "%(asctime)s -- %(levelname)s -- %(message)s" }, + "short": { "format": "%(levelname)s -- %(message)s" }, + "long": { + "format": "%(asctime)s -- %(levelname)s -- %(message)s (%(funcName)s in %(filename)s)" + }, + "free": { "format": "%(message)s" } + }, + "handlers": { + "console": { "class": "logging.StreamHandler", "formatter": "standard" } + }, + "loggers": { + "debug": { "handlers": ["console"], "level": "DEBUG" }, + "verbose": { "handlers": ["console"], "level": "INFO" }, + "standard": { "handlers": ["console"], "level": "INFO" }, + "requests": { "handlers": ["console"], "level": "ERROR" }, + "elasticsearch": { "handlers": ["console"], "level": "ERROR" }, + "elasticsearch.trace": { "handlers": ["console"], "level": "ERROR" } + } +} diff --git a/docker-files/ubuntu.Dockerfile b/docker-files/ubuntu.Dockerfile new file mode 100644 index 0000000000..83180ec585 --- /dev/null +++ b/docker-files/ubuntu.Dockerfile @@ -0,0 +1,147 @@ +# +# Glances Dockerfile (based on Ubuntu) +# +# https://github.com/nicolargo/glances +# + +# WARNING: the versions should be set. +# Ex: Python 3.12 for Ubuntu 24.04 +# Note: ENV is for future running containers. ARG for building your Docker image. + +ARG IMAGE_VERSION=24.04 +ARG PYTHON_VERSION=3.12 + +############################################################################## +# Base layer to be used for building dependencies and the release images +FROM ubuntu:${IMAGE_VERSION} AS base +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + python3 \ + curl \ + lm-sensors \ + wireless-tools \ + smartmontools \ + net-tools \ + tzdata \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +############################################################################## +# BUILD Stages +############################################################################## +# BUILD: Base image shared by all build images +FROM base AS build +ARG PYTHON_VERSION +ARG DEBIAN_FRONTEND=noninteractive + +# Upgrade the system +RUN apt-get update \ + && apt-get upgrade -y + +# Install build-time dependencies +RUN apt-get install -y --no-install-recommends \ + python3-dev \ + python3-venv \ + python3-pip \ + python3-wheel \ + libzmq5 \ + musl-dev \ + build-essential + +RUN apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN python3 -m venv --without-pip venv + +COPY pyproject.toml docker-requirements.txt all-requirements.txt ./ + +############################################################################## +# BUILD: Install the minimal image deps +FROM build AS buildminimal +ARG PYTHON_VERSION + +RUN python3 -m pip install --target="/venv/lib/python${PYTHON_VERSION}/site-packages" \ + -r docker-requirements.txt + +############################################################################## +# BUILD: Install all the deps +FROM build AS buildfull +ARG PYTHON_VERSION + +RUN python3 -m pip install --target="/venv/lib/python${PYTHON_VERSION}/site-packages" \ + -r all-requirements.txt + +############################################################################## +# RELEASE Stages +############################################################################## +# Base image shared by all releases +FROM base AS release +ARG PYTHON_VERSION + +# Copy Glances source code and config file +COPY ./docker-compose/glances.conf /etc/glances/glances.conf +COPY ./glances/. /app/glances/ + +# Copy binary and update PATH +COPY docker-bin.sh /usr/local/bin/glances +RUN chmod a+x /usr/local/bin/glances +ENV PATH="/venv/bin:$PATH" + +# EXPOSE PORT (XMLRPC / WebUI) +EXPOSE 61209 61208 + +# Add glances user +# NOTE: If used, the Glances Docker plugin do not work... +# UID and GUID 1000 are already configured for the ubuntu user +# Create anew one with UID and GUID 1001 +# RUN groupadd -g 1001 glances && \ +# useradd -u 1001 -g glances glances && \ +# chown -R glances:glances /app + +# Define default command. +WORKDIR /app +ENV PYTHON_VERSION=${PYTHON_VERSION} +CMD ["/bin/sh", "-c", "/venv/bin/python${PYTHON_VERSION} -m glances ${GLANCES_OPT}"] + +################################################################################ +# RELEASE: minimal +FROM release AS minimal +ARG PYTHON_VERSION + +COPY --from=buildMinimal /venv /venv + +# USER glances + +################################################################################ +# RELEASE: full +FROM release AS full +ARG PYTHON_VERSION + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + libzmq5 \ + libvirt-clients \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=buildfull /venv /venv + +# USER glances + +################################################################################ +# RELEASE: dev - to be compatible with CI +FROM full AS dev +ARG PYTHON_VERSION + +# Add the specific logger configuration file for Docker dev +# All logs will be forwarded to stdout +COPY ./docker-files/docker-logger.json /app +ENV LOG_CFG=/app/docker-logger.json + +# USER glances + +WORKDIR /app +ENV PYTHON_VERSION=${PYTHON_VERSION} +CMD ["/bin/sh", "-c", "/venv/bin/python${PYTHON_VERSION} -m glances ${GLANCES_OPT}"] diff --git a/docker-requirements.txt b/docker-requirements.txt new file mode 100644 index 0000000000..2929fef657 --- /dev/null +++ b/docker-requirements.txt @@ -0,0 +1,165 @@ +# This file was autogenerated by uv via the following command: +# uv export --no-emit-workspace --no-hashes --no-group dev --extra containers --extra web --extra mcp --output-file docker-requirements.txt +annotated-doc==0.0.4 + # via fastapi +annotated-types==0.7.0 + # via pydantic +anyio==4.12.1 + # via + # httpx + # mcp + # sse-starlette + # starlette +attrs==25.4.0 + # via + # jsonschema + # referencing +certifi==2026.2.25 + # via + # httpcore + # httpx + # requests +cffi==2.0.0 ; platform_python_implementation != 'PyPy' + # via cryptography +charset-normalizer==3.4.5 + # via requests +click==8.1.8 + # via uvicorn +colorama==0.4.6 ; sys_platform == 'win32' + # via click +cryptography==46.0.5 + # via + # pyjwt + # python-jose +defusedxml==0.7.1 + # via glances +docker==7.1.0 + # via glances +ecdsa==0.19.1 + # via python-jose +exceptiongroup==1.2.2 ; python_full_version < '3.11' + # via anyio +fastapi==0.135.1 + # via glances +h11==0.16.0 + # via + # httpcore + # uvicorn +httpcore==1.0.9 + # via httpx +httpx==0.28.1 + # via mcp +httpx-sse==0.4.3 + # via mcp +idna==3.11 + # via + # anyio + # httpx + # requests +jinja2==3.1.6 + # via glances +jsonschema==4.25.1 + # via mcp +jsonschema-specifications==2025.9.1 + # via jsonschema +markupsafe==3.0.3 + # via jinja2 +mcp==1.23.3 + # via glances +packaging==26.0 + # via glances +podman==5.7.0 + # via glances +psutil==7.2.2 + # via glances +pyasn1==0.6.2 + # via + # python-jose + # rsa +pycparser==3.0 ; implementation_name != 'PyPy' and platform_python_implementation != 'PyPy' + # via cffi +pydantic==2.12.5 + # via + # fastapi + # mcp + # pydantic-settings +pydantic-core==2.41.5 + # via pydantic +pydantic-settings==2.13.1 + # via mcp +pyinstrument==5.1.2 + # via glances +pyjwt==2.11.0 + # via mcp +python-dateutil==2.9.0.post0 + # via glances +python-dotenv==1.2.2 + # via pydantic-settings +python-jose==3.5.0 + # via glances +python-multipart==0.0.22 + # via mcp +pywin32==311 ; sys_platform == 'win32' + # via + # docker + # mcp +referencing==0.37.0 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.5 + # via + # docker + # glances + # podman +rpds-py==0.30.0 + # via + # jsonschema + # referencing +rsa==4.9.1 + # via python-jose +shtab==1.8.0 ; sys_platform != 'win32' + # via glances +six==1.17.0 + # via + # ecdsa + # glances + # python-dateutil +sse-starlette==3.3.2 + # via mcp +starlette==0.52.1 + # via + # fastapi + # mcp + # sse-starlette +tomli==2.0.2 ; python_full_version < '3.11' + # via podman +typing-extensions==4.15.0 + # via + # anyio + # cryptography + # fastapi + # mcp + # pydantic + # pydantic-core + # referencing + # starlette + # typing-inspection + # uvicorn +typing-inspection==0.4.2 + # via + # fastapi + # mcp + # pydantic + # pydantic-settings +urllib3==2.6.3 + # via + # docker + # podman + # requests +uvicorn==0.41.0 + # via + # glances + # mcp +windows-curses==2.4.1 ; sys_platform == 'win32' + # via glances diff --git a/docs/Makefile b/docs/Makefile index 1ebbaed7bd..0c72c700fc 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,10 +3,15 @@ # You can set these variables from the command line. SPHINXOPTS = -SPHINXBUILD = sphinx-build +SPHINXBUILD = ../.venv/bin/sphinx-build PAPER = BUILDDIR = _build +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter @@ -14,8 +19,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - +.PHONY: help help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @@ -25,53 +29,66 @@ help: @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" +.PHONY: clean clean: - -rm -rf $(BUILDDIR)/* + rm -rf $(BUILDDIR)/* +.PHONY: html html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." +.PHONY: dirhtml dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." +.PHONY: singlehtml singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." +.PHONY: pickle pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." +.PHONY: json json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." +.PHONY: htmlhelp htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." +.PHONY: qthelp qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @@ -81,6 +98,16 @@ qthelp: @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Glances.qhc" +.PHONY: applehelp +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @@ -90,11 +117,13 @@ devhelp: @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Glances" @echo "# devhelp" +.PHONY: epub epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." +.PHONY: latex latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @@ -102,22 +131,36 @@ latex: @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." +.PHONY: latexpdf latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." +.PHONY: latexpdfja +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: text text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." +.PHONY: man man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + rm -f man/* + cp $(BUILDDIR)/man/* man/ + @echo "The manual pages have been copied in ./man." +.PHONY: texinfo texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @@ -125,29 +168,52 @@ texinfo: @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." +.PHONY: info info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." +.PHONY: gettext gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." +.PHONY: changes changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." +.PHONY: linkcheck linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." +.PHONY: doctest doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." + +.PHONY: coverage +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +.PHONY: pseudoxml +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/docs/README.txt b/docs/README.txt new file mode 100644 index 0000000000..3f7b6b24c2 --- /dev/null +++ b/docs/README.txt @@ -0,0 +1,22 @@ +Building the docs +================= + +First install Sphinx and the RTD theme: + + make venv + +or update it if already installed: + + make venv-upgrade + +Go to the docs folder: + + cd docs + +Then build the HTML documentation: + + make html + +and the man page: + + LC_ALL=C make man diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle deleted file mode 100644 index 55ef87fdc7..0000000000 Binary files a/docs/_build/doctrees/environment.pickle and /dev/null differ diff --git a/docs/_build/doctrees/glances-doc.doctree b/docs/_build/doctrees/glances-doc.doctree deleted file mode 100644 index 812de66bf2..0000000000 Binary files a/docs/_build/doctrees/glances-doc.doctree and /dev/null differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree deleted file mode 100644 index 20624f9a9c..0000000000 Binary files a/docs/_build/doctrees/index.doctree and /dev/null differ diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo deleted file mode 100644 index 32820bbab3..0000000000 --- a/docs/_build/html/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 88f9709ac94d939db26f5322044ea5df -tags: fbb0d17656682115ca4d033fb2f83ba1 diff --git a/docs/_build/html/_images/battery.png b/docs/_build/html/_images/battery.png deleted file mode 100644 index 238b7b9471..0000000000 Binary files a/docs/_build/html/_images/battery.png and /dev/null differ diff --git a/docs/_build/html/_images/client-connected.png b/docs/_build/html/_images/client-connected.png deleted file mode 100644 index 29dac50a69..0000000000 Binary files a/docs/_build/html/_images/client-connected.png and /dev/null differ diff --git a/docs/_build/html/_images/client-disconnected.png b/docs/_build/html/_images/client-disconnected.png deleted file mode 100644 index 8bce9c28be..0000000000 Binary files a/docs/_build/html/_images/client-disconnected.png and /dev/null differ diff --git a/docs/_build/html/_images/cpu-wide.png b/docs/_build/html/_images/cpu-wide.png deleted file mode 100644 index 9c1032a0e9..0000000000 Binary files a/docs/_build/html/_images/cpu-wide.png and /dev/null differ diff --git a/docs/_build/html/_images/cpu.png b/docs/_build/html/_images/cpu.png deleted file mode 100644 index 1d5093d375..0000000000 Binary files a/docs/_build/html/_images/cpu.png and /dev/null differ diff --git a/docs/_build/html/_images/diskio.png b/docs/_build/html/_images/diskio.png deleted file mode 100644 index 6766159309..0000000000 Binary files a/docs/_build/html/_images/diskio.png and /dev/null differ diff --git a/docs/_build/html/_images/footer.png b/docs/_build/html/_images/footer.png deleted file mode 100644 index 1145927d78..0000000000 Binary files a/docs/_build/html/_images/footer.png and /dev/null differ diff --git a/docs/_build/html/_images/fs.png b/docs/_build/html/_images/fs.png deleted file mode 100644 index ec9a762231..0000000000 Binary files a/docs/_build/html/_images/fs.png and /dev/null differ diff --git a/docs/_build/html/_images/hddtemp.png b/docs/_build/html/_images/hddtemp.png deleted file mode 100644 index e238efad1b..0000000000 Binary files a/docs/_build/html/_images/hddtemp.png and /dev/null differ diff --git a/docs/_build/html/_images/header.png b/docs/_build/html/_images/header.png deleted file mode 100644 index 5b38183352..0000000000 Binary files a/docs/_build/html/_images/header.png and /dev/null differ diff --git a/docs/_build/html/_images/load.png b/docs/_build/html/_images/load.png deleted file mode 100644 index 48cae12929..0000000000 Binary files a/docs/_build/html/_images/load.png and /dev/null differ diff --git a/docs/_build/html/_images/logs.png b/docs/_build/html/_images/logs.png deleted file mode 100644 index d51f2be8c8..0000000000 Binary files a/docs/_build/html/_images/logs.png and /dev/null differ diff --git a/docs/_build/html/_images/mem-wide.png b/docs/_build/html/_images/mem-wide.png deleted file mode 100644 index 570c022f25..0000000000 Binary files a/docs/_build/html/_images/mem-wide.png and /dev/null differ diff --git a/docs/_build/html/_images/mem.png b/docs/_build/html/_images/mem.png deleted file mode 100644 index 5128c6e822..0000000000 Binary files a/docs/_build/html/_images/mem.png and /dev/null differ diff --git a/docs/_build/html/_images/network.png b/docs/_build/html/_images/network.png deleted file mode 100644 index 3336afd196..0000000000 Binary files a/docs/_build/html/_images/network.png and /dev/null differ diff --git a/docs/_build/html/_images/per-cpu.png b/docs/_build/html/_images/per-cpu.png deleted file mode 100644 index 1660144770..0000000000 Binary files a/docs/_build/html/_images/per-cpu.png and /dev/null differ diff --git a/docs/_build/html/_images/processlist-wide.png b/docs/_build/html/_images/processlist-wide.png deleted file mode 100644 index aa9b244690..0000000000 Binary files a/docs/_build/html/_images/processlist-wide.png and /dev/null differ diff --git a/docs/_build/html/_images/processlist.png b/docs/_build/html/_images/processlist.png deleted file mode 100644 index 460e0f8c39..0000000000 Binary files a/docs/_build/html/_images/processlist.png and /dev/null differ diff --git a/docs/_build/html/_images/screenshot-wide.png b/docs/_build/html/_images/screenshot-wide.png deleted file mode 100644 index e0e3a5105e..0000000000 Binary files a/docs/_build/html/_images/screenshot-wide.png and /dev/null differ diff --git a/docs/_build/html/_images/screenshot.png b/docs/_build/html/_images/screenshot.png deleted file mode 100644 index 1940adb8ea..0000000000 Binary files a/docs/_build/html/_images/screenshot.png and /dev/null differ diff --git a/docs/_build/html/_images/sensors.png b/docs/_build/html/_images/sensors.png deleted file mode 100644 index 8b17c0af6a..0000000000 Binary files a/docs/_build/html/_images/sensors.png and /dev/null differ diff --git a/docs/_build/html/_sources/glances-doc.txt b/docs/_build/html/_sources/glances-doc.txt deleted file mode 100644 index b3549798b1..0000000000 --- a/docs/_build/html/_sources/glances-doc.txt +++ /dev/null @@ -1,529 +0,0 @@ -======= -Glances -======= - -This manual describes *Glances* version 1.7.3. - -Copyright © 2012-2013 Nicolas Hennion - -November 2013 - -.. contents:: Table of Contents - -Introduction -============ - -Glances is a cross-platform curses-based monitoring tool which aims to -present a maximum of information in a minimum of space, ideally to fit -in a classical 80x24 terminal or higher to have additional information. - -Glances can adapt dynamically the displayed information depending on the -terminal size. It can also work in a client/server mode for remote monitoring. - -Glances is written in Python and uses the `psutil`_ library to get information from your system. - -Console (80x24) - -.. image:: images/screenshot.png - -Full view (>80x24) - -.. image:: images/screenshot-wide.png - -Usage -===== - -Standalone mode ---------------- - -Simply run: - -.. code-block:: console - - $ glances - -Client/Server mode ------------------- - -If you want to remotely monitor a machine, called ``server``, from another one, called ``client``, -just run on the server: - -.. code-block:: console - - server$ glances -s - -and on the client: - -.. code-block:: console - - client$ glances -c @server - -where ``@server`` is the IP address or hostname of the server. - -In server mode, you can set the bind address ``-B ADDRESS`` and listening TCP port ``-p PORT``. - -In client mode, you can set the TCP port of the server ``-p PORT``. - -Default binding address is ``0.0.0.0`` (Glances will listen on all the network interfaces) and TCP port is ``61209``. - -In client/server mode, limits are set by the server side. - -You can also set a password to access to the server ``-P password``. - -Glances is ``IPv6`` compatible. Just use the ``-B ::`` option to bind to all IPv6 addresses. - -Command reference -================= - -Command-line options --------------------- - --b Display network rate in Byte per second (default: bit per second) --B IP Bind server to the given IPv4/IPv6 address or hostname --c IP Connect to a Glances server by IPv4/IPv6 address or hostname --C FILE Path to the configuration file --d Disable disk I/O module --e Enable sensors module (requires pysensors, Linux-only) --f FILE Set the HTML output folder or CSV file --h Display the help and exit --m Disable mount module --n Disable network module --o OUTPUT Define additional output (available: HTML or CSV) --p PORT Define the client/server TCP port (default: 61209) --P PASSWORD Define a client/server password ---password Define a client/server password from the prompt --r Disable process list (for low CPU consumption) --s Run Glances in server mode --t SECONDS Set refresh time in seconds (default: 3 sec) --v Display the version and exit --y Enable hddtemp module (requires hddtemp) --z Do not use the bold color attribute --1 Start Glances in per-CPU mode - -Interactive commands --------------------- - -The following commands (key pressed) are supported while in Glances: - - -``a`` - Sort process list automatically - - - If CPU iowait ``>60%``, sort processes by I/O read and write - - If CPU ``>70%``, sort processes by CPU usage - - If MEM ``>70%``, sort processes by memory usage -``b`` - Switch between bit/s or Byte/s for network I/O -``c`` - Sort processes by CPU usage -``d`` - Show/hide disk I/O stats -``f`` - Show/hide file system stats -``h`` - Show/hide the help screen -``i`` - Sort processes by I/O rate (may need root privileges on some OSes) -``l`` - Show/hide log messages -``m`` - Sort processes by MEM usage -``n`` - Show/hide network stats -``p`` - Sort processes by name -``q`` - Quit -``s`` - Show/hide sensors stats (only available with -e flag) -``t`` - View network I/O as combination -``u`` - View cumulative network I/O -``w`` - Delete finished warning log messages -``x`` - Delete finished warning and critical log messages -``y`` - Show/hide hddtemp stats (only available with -y flag) -``1`` - Switch between global CPU and per-CPU stats - -Configuration -============= - -No configuration file is mandatory to use Glances. - -Furthermore a configuration file is needed for setup limits and/or monitored processes list. - -By default, the configuration file is under: - -:Linux: ``/etc/glances/glances.conf`` -:\*BSD and OS X: ``/usr/local/etc/glances/glances.conf`` -:Windows: ``%APPDATA%\glances\glances.conf`` - -On Windows XP, the ``%APPDATA%`` path is: - -.. code-block:: console - - C:\Documents and Settings\\Application Data - -Since Windows Vista and newer versions: - -.. code-block:: console - - C:\Users\\AppData\Roaming - -You can override the default configuration, located in one of the above -directories on your system, except for Windows. - -Just copy the ``glances.conf`` file to your ``$XDG_CONFIG_HOME`` directory, e.g. Linux: - -.. code-block:: console - - mkdir -p $XDG_CONFIG_HOME/glances - cp /etc/glances/glances.conf $XDG_CONFIG_HOME/glances/ - -On OS X, you should copy the configuration file to ``~/Library/Application Support/glances/``. - -Anatomy of the application -========================== - -Legend ------- - -| ``GREEN`` stat counter is ``"OK"`` -| ``BLUE`` stat counter is ``"CAREFUL"`` -| ``MAGENTA`` stat counter is ``"WARNING"`` -| ``RED`` stat counter is ``"CRITICAL"`` - -Header ------- - -.. image:: images/header.png - -The header shows the OS name, release version, platform architecture and the hostname. -On Linux, it shows also the kernel version. - -CPU ---- - -Short view: - -.. image:: images/cpu.png - -If enough horizontal space is available, extended CPU informations are displayed. - -Extended view: - -.. image:: images/cpu-wide.png - -To switch to per-CPU stats, just hit the ``1`` key: - -.. image:: images/per-cpu.png - -The CPU stats are shown as a percentage and for the configured refresh time. -The total CPU usage is displayed on the first line. - -| If user|system|nice CPU is ``<50%``, then status is set to ``"OK"`` -| If user|system|nice CPU is ``>50%``, then status is set to ``"CAREFUL"`` -| If user|system|nice CPU is ``>70%``, then status is set to ``"WARNING"`` -| If user|system|nice CPU is ``>90%``, then status is set to ``"CRITICAL"`` - -*Note*: limit values can be overwritten in the configuration file under the ``[cpu]`` section. - -Load ----- - -.. image:: images/load.png - -On the *No Sheep* blog, *Zachary Tirrell* defines the average load [1]_: - - "In short it is the average sum of the number of processes - waiting in the run-queue plus the number currently executing - over 1, 5, and 15 minute time periods." - -Glances gets the number of CPU core to adapt the alerts. -Alerts on average load are only set on 5 and 15 min. -The first line also display the number of CPU core. - -| If average load is ``<0.7*core``, then status is set to ``"OK"`` -| If average load is ``>0.7*core``, then status is set to ``"CAREFUL"`` -| If average load is ``>1*core``, then status is set to ``"WARNING"`` -| If average load is ``>5*core``, then status is set to ``"CRITICAL"`` - -*Note*: limit values can be overwritten in the configuration file under the ``[load]`` section. - -Memory ------- - -Glances uses two columns: one for the ``RAM`` and another one for the ``Swap``. - -.. image:: images/mem.png - -If enough space is available, Glances displays extended informations: - -.. image:: images/mem-wide.png - -With Glances, alerts are only set for on used memory and used swap. - -| If memory is ``<50%``, then status is set to ``"OK"`` -| If memory is ``>50%``, then status is set to ``"CAREFUL"`` -| If memory is ``>70%``, then status is set to ``"WARNING"`` -| If memory is ``>90%``, then status is set to ``"CRITICAL"`` - -*Note*: limit values can be overwritten in the configuration file under the ``[memory]`` and ``[swap]`` sections. - -Network -------- - -.. image:: images/network.png - -Glances displays the network interface bit rate. The unit is adapted -dynamically (bits per second, kbits per second, Mbits per second, etc). - -Alerts are only set if the network interface maximum speed is available. - -For example, on a 100 Mbps ethernet interface, the warning status is set -if the bit rate is higher than 70 Mbps. - -| If bit rate is ``<50%``, then status is set to ``"OK"`` -| If bit rate is ``>50%``, then status is set to ``"CAREFUL"`` -| If bit rate is ``>70%``, then status is set to ``"WARNING"`` -| If bit rate is ``>90%``, then status is set to ``"CRITICAL"`` - -Sensors -------- - -Glances can displays the sensors informations trough `lm-sensors` (only available on Linux). - -As of lm-sensors, a filter is processed in order to display temperature only: - -.. image:: images/sensors.png - - -Glances can also grab hard disk temperature through the `hddtemp` daemon (see here [2]_ to install hddtemp on your system): - -.. image:: images/hddtemp.png - -To enable the lm-sensors module: - -.. code-block:: console - - $ glances -e - -To enable the hddtemp module: - -.. code-block:: console - - $ glances -y - -There is no alert on this information. - -*Note*: limit values can be overwritten in the configuration file under the ``[temperature]`` and ``[hddtemperature]`` sections. - -Disk I/O --------- - -.. image:: images/diskio.png - -Glances displays the disk I/O throughput. The unit is adapted dynamically. - -*Note*: There is no alert on this information. - -File system ------------ - -.. image:: images/fs.png - -Glances displays the used and total file system disk space. The unit is -adapted dynamically. - -Alerts are set for used disk space: - -| If disk used is ``<50%``, then status is set to ``"OK"`` -| If disk used is ``>50%``, then status is set to ``"CAREFUL"`` -| If disk used is ``>70%``, then status is set to ``"WARNING"`` -| If disk used is ``>90%``, then status is set to ``"CRITICAL"`` - -*Note*: limit values can be overwritten in the configuration file under ``[filesystem]`` section. - -Processes list --------------- - -Compact view: - -.. image:: images/processlist.png - -Full view: - -.. image:: images/processlist-wide.png - -Three views are available for processes: - -* Processes summary -* Optional monitored processes list (new in 1.7) -* Processes list - -By default, or if you hit the ``a`` key, the processes list is automatically -sorted by CPU of memory usage. - -*Note*: limit values can be overwritten in the configuration file under the ``[process]`` section. - -The number of processes in the list is adapted to the screen size. - -``VIRT`` - Total program size (VMS) -``RES`` - Resident set size (RSS) -``CPU%`` - % of CPU used by the process -``MEM%`` - % of MEM used by the process -``PID`` - Process ID -``USER`` - User ID per process -``NI`` - Nice level of the process -``S`` - Process status -``TIME+`` - Cumulative CPU time used -``IOR/s`` - Per process IO read rate (in Byte/s) -``IOW/s`` - Per process IO write rate (in Byte/s) -``NAME`` - Process name or command line - -Process status legend: - -``R`` - running -``S`` - sleeping (may be interrupted) -``D`` - disk sleep (may not be interrupted) -``T`` - traced/stopped -``Z`` - zombie - -Monitored processes list ------------------------- - -New in version 1.7. Optional. - -The monitored processes list allows user, through the configuration file, -to group processes and quickly show if the number of running process is not good. - -.. image:: images/monitored.png - -Each item is defined by: - -* ``description``: description of the processes (max 16 chars). -* ``regex``: regular expression of the processes to monitor. -* ``command`` (optional): full path to shell command/script for extended stat. Should return a single line string. Use with caution. -* ``countmin`` (optional): minimal number of processes. A warning will be displayed if number of processes < count. -* ``countmax`` (optional): maximum number of processes. A warning will be displayed if number of processes > count. - -Up to 10 items can be defined. - -For example, if you want to monitor the Nginx processes on a Web server, the following definition should do the job: - -.. code-block:: console - - [monitor] - list_1_description=Nginx server - list_1_regex=.*nginx.* - list_1_command=nginx -v - list_1_countmin=1 - list_1_countmax=4 - -If you also want to monitor the PHP-FPM daemon processes, you should add another item: - -.. code-block:: console - - [monitor] - list_1_description=Nginx server - list_1_regex=.*nginx.* - list_1_command=nginx -v - list_1_countmin=1 - list_1_countmax=4 - list_1_description=PHP-FPM - list_1_regex=.*php-fpm.* - list_1_countmin=1 - list_1_countmax=20 - -In client/server mode, the list is defined on the server side. -A new method, called getAllMonitored, is available in the APIs and get the JSON representation of the monitored processes list. - -Alerts are set as following: - -| If number of processes is 0, then status is set to ``"CRITICAL"`` -| If number of processes is min < current < max, then status is set to ``"OK"`` -| Else status is set to ``"WARNING"`` - -Logs ----- - -.. image:: images/logs.png - -A log messages list is displayed in the bottom of the screen if (and only if): - -- at least one ``WARNING`` or ``CRITICAL`` alert was occurred -- space is available in the bottom of the console/terminal - -Each alert message displays the following information: - -1. start date -2. end date -3. alert name -4. {min/avg/max} values or number of running processes for monitored processes list alerts - -Footer ------- - -.. image:: images/footer.png - -Glances displays the current date & time and access to the embedded help screen. - -If one or mode batteries were found on your machine and if the batinfo Python library [3]_ -is installed on your system then Glances displays the available percent capacity in the middle on the footer. - -.. image:: images/battery.png - -If you have ran Glances in client mode ``-c``, you can also see if the client is connected to the server. - -If client is connected: - -.. image:: images/client-connected.png - -else: - -.. image:: images/client-disconnected.png - -On the left, you can easily see if you are connected to a Glances server. - -API documentation -================= - -Glances uses a `XML-RPC server`_ and can be used by another client software. - -API documentation is available at https://github.com/nicolargo/glances/wiki/The-Glances-API-How-To - -Support -======= - -To report a bug or a feature request use the bug tracking system at https://github.com/nicolargo/glances/issues - -Feel free to contribute! - - -.. [1] http://nosheep.net/story/defining-unix-load-average/ -.. [2] http://www.cyberciti.biz/tips/howto-monitor-hard-drive-temperature.html -.. [3] https://github.com/nicolargo/batinfo - -.. _psutil: https://code.google.com/p/psutil/ -.. _XML-RPC server: http://docs.python.org/2/library/simplexmlrpcserver.html diff --git a/docs/_build/html/_sources/index.txt b/docs/_build/html/_sources/index.txt deleted file mode 100644 index b03349f36c..0000000000 --- a/docs/_build/html/_sources/index.txt +++ /dev/null @@ -1,28 +0,0 @@ -Welcome to Glances's documentation! -=================================== - -**Glances** is a cross-platform curses-based monitoring tool written in Python. - -It uses the psutil library and some internal code to get information from your system. - -.. image:: https://raw.github.com/nicolargo/glances/master/docs/images/screenshot-wide.png - -Get the code ------------- - -The `source `_ is available on GitHub. - -Contents --------- - -.. toctree:: - :maxdepth: 2 - - glances-doc - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/_build/html/_static/ajax-loader.gif b/docs/_build/html/_static/ajax-loader.gif deleted file mode 100644 index 61faf8cab2..0000000000 Binary files a/docs/_build/html/_static/ajax-loader.gif and /dev/null differ diff --git a/docs/_build/html/_static/basic.css b/docs/_build/html/_static/basic.css deleted file mode 100644 index 43e8bafaf3..0000000000 --- a/docs/_build/html/_static/basic.css +++ /dev/null @@ -1,540 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - float: left; - width: 230px; - margin-left: -100%; - font-size: 90%; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox input[type="text"] { - width: 170px; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - width: 30px; -} - -img { - border: 0; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable dl, table.indextable dd { - margin-top: 0; - margin-bottom: 0; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- general body styles --------------------------------------------------- */ - -a.headerlink { - visibility: hidden; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink { - visibility: visible; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -.field-list ul { - padding-left: 1em; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - border: 0; - border-collapse: collapse; -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -table.field-list td, table.field-list th { - border: 0 !important; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, .highlighted { - background-color: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.refcount { - color: #060; -} - -.optional { - font-size: 1.3em; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -tt.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -tt.descclassname { - background-color: transparent; -} - -tt.xref, a tt { - background-color: transparent; - font-weight: bold; -} - -h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.body div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/docs/_build/html/_static/comment-bright.png b/docs/_build/html/_static/comment-bright.png deleted file mode 100644 index 551517b8c8..0000000000 Binary files a/docs/_build/html/_static/comment-bright.png and /dev/null differ diff --git a/docs/_build/html/_static/comment-close.png b/docs/_build/html/_static/comment-close.png deleted file mode 100644 index 09b54be46d..0000000000 Binary files a/docs/_build/html/_static/comment-close.png and /dev/null differ diff --git a/docs/_build/html/_static/comment.png b/docs/_build/html/_static/comment.png deleted file mode 100644 index 92feb52b88..0000000000 Binary files a/docs/_build/html/_static/comment.png and /dev/null differ diff --git a/docs/_build/html/_static/default.css b/docs/_build/html/_static/default.css deleted file mode 100644 index 21f3f5098d..0000000000 --- a/docs/_build/html/_static/default.css +++ /dev/null @@ -1,256 +0,0 @@ -/* - * default.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- default theme. - * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: sans-serif; - font-size: 100%; - background-color: #11303d; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: #1c4e63; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: #ffffff; - color: #000000; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #ffffff; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #ffffff; - text-decoration: underline; -} - -div.related { - background-color: #133f52; - line-height: 30px; - color: #ffffff; -} - -div.related a { - color: #ffffff; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #ffffff; -} - -div.sphinxsidebar h4 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #ffffff; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #ffffff; -} - -div.sphinxsidebar a { - color: #98dbcc; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #355f7c; - text-decoration: none; -} - -a:visited { - color: #355f7c; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Trebuchet MS', sans-serif; - background-color: #f2f2f2; - font-weight: normal; - color: #20435c; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #c60f0f; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #c60f0f; - color: white; -} - -div.body p, div.body dd, div.body li { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -tt { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th { - background-color: #ede; -} - -.warning tt { - background: #efc2c2; -} - -.note tt { - background: #d6d6d6; -} - -.viewcode-back { - font-family: sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} \ No newline at end of file diff --git a/docs/_build/html/_static/doctools.js b/docs/_build/html/_static/doctools.js deleted file mode 100644 index d4619fdfb1..0000000000 --- a/docs/_build/html/_static/doctools.js +++ /dev/null @@ -1,247 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(x) { - return decodeURIComponent(x).replace(/\+/g, ' '); -} - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s == 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * small function to check if an array contains - * a given item. - */ -jQuery.contains = function(arr, item) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] == item) - return true; - } - return false; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node) { - if (node.nodeType == 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { - var span = document.createElement("span"); - span.className = className; - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this); - }); - } - } - return this.each(function() { - highlight(this); - }); -}; - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, - LOCALE : 'unknown', - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated == 'undefined') - return string; - return (typeof translated == 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated == 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) == 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this == '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/docs/_build/html/_static/down-pressed.png b/docs/_build/html/_static/down-pressed.png deleted file mode 100644 index 6f7ad78278..0000000000 Binary files a/docs/_build/html/_static/down-pressed.png and /dev/null differ diff --git a/docs/_build/html/_static/down.png b/docs/_build/html/_static/down.png deleted file mode 100644 index 3003a88770..0000000000 Binary files a/docs/_build/html/_static/down.png and /dev/null differ diff --git a/docs/_build/html/_static/file.png b/docs/_build/html/_static/file.png deleted file mode 100644 index d18082e397..0000000000 Binary files a/docs/_build/html/_static/file.png and /dev/null differ diff --git a/docs/_build/html/_static/jquery.js b/docs/_build/html/_static/jquery.js deleted file mode 100644 index e2efc335e9..0000000000 --- a/docs/_build/html/_static/jquery.js +++ /dev/null @@ -1,9404 +0,0 @@ -/*! - * jQuery JavaScript Library v1.7.2 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Fri Jul 5 14:07:58 UTC 2013 - */ -(function( window, undefined ) { - -// Use the correct document accordingly with window argument (sandbox) -var document = window.document, - navigator = window.navigator, - location = window.location; -var jQuery = (function() { - -// Define a local copy of jQuery -var jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // A central reference to the root jQuery(document) - rootjQuery, - - // A simple way to check for HTML strings or ID strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Check if a string has a non-whitespace character in it - rnotwhite = /\S/, - - // Used for trimming whitespace - trimLeft = /^\s+/, - trimRight = /\s+$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - - // Useragent RegExp - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - - // Matches dashed string for camelizing - rdashAlpha = /-([a-z]|[0-9])/ig, - rmsPrefix = /^-ms-/, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // Keep a UserAgent string for use with jQuery.browser - userAgent = navigator.userAgent, - - // For matching the engine and version of the browser - browserMatch, - - // The deferred used on DOM ready - readyList, - - // The ready event handler - DOMContentLoaded, - - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), or $(undefined) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // The body element only exists once, optimize finding it - if ( selector === "body" && !context && document.body ) { - this.context = document; - this[0] = document.body; - this.selector = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = quickExpr.exec( selector ); - } - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context ? context.ownerDocument || context : document ); - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - ret = rsingleTag.exec( selector ); - - if ( ret ) { - if ( jQuery.isPlainObject( context ) ) { - selector = [ document.createElement( ret[1] ) ]; - jQuery.fn.attr.call( selector, context, true ); - - } else { - selector = [ doc.createElement( ret[1] ) ]; - } - - } else { - ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); - selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; - } - - return jQuery.merge( this, selector ); - - // HANDLE: $("#id") - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.7.2", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return slice.call( this, 0 ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = this.constructor(); - - if ( jQuery.isArray( elems ) ) { - push.apply( ret, elems ); - - } else { - jQuery.merge( ret, elems ); - } - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Attach the listeners - jQuery.bindReady(); - - // Add the callback - readyList.add( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ), - "slice", slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - // Either a released hold or an DOMready/load event and not yet ready - if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.fireWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger( "ready" ).off( "ready" ); - } - } - }, - - bindReady: function() { - if ( readyList ) { - return; - } - - readyList = jQuery.Callbacks( "once memory" ); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( jQuery.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} - - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - for ( var name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - parseJSON: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - var xml, tmp; - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction( object ); - - if ( args ) { - if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { - break; - } - } - } - } - - return object; - }, - - // Use native String.trim function wherever possible - trim: trim ? - function( text ) { - return text == null ? - "" : - trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); - }, - - // results is for internal usage only - makeArray: function( array, results ) { - var ret = results || []; - - if ( array != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type( array ); - - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - push.call( ret, array ); - } else { - jQuery.merge( ret, array ); - } - } - - return ret; - }, - - inArray: function( elem, array, i ) { - var len; - - if ( array ) { - if ( indexOf ) { - return indexOf.call( array, elem, i ); - } - - len = array.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in array && array[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var i = first.length, - j = 0; - - if ( typeof second.length === "number" ) { - for ( var l = second.length; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var ret = [], retVal; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - if ( typeof context === "string" ) { - var tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - var args = slice.call( arguments, 2 ), - proxy = function() { - return fn.apply( context, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Mutifunctional method to get and set values to a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, pass ) { - var exec, - bulk = key == null, - i = 0, - length = elems.length; - - // Sets many values - if ( key && typeof key === "object" ) { - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); - } - chainable = 1; - - // Sets one value - } else if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = pass === undefined && jQuery.isFunction( value ); - - if ( bulk ) { - // Bulk operations only iterate when executing function values - if ( exec ) { - exec = fn; - fn = function( elem, key, value ) { - return exec.call( jQuery( elem ), value ); - }; - - // Otherwise they run against the entire set - } else { - fn.call( elems, value ); - fn = null; - } - } - - if ( fn ) { - for (; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - } - - chainable = 1; - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - uaMatch: function( ua ) { - ua = ua.toLowerCase(); - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }, - - sub: function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; - }, - - browser: {} -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -browserMatch = jQuery.uaMatch( userAgent ); -if ( browserMatch.browser ) { - jQuery.browser[ browserMatch.browser ] = true; - jQuery.browser.version = browserMatch.version; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -// IE doesn't match non-breaking spaces with \s -if ( rnotwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -return jQuery; - -})(); - - -// String to Object flags format cache -var flagsCache = {}; - -// Convert String-formatted flags into Object-formatted ones and store in cache -function createFlags( flags ) { - var object = flagsCache[ flags ] = {}, - i, length; - flags = flags.split( /\s+/ ); - for ( i = 0, length = flags.length; i < length; i++ ) { - object[ flags[i] ] = true; - } - return object; -} - -/* - * Create a callback list using the following parameters: - * - * flags: an optional list of space-separated flags that will change how - * the callback list behaves - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible flags: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( flags ) { - - // Convert flags from String-formatted to Object-formatted - // (we check in cache first) - flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; - - var // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = [], - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Add one or several callbacks to the list - add = function( args ) { - var i, - length, - elem, - type, - actual; - for ( i = 0, length = args.length; i < length; i++ ) { - elem = args[ i ]; - type = jQuery.type( elem ); - if ( type === "array" ) { - // Inspect recursively - add( elem ); - } else if ( type === "function" ) { - // Add if not in unique mode and callback is not in - if ( !flags.unique || !self.has( elem ) ) { - list.push( elem ); - } - } - } - }, - // Fire callbacks - fire = function( context, args ) { - args = args || []; - memory = !flags.memory || [ context, args ]; - fired = true; - firing = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { - memory = true; // Mark as halted - break; - } - } - firing = false; - if ( list ) { - if ( !flags.once ) { - if ( stack && stack.length ) { - memory = stack.shift(); - self.fireWith( memory[ 0 ], memory[ 1 ] ); - } - } else if ( memory === true ) { - self.disable(); - } else { - list = []; - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - var length = list.length; - add( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away, unless previous - // firing was halted (stopOnFalse) - } else if ( memory && memory !== true ) { - firingStart = length; - fire( memory[ 0 ], memory[ 1 ] ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - var args = arguments, - argIndex = 0, - argLength = args.length; - for ( ; argIndex < argLength ; argIndex++ ) { - for ( var i = 0; i < list.length; i++ ) { - if ( args[ argIndex ] === list[ i ] ) { - // Handle firingIndex and firingLength - if ( firing ) { - if ( i <= firingLength ) { - firingLength--; - if ( i <= firingIndex ) { - firingIndex--; - } - } - } - // Remove the element - list.splice( i--, 1 ); - // If we have some unicity property then - // we only need to do this once - if ( flags.unique ) { - break; - } - } - } - } - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - if ( list ) { - var i = 0, - length = list.length; - for ( ; i < length; i++ ) { - if ( fn === list[ i ] ) { - return true; - } - } - } - return false; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory || memory === true ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( stack ) { - if ( firing ) { - if ( !flags.once ) { - stack.push( [ context, args ] ); - } - } else if ( !( flags.once && memory ) ) { - fire( context, args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - - - -var // Static reference to slice - sliceDeferred = [].slice; - -jQuery.extend({ - - Deferred: function( func ) { - var doneList = jQuery.Callbacks( "once memory" ), - failList = jQuery.Callbacks( "once memory" ), - progressList = jQuery.Callbacks( "memory" ), - state = "pending", - lists = { - resolve: doneList, - reject: failList, - notify: progressList - }, - promise = { - done: doneList.add, - fail: failList.add, - progress: progressList.add, - - state: function() { - return state; - }, - - // Deprecated - isResolved: doneList.fired, - isRejected: failList.fired, - - then: function( doneCallbacks, failCallbacks, progressCallbacks ) { - deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); - return this; - }, - always: function() { - deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); - return this; - }, - pipe: function( fnDone, fnFail, fnProgress ) { - return jQuery.Deferred(function( newDefer ) { - jQuery.each( { - done: [ fnDone, "resolve" ], - fail: [ fnFail, "reject" ], - progress: [ fnProgress, "notify" ] - }, function( handler, data ) { - var fn = data[ 0 ], - action = data[ 1 ], - returned; - if ( jQuery.isFunction( fn ) ) { - deferred[ handler ](function() { - returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - }); - } else { - deferred[ handler ]( newDefer[ action ] ); - } - }); - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - if ( obj == null ) { - obj = promise; - } else { - for ( var key in promise ) { - obj[ key ] = promise[ key ]; - } - } - return obj; - } - }, - deferred = promise.promise({}), - key; - - for ( key in lists ) { - deferred[ key ] = lists[ key ].fire; - deferred[ key + "With" ] = lists[ key ].fireWith; - } - - // Handle state - deferred.done( function() { - state = "resolved"; - }, failList.disable, progressList.lock ).fail( function() { - state = "rejected"; - }, doneList.disable, progressList.lock ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( firstParam ) { - var args = sliceDeferred.call( arguments, 0 ), - i = 0, - length = args.length, - pValues = new Array( length ), - count = length, - pCount = length, - deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? - firstParam : - jQuery.Deferred(), - promise = deferred.promise(); - function resolveFunc( i ) { - return function( value ) { - args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - if ( !( --count ) ) { - deferred.resolveWith( deferred, args ); - } - }; - } - function progressFunc( i ) { - return function( value ) { - pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - deferred.notifyWith( promise, pValues ); - }; - } - if ( length > 1 ) { - for ( ; i < length; i++ ) { - if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { - args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); - } else { - --count; - } - } - if ( !count ) { - deferred.resolveWith( deferred, args ); - } - } else if ( deferred !== firstParam ) { - deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); - } - return promise; - } -}); - - - - -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - fragment, - tds, - events, - eventName, - i, - isSupported, - div = document.createElement( "div" ), - documentElement = document.documentElement; - - // Preliminary tests - div.setAttribute("className", "t"); - div.innerHTML = "
a"; - - all = div.getElementsByTagName( "*" ); - a = div.getElementsByTagName( "a" )[ 0 ]; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement( "select" ); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName( "input" )[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.55/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - pixelMargin: true - }; - - // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead - jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat"); - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent( "onclick" ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute("type", "radio"); - support.radioValue = input.value === "t"; - - input.setAttribute("checked", "checked"); - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for ( i in { - submit: 1, - change: 1, - focusin: 1 - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - fragment.removeChild( div ); - - // Null elements to avoid leaks in IE - fragment = select = opt = div = input = null; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, outer, inner, table, td, offsetSupport, - marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight, - paddingMarginBorderVisibility, paddingMarginBorder, - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - conMarginTop = 1; - paddingMarginBorder = "padding:0;margin:0;border:"; - positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;"; - paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;"; - style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;"; - html = "
" + - "" + - "
"; - - container = document.createElement("div"); - container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "
t
"; - tds = div.getElementsByTagName( "td" ); - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - if ( window.getComputedStyle ) { - div.innerHTML = ""; - marginDiv = document.createElement( "div" ); - marginDiv.style.width = "0"; - marginDiv.style.marginRight = "0"; - div.style.width = "2px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.innerHTML = ""; - div.style.width = div.style.padding = "1px"; - div.style.border = 0; - div.style.overflow = "hidden"; - div.style.display = "inline"; - div.style.zoom = 1; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = "block"; - div.style.overflow = "visible"; - div.innerHTML = "
"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - } - - div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility; - div.innerHTML = html; - - outer = div.firstChild; - inner = outer.firstChild; - td = outer.nextSibling.firstChild.firstChild; - - offsetSupport = { - doesNotAddBorder: ( inner.offsetTop !== 5 ), - doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) - }; - - inner.style.position = "fixed"; - inner.style.top = "20px"; - - // safari subtracts parent border width here which is 5px - offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); - inner.style.position = inner.style.top = ""; - - outer.style.overflow = "hidden"; - outer.style.position = "relative"; - - offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); - offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); - - if ( window.getComputedStyle ) { - div.style.marginTop = "1%"; - support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%"; - } - - if ( typeof container.style.zoom !== "undefined" ) { - container.style.zoom = 1; - } - - body.removeChild( container ); - marginDiv = div = container = null; - - jQuery.extend( support, offsetSupport ); - }); - - return support; -})(); - - - - -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var privateCache, thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, - isEvents = name === "events"; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - privateCache = thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Users should not attempt to inspect the internal events object using jQuery.data, - // it is undocumented and subject to change. But does anyone listen? No. - if ( isEvents && !thisCache[ name ] ) { - return privateCache.events; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - // Reference to internal data cache key - internalKey = jQuery.expando, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - - // See jQuery.data for more information - id = isNode ? elem[ internalKey ] : internalKey; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split( " " ); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject(cache[ id ]) ) { - return; - } - } - - // Browsers that fail expando deletion also refuse to delete expandos on - // the window, but it will allow it on all other JS objects; other browsers - // don't care - // Ensure that `cache` is not a window object #10080 - if ( jQuery.support.deleteExpando || !cache.setInterval ) { - delete cache[ id ]; - } else { - cache[ id ] = null; - } - - // We destroyed the cache and need to eliminate the expando on the node to avoid - // false lookups in the cache for entries that no longer exist - if ( isNode ) { - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( jQuery.support.deleteExpando ) { - delete elem[ internalKey ]; - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - } else { - elem[ internalKey ] = null; - } - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - if ( elem.nodeName ) { - var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; - - if ( match ) { - return !(match === true || elem.getAttribute("classid") !== match); - } - } - - return true; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, part, attr, name, l, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attr = elem.attributes; - for ( l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split( ".", 2 ); - parts[1] = parts[1] ? "." + parts[1] : ""; - part = parts[1] + "!"; - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - data = this.triggerHandler( "getData" + part, [ parts[0] ] ); - - // Try to fetch any internally stored data first - if ( data === undefined && elem ) { - data = jQuery.data( elem, key ); - data = dataAttr( elem, key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } - - parts[1] = value; - this.each(function() { - var self = jQuery( this ); - - self.triggerHandler( "setData" + part, parts ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + part, parts ); - }); - }, null, value, arguments.length > 1, null, false ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - jQuery.isNumeric( data ) ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - for ( var name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} - - - - -function handleQueueMarkDefer( elem, type, src ) { - var deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - defer = jQuery._data( elem, deferDataKey ); - if ( defer && - ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && - ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { - // Give room for hard-coded callbacks to fire first - // and eventually mark/queue something else on the element - setTimeout( function() { - if ( !jQuery._data( elem, queueDataKey ) && - !jQuery._data( elem, markDataKey ) ) { - jQuery.removeData( elem, deferDataKey, true ); - defer.fire(); - } - }, 0 ); - } -} - -jQuery.extend({ - - _mark: function( elem, type ) { - if ( elem ) { - type = ( type || "fx" ) + "mark"; - jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); - } - }, - - _unmark: function( force, elem, type ) { - if ( force !== true ) { - type = elem; - elem = force; - force = false; - } - if ( elem ) { - type = type || "fx"; - var key = type + "mark", - count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); - if ( count ) { - jQuery._data( elem, key, count ); - } else { - jQuery.removeData( elem, key, true ); - handleQueueMarkDefer( elem, type, "mark" ); - } - } - }, - - queue: function( elem, type, data ) { - var q; - if ( elem ) { - type = ( type || "fx" ) + "queue"; - q = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !q || jQuery.isArray(data) ) { - q = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - q.push( data ); - } - } - return q || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = {}; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - jQuery._data( elem, type + ".run", hooks ); - fn.call( elem, function() { - jQuery.dequeue( elem, type ); - }, hooks ); - } - - if ( !queue.length ) { - jQuery.removeData( elem, type + "queue " + type + ".run", true ); - handleQueueMarkDefer( elem, type, "queue" ); - } - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, object ) { - if ( typeof type !== "string" ) { - object = type; - type = undefined; - } - type = type || "fx"; - var defer = jQuery.Deferred(), - elements = this, - i = elements.length, - count = 1, - deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - tmp; - function resolve() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - } - while( i-- ) { - if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || - ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || - jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && - jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { - count++; - tmp.add( resolve ); - } - } - resolve(); - return defer.promise( object ); - } -}); - - - - -var rclass = /[\n\t\r]/g, - rspace = /\s+/, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - nodeHook, boolHook, fixSpecified; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classNames, i, l, elem, className, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - - if ( (value && typeof value === "string") || value === undefined ) { - classNames = ( value || "" ).split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 && elem.className ) { - if ( value ) { - className = (" " + elem.className + " ").replace( rclass, " " ); - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - className = className.replace(" " + classNames[ c ] + " ", " "); - } - elem.className = jQuery.trim( className ); - - } else { - elem.className = ""; - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space seperated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var self = jQuery(this), val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && name in jQuery.attrFn ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, l, isBool, - i = 0; - - if ( value && elem.nodeType === 1 ) { - attrNames = value.toLowerCase().split( rspace ); - l = attrNames.length; - - for ( ; i < l; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - isBool = rboolean.test( name ); - - // See #9699 for explanation of this approach (setting first, then removal) - // Do not do this for boolean attributes (see #10870) - if ( !isBool ) { - jQuery.attr( elem, name, "" ); - } - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( isBool && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) -jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true, - coords: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? - ret.nodeValue : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.nodeValue = value + "" ); - } - }; - - // Apply the nodeHook to tabindex - jQuery.attrHooks.tabindex.set = nodeHook.set; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); - - - - -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, - rhoverHack = /(?:^|\s)hover(\.\S+)?\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, - quickParse = function( selector ) { - var quick = rquickIs.exec( selector ); - if ( quick ) { - // 0 1 2 3 - // [ _, tag, id, class ] - quick[1] = ( quick[1] || "" ).toLowerCase(); - quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); - } - return quick; - }, - quickIs = function( elem, m ) { - var attrs = elem.attributes || {}; - return ( - (!m[1] || elem.nodeName.toLowerCase() === m[1]) && - (!m[2] || (attrs.id || {}).value === m[2]) && - (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) - ); - }, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, quick, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - quick: selector && quickParse( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), - t, tns, type, origType, namespaces, origCount, - j, events, special, handle, eventType, handleObj; - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - handle = elemData.handle; - if ( handle ) { - handle.elem = null; - } - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, [ "events", "handle" ], true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var type = event.type || event, - namespaces = [], - cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - old = null; - for ( ; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old && old === elem.ownerDocument ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments, 0 ), - run_all = !event.exclusive && !event.namespace, - special = jQuery.event.special[ event.type ] || {}, - handlerQueue = [], - i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers that should run if there are delegated events - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this.ownerDocument || this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - - // Don't process events on disabled elements (#6911, #8165) - if ( cur.disabled !== true ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = ( - handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) - ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) - if ( event.metaKey === undefined ) { - event.metaKey = event.ctrlKey; - } - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - if ( elem.detachEvent ) { - elem.detachEvent( "on" + type, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector, - ret; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !form._submit_attached ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - form._submit_attached = true; - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - jQuery.event.simulate( "change", this, event, true ); - } - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - elem._change_attached = true; - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { // && selector != null - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - var handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( var type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( jQuery.attrFn ) { - jQuery.attrFn[ name ] = true; - } - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); - - - -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - expando = "sizcache" + (Math.random() + '').replace('.', ''), - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rReturn = /\r\n/g, - rNonWord = /\W/; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context, seed ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set, seed ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set, i, len, match, type, left; - - if ( !expr ) { - return []; - } - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace( rBackslash, "" ); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( "*" ) : - []; - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - type, found, item, filter, left, - i, pass, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - filter = Expr.filter[ type ]; - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - pass = not ^ found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Utility function for retreiving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var i, node, - nodeType = elem.nodeType, - ret = ""; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent || innerText for elements - if ( typeof elem.textContent === 'string' ) { - return elem.textContent; - } else if ( typeof elem.innerText === 'string' ) { - // Replace IE's carriage returns - return elem.innerText.replace( rReturn, '' ); - } else { - // Traverse it's children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - } else { - - // If no nodeType, this is expected to be an array - for ( i = 0; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - if ( node.nodeType !== 8 ) { - ret += getText( node ); - } - } - } - return ret; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - }, - type: function( elem ) { - return elem.getAttribute( "type" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( match[1] ); - } - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace( rBackslash, "" ) + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace( rBackslash, "" ); - }, - - TAG: function( match, curLoop ) { - return match[1].replace( rBackslash, "" ).toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - match[2] = match[2].replace(/^\+|\s*/g, ''); - - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1] = match[1].replace( rBackslash, "" ); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - // Handle if an un-quoted value was used - match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); - }, - - radio: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; - }, - - checkbox: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; - }, - - file: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; - }, - - password: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; - }, - - submit: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "submit" === elem.type; - }, - - image: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; - }, - - reset: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "reset" === elem.type; - }, - - button: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && "button" === elem.type || name === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - }, - - focus: function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( name ); - } - }, - - CHILD: function( elem, match ) { - var first, last, - doneName, parent, cache, - count, diff, - type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - /* falls through */ - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - first = match[2]; - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - doneName = match[0]; - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { - count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent[ expando ] = doneName; - } - - diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Sizzle.attr ? - Sizzle.attr( elem, name ) : - Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - !type && Sizzle.attr ? - result != null : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} -// Expose origPOS -// "global" as in regardless of relation to brackets/parens -Expr.match.globalPOS = origPOS; - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = ""; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = ""; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "

"; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - // See if we find a selector to speed up - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - - if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { - // Speed-up: Sizzle("TAG") - if ( match[1] ) { - return makeArray( context.getElementsByTagName( query ), extra ); - - // Speed-up: Sizzle(".CLASS") - } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { - return makeArray( context.getElementsByClassName( match[2] ), extra ); - } - } - - if ( context.nodeType === 9 ) { - // Speed-up: Sizzle("body") - // The body element only exists once, optimize finding it - if ( query === "body" && context.body ) { - return makeArray( [ context.body ], extra ); - - // Speed-up: Sizzle("#ID") - } else if ( match && match[3] ) { - var elem = context.getElementById( match[3] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id === match[3] ) { - return makeArray( [ elem ], extra ); - } - - } else { - return makeArray( [], extra ); - } - } - - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var oldContext = context, - old = context.getAttribute( "id" ), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test( query ); - - if ( !old ) { - context.setAttribute( "id", nid ); - } else { - nid = nid.replace( /'/g, "\\$&" ); - } - if ( relativeHierarchySelector && hasParent ) { - context = context.parentNode; - } - - try { - if ( !relativeHierarchySelector || hasParent ) { - return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); - } - - } catch(pseudoError) { - } finally { - if ( !old ) { - oldContext.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - - if ( matches ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9 fails this) - var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - var ret = matches.call( node, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || !disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9, so check for that - node.document && node.document.nodeType !== 11 ) { - return ret; - } - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "
"; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem[ expando ] === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem[ expando ] = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem[ expando ] === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem[ expando ] = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context, seed ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet, seed ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -Sizzle.selectors.attrMap = {}; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.filters; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})(); - - -var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - // Note: This RegExp should be improved, or likely pulled from Sizzle - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.globalPOS, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var self = this, - i, l; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - var ret = this.pushStack( "", "find", selector ), - length, n, r; - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var targets = jQuery( target ); - return this.filter(function() { - for ( var i = 0, l = targets.length; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - POS.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var ret = [], i, l, cur = this[0]; - - // Array (deprecated as of jQuery 1.7) - if ( jQuery.isArray( selectors ) ) { - var level = 1; - - while ( cur && cur.ownerDocument && cur !== context ) { - for ( i = 0; i < selectors.length; i++ ) { - - if ( jQuery( cur ).is( selectors[ i ] ) ) { - ret.push({ selector: selectors[ i ], elem: cur, level: level }); - } - } - - cur = cur.parentNode; - level++; - } - - return ret; - } - - // String - var pos = POS.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( i = 0, l = this.length; i < l; i++ ) { - cur = this[i]; - - while ( cur ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - - } else { - cur = cur.parentNode; - if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { - break; - } - } - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - andSelf: function() { - return this.add( this.prevObject ); - } -}); - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return jQuery.nth( elem, 2, "nextSibling" ); - }, - prev: function( elem ) { - return jQuery.nth( elem, 2, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.makeArray( elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - nth: function( cur, result, dir, elem ) { - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) { - if ( cur.nodeType === 1 && ++num === result ) { - break; - } - } - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} - - - - -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /]", "i"), - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*", "" ], - legend: [ 1, "
", "
" ], - thead: [ 1, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - col: [ 2, "", "
" ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE can't serialize and - - - - - - - - -
-
-
-
- - -

Index

- -
- -
- - -
-
-
-
-
- - - - - -
-
-
-
- - - - \ No newline at end of file diff --git a/docs/_build/html/glances-doc.html b/docs/_build/html/glances-doc.html deleted file mode 100644 index f6686717dc..0000000000 --- a/docs/_build/html/glances-doc.html +++ /dev/null @@ -1,665 +0,0 @@ - - - - - - - - - - Glances — Glances 1.7.3 documentation - - - - - - - - - - - - - - -
-
-
-
- -
-

Glances

-

This manual describes Glances version 1.7.3.

-

Copyright © 2012-2013 Nicolas Hennion <nicolas@nicolargo.com>

-

November 2013

- -
-

Introduction

-

Glances is a cross-platform curses-based monitoring tool which aims to -present a maximum of information in a minimum of space, ideally to fit -in a classical 80x24 terminal or higher to have additional information.

-

Glances can adapt dynamically the displayed information depending on the -terminal size. It can also work in a client/server mode for remote monitoring.

-

Glances is written in Python and uses the psutil library to get information from your system.

-

Console (80x24)

-_images/screenshot.png -

Full view (>80x24)

-_images/screenshot-wide.png -
-
-

Usage

-
-

Standalone mode

-

Simply run:

-
$ glances
-
-
-
-
-

Client/Server mode

-

If you want to remotely monitor a machine, called server, from another one, called client, -just run on the server:

-
server$ glances -s
-
-
-

and on the client:

-
client$ glances -c @server
-
-
-

where @server is the IP address or hostname of the server.

-

In server mode, you can set the bind address -B ADDRESS and listening TCP port -p PORT.

-

In client mode, you can set the TCP port of the server -p PORT.

-

Default binding address is 0.0.0.0 (Glances will listen on all the network interfaces) and TCP port is 61209.

-

In client/server mode, limits are set by the server side.

-

You can also set a password to access to the server -P password.

-

Glances is IPv6 compatible. Just use the -B :: option to bind to all IPv6 addresses.

-
-
-
-

Command reference

-
-

Command-line options

- --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--bDisplay network rate in Byte per second (default: bit per second)
--B IPBind server to the given IPv4/IPv6 address or hostname
--c IPConnect to a Glances server by IPv4/IPv6 address or hostname
--C FILEPath to the configuration file
--dDisable disk I/O module
--eEnable sensors module (requires pysensors, Linux-only)
--f FILESet the HTML output folder or CSV file
--hDisplay the help and exit
--mDisable mount module
--nDisable network module
--o OUTPUTDefine additional output (available: HTML or CSV)
--p PORTDefine the client/server TCP port (default: 61209)
--P PASSWORDDefine a client/server password
---passwordDefine a client/server password from the prompt
--rDisable process list (for low CPU consumption)
--sRun Glances in server mode
--t SECONDSSet refresh time in seconds (default: 3 sec)
--vDisplay the version and exit
--yEnable hddtemp module (requires hddtemp)
--zDo not use the bold color attribute
--1Start Glances in per-CPU mode
-
-
-

Interactive commands

-

The following commands (key pressed) are supported while in Glances:

-
-
a
-

Sort process list automatically

-
    -
  • If CPU iowait >60%, sort processes by I/O read and write
  • -
  • If CPU >70%, sort processes by CPU usage
  • -
  • If MEM >70%, sort processes by memory usage
  • -
-
-
b
-
Switch between bit/s or Byte/s for network I/O
-
c
-
Sort processes by CPU usage
-
d
-
Show/hide disk I/O stats
-
f
-
Show/hide file system stats
-
h
-
Show/hide the help screen
-
i
-
Sort processes by I/O rate (may need root privileges on some OSes)
-
l
-
Show/hide log messages
-
m
-
Sort processes by MEM usage
-
n
-
Show/hide network stats
-
p
-
Sort processes by name
-
q
-
Quit
-
s
-
Show/hide sensors stats (only available with -e flag)
-
t
-
View network I/O as combination
-
u
-
View cumulative network I/O
-
w
-
Delete finished warning log messages
-
x
-
Delete finished warning and critical log messages
-
y
-
Show/hide hddtemp stats (only available with -y flag)
-
1
-
Switch between global CPU and per-CPU stats
-
-
-
-
-

Configuration

-

No configuration file is mandatory to use Glances.

-

Furthermore a configuration file is needed for setup limits and/or monitored processes list.

-

By default, the configuration file is under:

- --- - - - - - - - -
Linux:/etc/glances/glances.conf
*BSD and OS X:/usr/local/etc/glances/glances.conf
Windows:%APPDATA%\glances\glances.conf
-

On Windows XP, the %APPDATA% path is:

-
C:\Documents and Settings\<User>\Application Data
-
-
-

Since Windows Vista and newer versions:

-
C:\Users\<User>\AppData\Roaming
-
-
-

You can override the default configuration, located in one of the above -directories on your system, except for Windows.

-

Just copy the glances.conf file to your $XDG_CONFIG_HOME directory, e.g. Linux:

-
mkdir -p $XDG_CONFIG_HOME/glances
-cp /etc/glances/glances.conf $XDG_CONFIG_HOME/glances/
-
-
-

On OS X, you should copy the configuration file to ~/Library/Application Support/glances/.

-
-
-

Anatomy of the application

-
-

Legend

-
-
GREEN stat counter is "OK"
-
BLUE stat counter is "CAREFUL"
-
MAGENTA stat counter is "WARNING"
-
RED stat counter is "CRITICAL"
-
-
- -
-

CPU

-

Short view:

-_images/cpu.png -

If enough horizontal space is available, extended CPU informations are displayed.

-

Extended view:

-_images/cpu-wide.png -

To switch to per-CPU stats, just hit the 1 key:

-_images/per-cpu.png -

The CPU stats are shown as a percentage and for the configured refresh time. -The total CPU usage is displayed on the first line.

-
-
If user|system|nice CPU is <50%, then status is set to "OK"
-
If user|system|nice CPU is >50%, then status is set to "CAREFUL"
-
If user|system|nice CPU is >70%, then status is set to "WARNING"
-
If user|system|nice CPU is >90%, then status is set to "CRITICAL"
-
-

Note: limit values can be overwritten in the configuration file under the [cpu] section.

-
-
-

Load

-_images/load.png -

On the No Sheep blog, Zachary Tirrell defines the average load [1]:

-
-
“In short it is the average sum of the number of processes -waiting in the run-queue plus the number currently executing -over 1, 5, and 15 minute time periods.”
-

Glances gets the number of CPU core to adapt the alerts. -Alerts on average load are only set on 5 and 15 min. -The first line also display the number of CPU core.

-
-
If average load is <0.7*core, then status is set to "OK"
-
If average load is >0.7*core, then status is set to "CAREFUL"
-
If average load is >1*core, then status is set to "WARNING"
-
If average load is >5*core, then status is set to "CRITICAL"
-
-

Note: limit values can be overwritten in the configuration file under the [load] section.

-
-
-

Memory

-

Glances uses two columns: one for the RAM and another one for the Swap.

-_images/mem.png -

If enough space is available, Glances displays extended informations:

-_images/mem-wide.png -

With Glances, alerts are only set for on used memory and used swap.

-
-
If memory is <50%, then status is set to "OK"
-
If memory is >50%, then status is set to "CAREFUL"
-
If memory is >70%, then status is set to "WARNING"
-
If memory is >90%, then status is set to "CRITICAL"
-
-

Note: limit values can be overwritten in the configuration file under the [memory] and [swap] sections.

-
-
-

Network

-_images/network.png -

Glances displays the network interface bit rate. The unit is adapted -dynamically (bits per second, kbits per second, Mbits per second, etc).

-

Alerts are only set if the network interface maximum speed is available.

-

For example, on a 100 Mbps ethernet interface, the warning status is set -if the bit rate is higher than 70 Mbps.

-
-
If bit rate is <50%, then status is set to "OK"
-
If bit rate is >50%, then status is set to "CAREFUL"
-
If bit rate is >70%, then status is set to "WARNING"
-
If bit rate is >90%, then status is set to "CRITICAL"
-
-
-
-

Sensors

-

Glances can displays the sensors informations trough lm-sensors (only available on Linux).

-

As of lm-sensors, a filter is processed in order to display temperature only:

-_images/sensors.png -

Glances can also grab hard disk temperature through the hddtemp daemon (see here [2] to install hddtemp on your system):

-_images/hddtemp.png -

To enable the lm-sensors module:

-
$ glances -e
-
-
-

To enable the hddtemp module:

-
$ glances -y
-
-
-

There is no alert on this information.

-

Note: limit values can be overwritten in the configuration file under the [temperature] and [hddtemperature] sections.

-
-
-

Disk I/O

-_images/diskio.png -

Glances displays the disk I/O throughput. The unit is adapted dynamically.

-

Note: There is no alert on this information.

-
-
-

File system

-_images/fs.png -

Glances displays the used and total file system disk space. The unit is -adapted dynamically.

-

Alerts are set for used disk space:

-
-
If disk used is <50%, then status is set to "OK"
-
If disk used is >50%, then status is set to "CAREFUL"
-
If disk used is >70%, then status is set to "WARNING"
-
If disk used is >90%, then status is set to "CRITICAL"
-
-

Note: limit values can be overwritten in the configuration file under [filesystem] section.

-
-
-

Processes list

-

Compact view:

-_images/processlist.png -

Full view:

-_images/processlist-wide.png -

Three views are available for processes:

-
    -
  • Processes summary
  • -
  • Optional monitored processes list (new in 1.7)
  • -
  • Processes list
  • -
-

By default, or if you hit the a key, the processes list is automatically -sorted by CPU of memory usage.

-

Note: limit values can be overwritten in the configuration file under the [process] section.

-

The number of processes in the list is adapted to the screen size.

-
-
VIRT
-
Total program size (VMS)
-
RES
-
Resident set size (RSS)
-
CPU%
-
% of CPU used by the process
-
MEM%
-
% of MEM used by the process
-
PID
-
Process ID
-
USER
-
User ID per process
-
NI
-
Nice level of the process
-
S
-
Process status
-
TIME+
-
Cumulative CPU time used
-
IOR/s
-
Per process IO read rate (in Byte/s)
-
IOW/s
-
Per process IO write rate (in Byte/s)
-
NAME
-
Process name or command line
-
-

Process status legend:

-
-
R
-
running
-
S
-
sleeping (may be interrupted)
-
D
-
disk sleep (may not be interrupted)
-
T
-
traced/stopped
-
Z
-
zombie
-
-
-
-

Monitored processes list

-

New in version 1.7. Optional.

-

The monitored processes list allows user, through the configuration file, -to group processes and quickly show if the number of running process is not good.

-_images/monitored.png -

Each item is defined by:

-
    -
  • description: description of the processes (max 16 chars).
  • -
  • regex: regular expression of the processes to monitor.
  • -
  • command (optional): full path to shell command/script for extended stat. Should return a single line string. Use with caution.
  • -
  • countmin (optional): minimal number of processes. A warning will be displayed if number of processes < count.
  • -
  • countmax (optional): maximum number of processes. A warning will be displayed if number of processes > count.
  • -
-

Up to 10 items can be defined.

-

For example, if you want to monitor the Nginx processes on a Web server, the following definition should do the job:

-
[monitor]
-list_1_description=Nginx server
-list_1_regex=.*nginx.*
-list_1_command=nginx -v
-list_1_countmin=1
-list_1_countmax=4
-
-
-

If you also want to monitor the PHP-FPM daemon processes, you should add another item:

-
[monitor]
-list_1_description=Nginx server
-list_1_regex=.*nginx.*
-list_1_command=nginx -v
-list_1_countmin=1
-list_1_countmax=4
-list_1_description=PHP-FPM
-list_1_regex=.*php-fpm.*
-list_1_countmin=1
-list_1_countmax=20
-
-
-

In client/server mode, the list is defined on the server side. -A new method, called getAllMonitored, is available in the APIs and get the JSON representation of the monitored processes list.

-

Alerts are set as following:

-
-
If number of processes is 0, then status is set to "CRITICAL"
-
If number of processes is min < current < max, then status is set to "OK"
-
Else status is set to "WARNING"
-
-
-
-

Logs

-_images/logs.png -

A log messages list is displayed in the bottom of the screen if (and only if):

-
    -
  • at least one WARNING or CRITICAL alert was occurred
  • -
  • space is available in the bottom of the console/terminal
  • -
-

Each alert message displays the following information:

-
    -
  1. start date
  2. -
  3. end date
  4. -
  5. alert name
  6. -
  7. {min/avg/max} values or number of running processes for monitored processes list alerts
  8. -
-
- -
-
-

API documentation

-

Glances uses a XML-RPC server and can be used by another client software.

-

API documentation is available at https://github.com/nicolargo/glances/wiki/The-Glances-API-How-To

-
- -
- - -
-
-
-
-
-

Table Of Contents

- - -

Previous topic

-

Welcome to Glances’s documentation!

-

This Page

- - - -
-
-
-
- - - - \ No newline at end of file diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html deleted file mode 100644 index 3c01848d62..0000000000 --- a/docs/_build/html/index.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - Welcome to Glances’s documentation! — Glances 1.7.3 documentation - - - - - - - - - - - - - - -
-
-
-
- -
-

Welcome to Glances’s documentation!

-

Glances is a cross-platform curses-based monitoring tool written in Python.

-

It uses the psutil library and some internal code to get information from your system.

-https://raw.github.com/nicolargo/glances/master/docs/images/screenshot-wide.png -
-

Get the code

-

The source is available on GitHub.

-
- -
-
-

Indices and tables

- -
- - -
-
-
-
-
-

Table Of Contents

- - -

Next topic

-

Glances

-

This Page

- - - -
-
-
-
- - - - \ No newline at end of file diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv deleted file mode 100644 index a36a6df018..0000000000 Binary files a/docs/_build/html/objects.inv and /dev/null differ diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html deleted file mode 100644 index 4f2d7afb00..0000000000 --- a/docs/_build/html/search.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - Search — Glances 1.7.3 documentation - - - - - - - - - - - - - - - - - - - -
-
-
-
- -

Search

-
- -

- Please activate JavaScript to enable the search - functionality. -

-
-

- From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list. -

-
- - - -
- -
- -
- -
-
-
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js deleted file mode 100644 index 10a73d180c..0000000000 --- a/docs/_build/html/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({objects:{},terms:{represent:0,all:0,code:1,appdata:0,global:0,sleep:0,follow:0,disk:0,compact:0,middl:0,depend:0,program:0,swap:0,under:0,list_1_command:0,sourc:1,string:0,iowait:0,trough:0,pocess:[],level:0,list:0,item:0,rate:0,port:0,compat:0,index:1,hide:0,sum:0,access:0,delet:0,version:0,"new":0,net:0,method:0,full:0,mem:0,batinfo:0,here:0,address:0,path:0,legend:0,valu:0,wait:0,search:1,queue:0,throughput:0,list_1_countmax:0,modul:[0,1],unix:0,api:[0,1],xdg_config_hom:0,instal:0,total:0,unit:0,regex:0,from:[0,1],describ:0,memori:0,two:0,call:0,usr:0,sort:0,warn:0,flag:0,setup:0,work:0,can:0,root:0,overrid:0,prompt:0,process:0,indic:1,critic:0,minimum:0,caution:0,want:0,magenta:0,occur:0,end:0,fpm:0,anoth:0,write:0,how:0,low:0,csv:0,max:0,mai:0,data:0,averag:0,"short":0,footer:0,bind:0,counter:0,issu:0,inform:[0,1],"switch":0,curent:[],combin:0,allow:0,ethernet:0,order:0,hennion:0,cyberc:0,help:0,over:0,privileg:0,dynam:0,group:0,monitor:[0,1],fit:0,platform:[0,1],window:0,good:0,"return":0,python:[0,1],interrupt:0,introduct:[0,1],name:0,refresh:0,psutil:[0,1],mode:0,each:0,found:0,side:0,hard:0,connect:0,tirrel:0,shown:0,network:0,space:0,content:[0,1],adapt:0,sensor:0,red:0,free:0,standalon:0,base:[0,1],zombi:0,releas:0,"byte":0,care:0,mbit:0,filter:0,view:0,first:0,softwar:0,feel:0,number:0,system:[0,1],date:0,messag:0,size:0,sheep:0,given:0,script:0,interact:0,mkdir:0,capac:0,least:0,stori:0,cumul:0,termin:0,listen:0,shell:0,consol:0,option:0,tool:[0,1],copi:0,github:[0,1],hddtemp:0,list_1_regex:0,than:0,rss:0,remot:0,second:0,horizont:0,were:0,consumpt:0,minut:0,zachari:0,countmin:0,ran:0,ram:0,have:0,tabl:[0,1],need:0,min:0,note:0,also:0,ideal:0,client:0,which:0,green:0,singl:0,anatomi:[0,1],blue:0,trace:0,track:0,regular:0,"80x24":0,bsd:0,request:0,drive:0,section:0,show:0,xml:0,current:0,onli:0,locat:0,execut:0,copyright:0,configur:[0,1],written:[0,1],should:0,folder:0,local:0,overwritten:0,hit:0,contribut:0,get:[0,1],express:0,stop:0,report:0,requir:0,enabl:0,through:0,grab:0,septemb:[],where:0,summari:0,wiki:0,kernel:0,set:0,maximum:0,see:0,sec:0,statu:0,kei:0,list_1_descript:0,enough:0,between:0,attribut:0,hddtemperatur:0,august:[],extend:0,screen:0,job:0,addit:0,etc:0,com:0,load:0,simpli:0,color:0,period:0,header:0,rpc:0,linux:0,batteri:0,nicola:0,quit:0,three:0,sinc:0,json:0,quickli:0,present:0,mount:0,aim:0,defin:0,"while":0,abov:0,mandatori:0,glanc:[0,1],list_1_countmin:0,virt:0,conf:0,nicolargo:0,avg:0,welcom:1,minim:0,cross:[0,1],html:0,nosheep:0,document:[0,1],higher:0,finish:0,http:0,hostnam:0,iow:0,ior:0,alert:0,user:0,php:0,exampl:0,command:[0,1],thi:0,filesystem:0,left:0,just:0,percent:0,tcp:0,speed:0,web:0,except:0,blog:0,add:0,els:0,applic:[0,1],read:0,howto:0,nginx:0,temperatur:0,biz:0,press:0,bit:0,password:0,daemon:0,resid:0,manual:0,server:0,kbit:0,output:0,nice:0,page:1,www:0,some:[0,1],percentag:0,intern:1,librari:[0,1],bottom:0,definit:0,per:0,pysensor:0,exit:0,refer:[0,1],machin:0,core:0,plu:0,run:0,bold:0,usag:[0,1],column:0,roam:0,disabl:0,countmax:0,automat:0,mbp:0,your:[0,1],log:0,support:[0,1],avail:[0,1],start:0,interfac:0,ipv4:0,ipv6:0,newer:0,line:0,bug:0,count:0,"default":0,displai:0,limit:0,embed:0,featur:0,curs:[0,1],classic:0,pid:0,"char":0,novemb:0,file:0,vista:0,tip:0,virtual:[],you:0,architectur:0,stat:0,easili:0,furthermor:0,directori:0,descript:0,getallmonitor:0,time:0,cpu:0},objtypes:{},titles:["Glances","Welcome to Glances’s documentation!"],objnames:{},filenames:["glances-doc","index"]}) \ No newline at end of file diff --git a/docs/_static/Glances Logo dark.svg b/docs/_static/Glances Logo dark.svg new file mode 100644 index 0000000000..0071e8770e --- /dev/null +++ b/docs/_static/Glances Logo dark.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/_static/Glances Logo.svg b/docs/_static/Glances Logo.svg new file mode 100644 index 0000000000..1d848045b8 --- /dev/null +++ b/docs/_static/Glances Logo.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/_static/Glances Text Logo dark.svg b/docs/_static/Glances Text Logo dark.svg new file mode 100644 index 0000000000..30875c8c40 --- /dev/null +++ b/docs/_static/Glances Text Logo dark.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/_static/Glances Text Logo.svg b/docs/_static/Glances Text Logo.svg new file mode 100644 index 0000000000..7cbafec560 --- /dev/null +++ b/docs/_static/Glances Text Logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/_static/amp-dropbox.png b/docs/_static/amp-dropbox.png new file mode 100644 index 0000000000..7a1bcda26b Binary files /dev/null and b/docs/_static/amp-dropbox.png differ diff --git a/docs/_static/amp-python-warning.png b/docs/_static/amp-python-warning.png new file mode 100644 index 0000000000..bd991c766d Binary files /dev/null and b/docs/_static/amp-python-warning.png differ diff --git a/docs/_static/amp-python.png b/docs/_static/amp-python.png new file mode 100644 index 0000000000..ab8f2d7286 Binary files /dev/null and b/docs/_static/amp-python.png differ diff --git a/docs/_static/amps.png b/docs/_static/amps.png new file mode 100644 index 0000000000..c165a9c085 Binary files /dev/null and b/docs/_static/amps.png differ diff --git a/docs/_static/aws.png b/docs/_static/aws.png new file mode 100644 index 0000000000..4bdaab7f53 Binary files /dev/null and b/docs/_static/aws.png differ diff --git a/docs/_static/browser.png b/docs/_static/browser.png new file mode 100644 index 0000000000..c666ddfb16 Binary files /dev/null and b/docs/_static/browser.png differ diff --git a/docs/_static/cloud.png b/docs/_static/cloud.png new file mode 100644 index 0000000000..ac20d590e7 Binary files /dev/null and b/docs/_static/cloud.png differ diff --git a/docs/_static/connected.png b/docs/_static/connected.png new file mode 100644 index 0000000000..7a9fac3886 Binary files /dev/null and b/docs/_static/connected.png differ diff --git a/docs/_static/connections.png b/docs/_static/connections.png new file mode 100644 index 0000000000..95bcc9023e Binary files /dev/null and b/docs/_static/connections.png differ diff --git a/docs/_static/containers.png b/docs/_static/containers.png new file mode 100644 index 0000000000..18213d0b58 Binary files /dev/null and b/docs/_static/containers.png differ diff --git a/docs/_static/cpu-wide.png b/docs/_static/cpu-wide.png new file mode 100644 index 0000000000..22259b3d7f Binary files /dev/null and b/docs/_static/cpu-wide.png differ diff --git a/docs/_static/cpu.png b/docs/_static/cpu.png new file mode 100644 index 0000000000..d034c1805f Binary files /dev/null and b/docs/_static/cpu.png differ diff --git a/docs/_static/disconnected.png b/docs/_static/disconnected.png new file mode 100644 index 0000000000..d0bb15ee21 Binary files /dev/null and b/docs/_static/disconnected.png differ diff --git a/docs/_static/diskio.png b/docs/_static/diskio.png new file mode 100644 index 0000000000..bdc9c23ef5 Binary files /dev/null and b/docs/_static/diskio.png differ diff --git a/docs/_static/events.png b/docs/_static/events.png new file mode 100644 index 0000000000..7a19fa3d9e Binary files /dev/null and b/docs/_static/events.png differ diff --git a/docs/_static/folders.png b/docs/_static/folders.png new file mode 100644 index 0000000000..178211545c Binary files /dev/null and b/docs/_static/folders.png differ diff --git a/docs/_static/fs.png b/docs/_static/fs.png new file mode 100644 index 0000000000..d3c8464d1f Binary files /dev/null and b/docs/_static/fs.png differ diff --git a/docs/_static/glances-architecture.excalidraw b/docs/_static/glances-architecture.excalidraw new file mode 100644 index 0000000000..1a413be3e1 --- /dev/null +++ b/docs/_static/glances-architecture.excalidraw @@ -0,0 +1,2424 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "type": "rectangle", + "version": 252, + "versionNonce": 1518270375, + "isDeleted": false, + "id": "z3aBIxHcDX9glf-RUyasf", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 421, + "y": 161, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 181, + "height": 121, + "seed": 79658283, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "du6r0JkGG0RB4vV62RPED" + }, + { + "id": "rukQ6f7gbwCK6dMF4PqSY", + "type": "arrow" + } + ], + "updated": 1675588528733, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 190, + "versionNonce": 1462725319, + "isDeleted": false, + "id": "du6r0JkGG0RB4vV62RPED", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 445.5, + "y": 208.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 132, + "height": 24, + "seed": 257619179, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1675588528733, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "__main__.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "z3aBIxHcDX9glf-RUyasf", + "originalText": "__main__.py" + }, + { + "type": "rectangle", + "version": 298, + "versionNonce": 99010857, + "isDeleted": false, + "id": "dIN0jifjByOhE61mIip2q", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 641.5, + "y": 163.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 181, + "height": 121, + "seed": 271966315, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "X93uxb5Vg-Lx2teoRVW5N" + }, + { + "id": "I97BFsH6FvYyq9_UjRwU6", + "type": "arrow" + }, + { + "id": "rukQ6f7gbwCK6dMF4PqSY", + "type": "arrow" + } + ], + "updated": 1675588528733, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 237, + "versionNonce": 15377671, + "isDeleted": false, + "id": "X93uxb5Vg-Lx2teoRVW5N", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 671.5, + "y": 211, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 121, + "height": 24, + "seed": 518451141, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1675588528734, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "__init__.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "dIN0jifjByOhE61mIip2q", + "originalText": "__init__.py" + }, + { + "type": "diamond", + "version": 609, + "versionNonce": 1413698281, + "isDeleted": false, + "id": "VbHVhy7vaW6prJo4QFEX5", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 639, + "y": 371, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 189, + "height": 179, + "seed": 957302987, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "type": "text", + "id": "TVdYovxpvasH4tY7IEceE" + }, + { + "id": "I97BFsH6FvYyq9_UjRwU6", + "type": "arrow" + }, + { + "id": "ZCD_-KAOjwV2nBx0hUglp", + "type": "arrow" + } + ], + "updated": 1675588528734, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 549, + "versionNonce": 1007357385, + "isDeleted": false, + "id": "TVdYovxpvasH4tY7IEceE", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 712.5, + "y": 454.25, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 42, + "height": 24, + "seed": 377713765, + "groupIds": [], + "roundness": null, + "boundElements": [], + "updated": 1675588528734, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "core", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "VbHVhy7vaW6prJo4QFEX5", + "originalText": "core" + }, + { + "id": "I97BFsH6FvYyq9_UjRwU6", + "type": "arrow", + "x": 732, + "y": 286, + "width": 0, + "height": 86, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 1744777639, + "version": 407, + "versionNonce": 1524707975, + "isDeleted": false, + "boundElements": null, + "updated": 1675588528805, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 86 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "dIN0jifjByOhE61mIip2q", + "focus": 0, + "gap": 1.5 + }, + "endBinding": { + "elementId": "VbHVhy7vaW6prJo4QFEX5", + "focus": -0.015873015873015872, + "gap": 1 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "id": "rEhm0ZMsmg2lbgHYNuUTa", + "type": "text", + "x": 742.5, + "y": 307, + "width": 41, + "height": 26, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 2115715529, + "version": 149, + "versionNonce": 215510185, + "isDeleted": false, + "boundElements": null, + "updated": 1675588528734, + "link": null, + "locked": false, + "text": "main", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "top", + "baseline": 18, + "containerId": null, + "originalText": "main" + }, + { + "id": "rukQ6f7gbwCK6dMF4PqSY", + "type": "arrow", + "x": 602, + "y": 221, + "width": 37, + "height": 0, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 669272615, + "version": 400, + "versionNonce": 1229408679, + "isDeleted": false, + "boundElements": null, + "updated": 1675588528805, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 37, + 0 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "z3aBIxHcDX9glf-RUyasf", + "focus": -0.008264462809917356, + "gap": 1 + }, + "endBinding": { + "elementId": "dIN0jifjByOhE61mIip2q", + "focus": 0.04958677685950414, + "gap": 2.5 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "type": "rectangle", + "version": 396, + "versionNonce": 1582755721, + "isDeleted": false, + "id": "T-vzSegxNCFDy63YeUtoQ", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 884.5, + "y": 160.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 181, + "height": 121, + "seed": 1133526185, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "oD5JS6GZ5RLxtniTQ2qPO" + } + ], + "updated": 1675588528734, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 341, + "versionNonce": 175663495, + "isDeleted": false, + "id": "oD5JS6GZ5RLxtniTQ2qPO", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 942.5, + "y": 208.75, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 65, + "height": 24, + "seed": 706608743, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675588528734, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "main.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "T-vzSegxNCFDy63YeUtoQ", + "originalText": "main.py" + }, + { + "type": "diamond", + "version": 683, + "versionNonce": 1187124841, + "isDeleted": false, + "id": "TPoX-fVCSz4gF9Bb7oJD4", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 880.5, + "y": 370.5, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 189, + "height": 179, + "seed": 451990279, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "type": "text", + "id": "hdUnLjhzTcHH_2Xr-4f4v" + } + ], + "updated": 1675588528734, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 641, + "versionNonce": 249536679, + "isDeleted": false, + "id": "hdUnLjhzTcHH_2Xr-4f4v", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 908, + "y": 447.75, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 134, + "height": 24, + "seed": 1736377577, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675588528734, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "GlancesMain()", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "TPoX-fVCSz4gF9Bb7oJD4", + "originalText": "GlancesMain()" + }, + { + "id": "qmRB-3Yh035xXWyGPzRAh", + "type": "line", + "x": 975, + "y": 374, + "width": 0, + "height": 93, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 1174340489, + "version": 150, + "versionNonce": 149250377, + "isDeleted": false, + "boundElements": null, + "updated": 1675588528734, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -93 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "yjKLIF0byoBCFlu3snqvC", + "type": "line", + "x": 820, + "y": 458, + "width": 65, + "height": 1, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 117968553, + "version": 148, + "versionNonce": 1804792775, + "isDeleted": false, + "boundElements": null, + "updated": 1675588528734, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 65, + -1 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "iPpO1aE_0LRKjBVQ0N19d", + "type": "text", + "x": 847.5, + "y": 427, + "width": 13, + "height": 26, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": null, + "seed": 1595409129, + "version": 142, + "versionNonce": 35409961, + "isDeleted": false, + "boundElements": null, + "updated": 1675588528734, + "link": null, + "locked": false, + "text": "=", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "top", + "baseline": 18, + "containerId": null, + "originalText": "=" + }, + { + "type": "diamond", + "version": 881, + "versionNonce": 524454599, + "isDeleted": false, + "id": "V_Q9JjPuvqh6fBfAh7P3g", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 637.5, + "y": 692.5, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 189, + "height": 179, + "seed": 2061438665, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "type": "text", + "id": "SA83r_0ZTZaJPzSOsa6ai" + }, + { + "id": "nJ0-zL6oGLjw0f7sLt3t1", + "type": "arrow" + } + ], + "updated": 1675590397112, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 823, + "versionNonce": 1616091623, + "isDeleted": false, + "id": "SA83r_0ZTZaJPzSOsa6ai", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 708.5, + "y": 769.75, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 47, + "height": 24, + "seed": 1903484487, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590397121, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "mode", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "V_Q9JjPuvqh6fBfAh7P3g", + "originalText": "mode" + }, + { + "id": "nJ0-zL6oGLjw0f7sLt3t1", + "type": "arrow", + "x": 731, + "y": 543, + "width": 2.1231441617119344, + "height": 148.32611751283002, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 923576615, + "version": 504, + "versionNonce": 1410705705, + "isDeleted": false, + "boundElements": null, + "updated": 1675590397121, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 2.1231441617119344, + 148.32611751283002 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "V_Q9JjPuvqh6fBfAh7P3g", + "focus": 0.02561960456697391, + "gap": 1.6246183338150217 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + }, + { + "type": "text", + "version": 198, + "versionNonce": 1623364903, + "isDeleted": false, + "id": "ri2fonVaxx3URCz9V1PjJ", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 747, + "y": 553, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 56, + "height": 26, + "seed": 1733680745, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675588528734, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "start", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "start" + }, + { + "type": "rectangle", + "version": 719, + "versionNonce": 867736585, + "isDeleted": false, + "id": "So2q8hpc6F5KvtPQFTop8", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 234.5, + "y": 683.5, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 251, + "height": 34, + "seed": 1945517991, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "sGrQmvRDJHuYF_9i6rXob" + } + ], + "updated": 1675590397121, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 675, + "versionNonce": 1991623943, + "isDeleted": false, + "id": "sGrQmvRDJHuYF_9i6rXob", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 294, + "y": 688.5, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 132, + "height": 24, + "seed": 491532873, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590397121, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "standalone.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "So2q8hpc6F5KvtPQFTop8", + "originalText": "standalone.py" + }, + { + "type": "rectangle", + "version": 753, + "versionNonce": 1278882537, + "isDeleted": false, + "id": "1wtZQP7JhcQ4lwrIYtmqt", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 234.5, + "y": 722, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 251, + "height": 34.5, + "seed": 120949223, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "AZjkn1SJRrYlmgfL9zSOs" + } + ], + "updated": 1675590397122, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 714, + "versionNonce": 1373998119, + "isDeleted": false, + "id": "AZjkn1SJRrYlmgfL9zSOs", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 300.5, + "y": 727, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 119, + "height": 24, + "seed": 1479388169, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590397122, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "webserver.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "1wtZQP7JhcQ4lwrIYtmqt", + "originalText": "webserver.py" + }, + { + "type": "rectangle", + "version": 797, + "versionNonce": 1378217417, + "isDeleted": false, + "id": "48sa_pFKMBlEU75p47EfA", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 234.5, + "y": 763, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 251, + "height": 34, + "seed": 1398331655, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "0Z2AD5xnd4bUAS3ryDS-y" + } + ], + "updated": 1675590397122, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 759, + "versionNonce": 1037004615, + "isDeleted": false, + "id": "0Z2AD5xnd4bUAS3ryDS-y", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 317, + "y": 768, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 86, + "height": 24, + "seed": 1308778217, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590397122, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "server.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "48sa_pFKMBlEU75p47EfA", + "originalText": "server.py" + }, + { + "type": "rectangle", + "version": 836, + "versionNonce": 1553419433, + "isDeleted": false, + "id": "JwMl3Y2Txi0Xx4W1iwNcq", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 236.5, + "y": 804, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 251, + "height": 34.5, + "seed": 1769513959, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "5waxi9faL1bP3hACWhylM" + } + ], + "updated": 1675590397122, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 794, + "versionNonce": 1422913127, + "isDeleted": false, + "id": "5waxi9faL1bP3hACWhylM", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 323.5, + "y": 809, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 77, + "height": 24, + "seed": 46215689, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590397123, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "client.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "JwMl3Y2Txi0Xx4W1iwNcq", + "originalText": "client.py" + }, + { + "type": "rectangle", + "version": 890, + "versionNonce": 322555785, + "isDeleted": false, + "id": "P1bp9Rfq5SwS130g34yi7", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 235.5, + "y": 844, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 251, + "height": 34.5, + "seed": 485157865, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "cYs-xqat3zotKrKiW0d8F" + } + ], + "updated": 1675590397123, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 855, + "versionNonce": 833849735, + "isDeleted": false, + "id": "cYs-xqat3zotKrKiW0d8F", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 278, + "y": 849, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 166, + "height": 24, + "seed": 746119975, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590397123, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "client_browser.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "P1bp9Rfq5SwS130g34yi7", + "originalText": "client_browser.py" + }, + { + "id": "rQhOqJTXTXy1a48aIPtoK", + "type": "line", + "x": 504, + "y": 682, + "width": 1, + "height": 197, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 1950842537, + "version": 308, + "versionNonce": 474543721, + "isDeleted": false, + "boundElements": null, + "updated": 1675590397123, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -1, + 197 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "sYMUNY_UMw9YOE9QnlXCK", + "type": "line", + "x": 643, + "y": 783, + "width": 137, + "height": 0, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 1527629801, + "version": 371, + "versionNonce": 1639366823, + "isDeleted": false, + "boundElements": null, + "updated": 1675590397124, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -137, + 0 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "type": "text", + "version": 290, + "versionNonce": 1250967881, + "isDeleted": false, + "id": "hxakD1P7MVGXZlrSZ4IDZ", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 574.5, + "y": 756, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 13, + "height": 26, + "seed": 987379943, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590397124, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "=", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "=" + }, + { + "type": "text", + "version": 309, + "versionNonce": 377885639, + "isDeleted": false, + "id": "eYH-l8FqVPjaI-zP9pfMb", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 548, + "y": 791, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 80, + "height": 26, + "seed": 1676833191, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590397124, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "one of...", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "one of..." + }, + { + "type": "text", + "version": 335, + "versionNonce": 191574057, + "isDeleted": false, + "id": "mDcIG5yl_8fiGlk6dlATR", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 914, + "y": 740, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 140, + "height": 26, + "seed": 933322633, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590397124, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "serve_forever", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "serve_forever" + }, + { + "type": "line", + "version": 703, + "versionNonce": 1359234343, + "isDeleted": false, + "id": "Ubb64XWlshf6YUbdArM9v", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1600.5, + "y": 785, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 778, + "height": 3, + "seed": 1141088295, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1675590439635, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + -778, + -3 + ] + ] + }, + { + "type": "rectangle", + "version": 693, + "versionNonce": 1729329735, + "isDeleted": false, + "id": "E0Uoo4aOU-71gi3MKCZ2Y", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1176.5, + "y": 160.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 181, + "height": 121, + "seed": 713789705, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "ui39Vh4hwmgLPRZz4n_UZ" + } + ], + "updated": 1675589927345, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 644, + "versionNonce": 1638756777, + "isDeleted": false, + "id": "ui39Vh4hwmgLPRZz4n_UZ", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1225.5, + "y": 208.75, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 83, + "height": 24, + "seed": 1115201543, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675589927345, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "stats.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "E0Uoo4aOU-71gi3MKCZ2Y", + "originalText": "stats.py" + }, + { + "type": "diamond", + "version": 1049, + "versionNonce": 1678958759, + "isDeleted": false, + "id": "-Pstud5nkYt1YM31u2x_X", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1172.5, + "y": 301.5, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 189, + "height": 179, + "seed": 921077737, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "type": "text", + "id": "_Sg0_xkkkxDFDg2nCEEbZ" + } + ], + "updated": 1675590333864, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1013, + "versionNonce": 1132863817, + "isDeleted": false, + "id": "_Sg0_xkkkxDFDg2nCEEbZ", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1191.5, + "y": 378.75, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 151, + "height": 24, + "seed": 1989478183, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590333864, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "GlancesStats()", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "-Pstud5nkYt1YM31u2x_X", + "originalText": "GlancesStats()" + }, + { + "type": "line", + "version": 468, + "versionNonce": 965934473, + "isDeleted": false, + "id": "NqgLCJSHOwjxpOyVPlWws", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1268, + "y": 307, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 26, + "seed": 780116681, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1675590338064, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -26 + ] + ] + }, + { + "type": "diamond", + "version": 859, + "versionNonce": 716072489, + "isDeleted": false, + "id": "cDntBigSar4I0WkyhIBAZ", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1172.5, + "y": 502.5, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 189, + "height": 179, + "seed": 13687943, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "type": "text", + "id": "AEXGY1IDMBeCvoLaKio__" + }, + { + "id": "NpkkDItD4vnSSVIkyLR5R", + "type": "arrow" + }, + { + "id": "Lm88UtXv6wAHHUhkhFctw", + "type": "arrow" + } + ], + "updated": 1675590352966, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 807, + "versionNonce": 766048263, + "isDeleted": false, + "id": "AEXGY1IDMBeCvoLaKio__", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1216.5, + "y": 579.75, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 101, + "height": 24, + "seed": 1453216617, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590352966, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "self.stats", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "cDntBigSar4I0WkyhIBAZ", + "originalText": "self.stats" + }, + { + "id": "futrrb24VLy0LwGgivfSn", + "type": "line", + "x": 1269, + "y": 475, + "width": 1, + "height": 31, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 1916753063, + "version": 191, + "versionNonce": 1514098121, + "isDeleted": false, + "boundElements": null, + "updated": 1675590368062, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -1, + 31 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "type": "text", + "version": 299, + "versionNonce": 113418695, + "isDeleted": false, + "id": "7_yYXmz-cljpM3XmXnwFz", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1276.5, + "y": 475, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 13, + "height": 26, + "seed": 171440295, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590363270, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "=", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "=" + }, + { + "type": "rectangle", + "version": 854, + "versionNonce": 1282611241, + "isDeleted": false, + "id": "zxj5BuGRA6gmOMpuytKOs", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1376, + "y": 159.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 208, + "height": 121, + "seed": 176909769, + "groupIds": [], + "roundness": { + "type": 3 + }, + "boundElements": [ + { + "type": "text", + "id": "9o5H_Z0ZXJgjf4VhEnGzw" + } + ], + "updated": 1675590082537, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 823, + "versionNonce": 973642471, + "isDeleted": false, + "id": "9o5H_Z0ZXJgjf4VhEnGzw", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1392.5, + "y": 208, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 175, + "height": 24, + "seed": 1216474951, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590082538, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "glances_curses.py", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "zxj5BuGRA6gmOMpuytKOs", + "originalText": "glances_curses.py" + }, + { + "type": "diamond", + "version": 1194, + "versionNonce": 945697735, + "isDeleted": false, + "id": "_VvreiuDNX6NcogCsHFMV", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1387, + "y": 300.5, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 189, + "height": 179, + "seed": 1816972457, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "type": "text", + "id": "RQnWQ-OtQLeiQKaWp6Fgp" + } + ], + "updated": 1675590333865, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 1163, + "versionNonce": 715460649, + "isDeleted": false, + "id": "RQnWQ-OtQLeiQKaWp6Fgp", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1410.5, + "y": 365.5, + "strokeColor": "#0b7285", + "backgroundColor": "transparent", + "width": 142, + "height": 48, + "seed": 1697803879, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590333865, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "GlancesCurses\nStandalone()", + "baseline": 41, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "_VvreiuDNX6NcogCsHFMV", + "originalText": "GlancesCurses\nStandalone()" + }, + { + "type": "line", + "version": 625, + "versionNonce": 1091550985, + "isDeleted": false, + "id": "fBPzn8itK0-ofbaaQP3QN", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1481.5, + "y": 309, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 29, + "seed": 272584585, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1675590342444, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -29 + ] + ] + }, + { + "type": "diamond", + "version": 1000, + "versionNonce": 817613513, + "isDeleted": false, + "id": "nHjJ_PGbRP1C54xcsONnl", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1388, + "y": 500.5, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 189, + "height": 179, + "seed": 298191239, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "type": "text", + "id": "4q18wE4O-McviQYBPBssm" + } + ], + "updated": 1675590352966, + "link": null, + "locked": false + }, + { + "type": "text", + "version": 958, + "versionNonce": 567403079, + "isDeleted": false, + "id": "4q18wE4O-McviQYBPBssm", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1430.5, + "y": 577.75, + "strokeColor": "#c92a2a", + "backgroundColor": "transparent", + "width": 104, + "height": 24, + "seed": 1553888873, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590352966, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "self.screen", + "baseline": 17, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "nHjJ_PGbRP1C54xcsONnl", + "originalText": "self.screen" + }, + { + "type": "line", + "version": 341, + "versionNonce": 396097287, + "isDeleted": false, + "id": "K2am61VoMQBdemjmaY1_X", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1482.5, + "y": 475, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0, + "height": 30, + "seed": 460931239, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1675590372353, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 30 + ] + ] + }, + { + "type": "text", + "version": 442, + "versionNonce": 898007593, + "isDeleted": false, + "id": "o-2dvVa3qGN-ZtEGLbbxq", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1491, + "y": 474, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 13, + "height": 26, + "seed": 1681244489, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590363270, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "=", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "=" + }, + { + "type": "arrow", + "version": 771, + "versionNonce": 1605823785, + "isDeleted": false, + "id": "NpkkDItD4vnSSVIkyLR5R", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1227.536826021261, + "y": 647.4036780704577, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 2.2278702768758194, + "height": 132.47821261660965, + "seed": 2085136617, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1675590352992, + "link": null, + "locked": false, + "startBinding": { + "elementId": "cDntBigSar4I0WkyhIBAZ", + "focus": 0.4274591641778541, + "gap": 2.3806234060035365 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 2.2278702768758194, + 132.47821261660965 + ] + ] + }, + { + "type": "arrow", + "version": 818, + "versionNonce": 1297651175, + "isDeleted": false, + "id": "Lm88UtXv6wAHHUhkhFctw", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1310.527371847451, + "y": 646.8414945083808, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 2.2373244506859464, + "height": 133.04039617868648, + "seed": 987698825, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1675590352992, + "link": null, + "locked": false, + "startBinding": { + "elementId": "cDntBigSar4I0WkyhIBAZ", + "focus": -0.45084771412902047, + "gap": 4.767145239963185 + }, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 2.2373244506859464, + 133.04039617868648 + ] + ] + }, + { + "type": "text", + "version": 361, + "versionNonce": 1517286249, + "isDeleted": false, + "id": "3d-5XlfL-DXIG63Prnbrl", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1145.5, + "y": 696, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 69, + "height": 26, + "seed": 1263546985, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590352966, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "update", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "update" + }, + { + "type": "text", + "version": 398, + "versionNonce": 994710439, + "isDeleted": false, + "id": "uNMRAmQ5fFPZz6Cn-WskG", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1325, + "y": 696, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 64, + "height": 26, + "seed": 208532489, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590352966, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "export", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "export" + }, + { + "type": "arrow", + "version": 800, + "versionNonce": 80715337, + "isDeleted": false, + "id": "GgJ0Au16dwqt1oMD4qRft", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1484.235303701863, + "y": 674.1181093129326, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 0.47060740372603505, + "height": 110.76378137413474, + "seed": 2080294919, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": null, + "updated": 1675590352966, + "link": null, + "locked": false, + "startBinding": null, + "endBinding": null, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + -0.47060740372603505, + 110.76378137413474 + ] + ] + }, + { + "type": "text", + "version": 416, + "versionNonce": 674694855, + "isDeleted": false, + "id": "Rd0PFLBfIckxgEJHI0gYv", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1491.5, + "y": 700, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 69, + "height": 26, + "seed": 1013327143, + "groupIds": [], + "roundness": null, + "boundElements": null, + "updated": 1675590352966, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 1, + "text": "update", + "baseline": 18, + "textAlign": "center", + "verticalAlign": "top", + "containerId": null, + "originalText": "update" + }, + { + "id": "AJrOfZ3BWcGWx-phOFTM8", + "type": "ellipse", + "x": 1573, + "y": 769, + "width": 29, + "height": 29, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 1997338857, + "version": 65, + "versionNonce": 1498437481, + "isDeleted": false, + "boundElements": [], + "updated": 1675590469409, + "link": null, + "locked": false + }, + { + "type": "ellipse", + "version": 108, + "versionNonce": 1598836359, + "isDeleted": false, + "id": "7MgSBEIoPRZ3PGYWt6ttF", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "angle": 0, + "x": 1113.5, + "y": 767.5, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "width": 29, + "height": 29, + "seed": 1598347879, + "groupIds": [], + "roundness": { + "type": 2 + }, + "boundElements": [ + { + "id": "JoP4A7A2IwEAe9b7xarHX", + "type": "arrow" + } + ], + "updated": 1675590494704, + "link": null, + "locked": false + }, + { + "id": "iVLKUce4Dj1p19ez2Kmis", + "type": "line", + "x": 1587, + "y": 797, + "width": 1, + "height": 41, + "angle": 0, + "strokeColor": "#495057", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 1678897063, + "version": 23, + "versionNonce": 625487017, + "isDeleted": false, + "boundElements": null, + "updated": 1675590505143, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -1, + 41 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "jR1l0tisTaLalG3_hgJdD", + "type": "line", + "x": 1586, + "y": 837, + "width": 462, + "height": 0, + "angle": 0, + "strokeColor": "#495057", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 1897784839, + "version": 54, + "versionNonce": 1411190375, + "isDeleted": false, + "boundElements": null, + "updated": 1675590505143, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -462, + 0 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "JoP4A7A2IwEAe9b7xarHX", + "type": "arrow", + "x": 1125, + "y": 838, + "width": 1, + "height": 37, + "angle": 0, + "strokeColor": "#495057", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 100, + "groupIds": [], + "roundness": { + "type": 2 + }, + "seed": 1949962409, + "version": 20, + "versionNonce": 1389277065, + "isDeleted": false, + "boundElements": null, + "updated": 1675590505144, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 1, + -37 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "7MgSBEIoPRZ3PGYWt6ttF", + "focus": 0.10247888787140157, + "gap": 4.6049731745427955 + }, + "startArrowhead": null, + "endArrowhead": "arrow" + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/docs/_static/glances-architecture.png b/docs/_static/glances-architecture.png new file mode 100644 index 0000000000..84dd8c4502 Binary files /dev/null and b/docs/_static/glances-architecture.png differ diff --git a/docs/_static/glances-cgraph.svg b/docs/_static/glances-cgraph.svg new file mode 100644 index 0000000000..65ab3ac9b2 --- /dev/null +++ b/docs/_static/glances-cgraph.svg @@ -0,0 +1,1444 @@ + + + + + + +%3 + + + + + + +23 + + +_pslinux:1672:_parse_stat_file +0.62% +(0.09%) +35955× + + + + + +1778 + + +_common:728:bcat +5.98% +(0.03%) +43696× + + + + + +23->1778 + + +0.46% +35955× + + + +840 + + +_common:711:cat +2.73% +(0.06%) +44312× + + + + + +1778->840 + + +0.29% +2513× + + + +139 + + +~:0:<method 'run' of '_contextvars.Context' objects> +5.61% +(0.00%) +27× + + + + + +139->1778 + + +0.14% +57× + + + +142 + + +<frozen importlib:1308:_find_and_load_unlocked +0.55% +(0.00%) +746× + + + + + +458 + + +<frozen importlib:914:_load_unlocked +0.55% +(0.00%) +724× + + + + + +142->458 + + +0.55% +44× + + + +2352 + + +<frozen importlib:756:exec_module +0.54% +(0.00%) +663× + + + + + +458->2352 + + +0.54% +44× + + + +176 + + +__init__:2312:sensors_temperatures +2.92% +(0.00%) + + + + + + +181 + + +_pslinux:1252:sensors_temperatures +2.92% +(0.00%) + + + + + + +176->181 + + +0.23% + + + + +1927 + + +threading:1096:join +5.31% +(0.00%) +24× + + + + + +176->1927 + + +1.42% + + + + +181->1778 + + +0.22% +172× + + + +183 + + +_pslinux:1370:sensors_fans +0.98% +(0.00%) + + + + + + +224 + + +thread:97:_worker +2.70% +(0.00%) +24× + + + + + +230 + + +__init__:520:get_process_curses_data +3.32% +(0.67%) +31668× + + + + + +243 + + +__init__:349:update +2.70% +(0.00%) +12× + + + + + +246 + + +__init__:334:__fetch_data +2.95% +(0.00%) +14× + + + + + +246->176 + + +0.23% + + + + +247 + + +battery:106:update +2.71% +(0.00%) + + + + + + +2366 + + +battery:35:__init__ +2.70% +(0.00%) + + + + + + +247->2366 + + +0.15% + + + + +248 + + +__init__:152:update_local +0.60% +(0.01%) +25× + + + + + +2557 + + +globals:618:wraps +0.55% +(0.00%) +50× + + + + + +248->2557 + + +0.55% +50× + + + +257 + + +thread:71:run +2.70% +(0.00%) +24× + + + + + +257->1778 + + +0.97% +128× + + + +260 + + +thread:81:run +2.70% +(0.00%) +24× + + + + + +261 + + +__init__:123:__get_sensor_data +2.70% +(0.00%) +24× + + + + + +261->1778 + + +0.62% +113× + + + +261->1927 + + +0.18% + + + + +291 + + +__init__:2350:sensors_fans +0.99% +(0.00%) + + + + + + +291->1778 + + +0.18% +59× + + + +293 + + +threading:1012:run +2.70% +(0.00%) +24× + + + + + +293->1778 + + +0.16% +19× + + + +294 + + +threading:1029:_bootstrap +6.41% +(0.00%) +27× + + + + + +320 + + +__init__:556:msg_curse +3.41% +(0.03%) +60× + + + + + +320->230 + + +3.32% +31668× + + + +322 + + +__init__:149:update +2.71% +(0.00%) + + + + + + +353 + + +<frozen importlib:1360:_find_and_load +0.55% +(0.00%) +750× + + + + + +353->142 + + +0.55% +43× + + + +1394 + + +<frozen importlib:483:_call_with_frames_removed +0.54% +(0.00%) +1805× + + + + + +2352->1394 + + +0.54% +44× + + + +477 + + +__init__:1512:process_iter +2.99% +(0.04%) +17709× + + + + + +488 + + +stats:271:update_plugin +9.26% +(0.01%) +868× + + + + + +1599 + + +model:658:update_views +1.32% +(0.31%) +868× + + + + + +488->1599 + + +1.24% +492× + + + +1843 + + +glances_curses:1200:wait +45.78% +(0.00%) +290× + + + + + +488->1843 + + +1.19% + + + + +2652 + + +glances_curses:289:__catch_key +43.83% +(0.00%) +290× + + + + + +488->2652 + + +1.04% + + + + +2749 + + +model:631:_build_view_for_field +0.98% +(0.34%) +516894× + + + + + +1599->2749 + + +0.98% +516894× + + + +1842 + + +~:0:<built-in method _curses.napms> +43.00% +(43.02%) +290× + + + + + +1843->1842 + + +43.00% +290× + + + +1855 + + +glances_curses:259:get_key +43.83% +(0.00%) +290× + + + + + +2652->1855 + + +0.30% + + + + +614 + + +glances_batpercent:98:update +2.56% +(0.00%) + + + + + + +618 + + +model:1293:wrapper +7.69% +(0.02%) +580× + + + + + +618->322 + + +2.71% + + + + +2487 + + +globals:573:inner +9.27% +(0.01%) +868× + + + + + +618->2487 + + +0.43% +23× + + + +2917 + + +__init__:125:update +0.60% +(0.00%) +25× + + + + + +618->2917 + + +0.60% +25× + + + +2647 + + +standalone:136:__serve_once +98.96% +(0.01%) +30× + + + + + +2487->2647 + + +95.19% +29× + + + +2917->248 + + +0.60% +25× + + + +764 + + +stats:95:_load_plugin +0.75% +(0.00%) +35× + + + + + +788 + + +model:803:get_alert +0.66% +(0.21%) +65347× + + + + + +2043 + + +~:0:<method 'read' of '_io.BufferedReader' objects> +2.52% +(2.61%) +61993× + + + + + +840->2043 + + +0.28% +2411× + + + +843 + + +battery:58:__get_stat__ +0.85% +(0.00%) +189× + + + + + +2044 + + +~:0:<method 'read' of '_io.TextIOWrapper' objects> +0.89% +(0.73%) +9286× + + + + + +843->2044 + + +0.15% +29× + + + +858 + + +__init__:161:main +99.90% +(0.00%) + + + + + + +2243 + + +__init__:125:start +99.88% +(0.00%) + + + + + + +858->2243 + + +99.88% + + + + +2243->353 + + +0.16% + + + + +862 + + +stats:133:load_plugins +0.76% +(0.00%) + + + + + + +862->764 + + +0.75% +35× + + + +1425 + + +~:0:<built-in method builtins.exec> +100.00% +(0.03%) +762× + + + + + +1394->1425 + + +0.54% +44× + + + +1809 + + +run-venv:1:<module> +100.00% +(0.00%) + + + + + + +1425->1809 + + +100.00% + + + + +1809->353 + + +0.10% + + + + +1809->858 + + +99.90% + + + + +1435 + + +__init__:545:as_dict +2.86% +(0.23%) +17680× + + + + + +1767 + + +__init__:1025:cpu_percent +0.62% +(0.05%) +17679× + + + + + +1435->1767 + + +0.62% +17679× + + + +2083 + + +_pslinux:1589:wrapper +2.21% +(0.23%) +312453× + + + + + +1767->2083 + + +0.44% +17679× + + + +1530 + + +model:1082:get_stats_display +3.47% +(0.00%) +1050× + + + + + +1530->320 + + +3.41% +60× + + + +1750 + + +glances_curses:514:__get_stat_display +3.47% +(0.00%) +30× + + + + + +1750->1530 + + +3.47% +1020× + + + +1788 + + +threading:1064:_bootstrap_inner +6.36% +(0.00%) +27× + + + + + +1854 + + +~:0:<method 'getch' of '_curses.window' objects> +43.83% +(42.90%) +290× + + + + + +1855->1854 + + +0.30% + + + + +1866 + + +glances_curses:1138:update +90.79% +(0.01%) +30× + + + + + +1866->1843 + + +19.43% +131× + + + +1866->2652 + + +0.30% + + + + +2655 + + +glances_curses:1124:flush +3.63% +(0.02%) +30× + + + + + +1866->2655 + + +3.63% +30× + + + +2626 + + +glances_curses:549:display +3.60% +(0.00%) +30× + + + + + +2655->2626 + + +3.60% +30× + + + +1913 + + +thread:254:shutdown +2.71% +(0.00%) + + + + + + +2041 + + +~:0:<built-in method _io.open> +0.50% +(0.49%) +107389× + + + + + +2136 + + +processes:476:build_process_list +3.36% +(0.02%) +30× + + + + + +2166 + + +~:0:<method 'join' of '_thread._ThreadHandle' objects> +5.31% +(0.00%) +24× + + + + + +2180 + + +glances_batpercent:62:update +2.56% +(0.00%) + + + + + + +2647->1866 + + +41.67% +14× + + + +2653 + + +stats:278:update +9.25% +(0.00%) +31× + + + + + +2647->2653 + + +3.76% +14× + + + +2517 + + +_common:367:wrapper +1.38% +(0.13%) +179748× + + + + + +2517->23 + + +0.62% +35955× + + + +2626->1750 + + +3.47% +30× + + + +2639 + + +processes:591:update +3.71% +(0.02%) +30× + + + + + +2641 + + +model:1275:wrapper +7.64% +(0.01%) +653× + + + + + +2644 + + +__init__:77:update +3.71% +(0.00%) +30× + + + + + +2653->1843 + + +0.89% + + + + +2653->2652 + + +1.78% +12× + + + +2648 + + +standalone:174:serve_n +98.96% +(0.00%) + + + + + + +2650 + + +standalone:33:__init__ +0.59% +(0.00%) + + + + + + +2705 + + +stats:30:__init__ +0.76% +(0.00%) + + + + + + +2650->2705 + + +0.76% + + + + +2679 + + +stats:72:load_modules +0.76% +(0.00%) + + + + + + +2705->2679 + + +0.76% + + + + +2679->862 + + +0.76% + + + + +2701 + + +globals:568:_func +9.26% +(0.00%) +868× + + + + + +2750 + + +__init__:262:run +2.77% +(0.00%) + + + + + + +2910 + + +_base:666:__exit__ +2.71% +(0.00%) + + + + + + +5089 + + +standalone:181:serve_forever +98.96% +(0.00%) + + + + + + +5090 + + +__init__:98:setup_server_mode +99.71% +(0.00%) + + + + + + diff --git a/docs/_static/glances-flame.svg b/docs/_static/glances-flame.svg new file mode 100644 index 0000000000..53521abc2d --- /dev/null +++ b/docs/_static/glances-flame.svg @@ -0,0 +1,491 @@ +py-spy record -o docs/_static/glances-flame.svg -d 60 -s -- uv run python run-venv.py -C conf/glances.conf --stop-after 30 Reset ZoomSearch add_fns_to_class (dataclasses.py:498) (2 samples, 0.18%)<module> (glances/event.py:38) (5 samples, 0.46%)_find_and_load (<frozen importlib._bootstrap>:1360) (5 samples, 0.46%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (5 samples, 0.46%)_load_unlocked (<frozen importlib._bootstrap>:935) (5 samples, 0.46%)exec_module (<frozen importlib._bootstrap_external>:1027) (5 samples, 0.46%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (5 samples, 0.46%)<module> (pydantic/dataclasses.py:15) (5 samples, 0.46%)_handle_fromlist (<frozen importlib._bootstrap>:1415) (5 samples, 0.46%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (5 samples, 0.46%)_find_and_load (<frozen importlib._bootstrap>:1360) (5 samples, 0.46%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (5 samples, 0.46%)_load_unlocked (<frozen importlib._bootstrap>:935) (5 samples, 0.46%)exec_module (<frozen importlib._bootstrap_external>:1027) (5 samples, 0.46%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (5 samples, 0.46%)<module> (pydantic/_internal/_dataclasses.py:28) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (4 samples, 0.37%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (4 samples, 0.37%)_load_unlocked (<frozen importlib._bootstrap>:935) (4 samples, 0.37%)exec_module (<frozen importlib._bootstrap_external>:1027) (4 samples, 0.37%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (4 samples, 0.37%)<module> (pydantic/_internal/_generate_schema.py:62) (3 samples, 0.28%)_find_and_load (<frozen importlib._bootstrap>:1360) (3 samples, 0.28%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (3 samples, 0.28%)_load_unlocked (<frozen importlib._bootstrap>:935) (3 samples, 0.28%)exec_module (<frozen importlib._bootstrap_external>:1027) (3 samples, 0.28%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (3 samples, 0.28%)<module> (pydantic/functional_validators.py:30) (3 samples, 0.28%)wrap (dataclasses.py:1297) (3 samples, 0.28%)_process_class (dataclasses.py:1157) (3 samples, 0.28%)create_schema_validator (pydantic/plugin/_schema_validator.py:37) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (pydantic/plugin/_loader.py:3) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (glances/standalone.py:17) (8 samples, 0.74%)_find_and_load (<frozen importlib._bootstrap>:1360) (8 samples, 0.74%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (8 samples, 0.74%)_load_unlocked (<frozen importlib._bootstrap>:935) (8 samples, 0.74%)exec_module (<frozen importlib._bootstrap_external>:1027) (8 samples, 0.74%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (8 samples, 0.74%)<module> (glances/outputs/glances_curses.py:15) (8 samples, 0.74%)_find_and_load (<frozen importlib._bootstrap>:1360) (8 samples, 0.74%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (8 samples, 0.74%)_load_unlocked (<frozen importlib._bootstrap>:935) (8 samples, 0.74%)exec_module (<frozen importlib._bootstrap_external>:1027) (8 samples, 0.74%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (8 samples, 0.74%)<module> (glances/events_list.py:15) (8 samples, 0.74%)_find_and_load (<frozen importlib._bootstrap>:1360) (8 samples, 0.74%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (8 samples, 0.74%)_load_unlocked (<frozen importlib._bootstrap>:935) (8 samples, 0.74%)exec_module (<frozen importlib._bootstrap_external>:1027) (8 samples, 0.74%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (8 samples, 0.74%)<module> (glances/event.py:47) (3 samples, 0.28%)dataclass (pydantic/dataclasses.py:313) (3 samples, 0.28%)create_dataclass (pydantic/dataclasses.py:310) (3 samples, 0.28%)complete_dataclass (pydantic/_internal/_dataclasses.py:186) (3 samples, 0.28%)start (glances/__init__.py:136) (11 samples, 1.01%)_find_and_load (<frozen importlib._bootstrap>:1360) (11 samples, 1.01%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (11 samples, 1.01%)_load_unlocked (<frozen importlib._bootstrap>:935) (11 samples, 1.01%)exec_module (<frozen importlib._bootstrap_external>:1027) (11 samples, 1.01%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (11 samples, 1.01%)<module> (glances/standalone.py:22) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (glances/outputs/glances_stdout_fetch.py:11) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (jinja2/__init__.py:9) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (docker/api/client.py:10) (2 samples, 0.18%)_handle_fromlist (<frozen importlib._bootstrap>:1415) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (docker/auth.py:6) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (docker/utils/__init__.py:2) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (docker/utils/build.py:4) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1023) (2 samples, 0.18%)get_code (<frozen importlib._bootstrap_external>:1156) (2 samples, 0.18%)_compile_bytecode (<frozen importlib._bootstrap_external>:785) (2 samples, 0.18%)<module> (glances/plugins/containers/engines/docker.py:21) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (4 samples, 0.37%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (4 samples, 0.37%)_load_unlocked (<frozen importlib._bootstrap>:935) (4 samples, 0.37%)exec_module (<frozen importlib._bootstrap_external>:1027) (4 samples, 0.37%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (4 samples, 0.37%)<module> (docker/__init__.py:1) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (4 samples, 0.37%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (4 samples, 0.37%)_load_unlocked (<frozen importlib._bootstrap>:935) (4 samples, 0.37%)exec_module (<frozen importlib._bootstrap_external>:1027) (4 samples, 0.37%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (4 samples, 0.37%)<module> (docker/api/__init__.py:1) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (4 samples, 0.37%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (4 samples, 0.37%)_load_unlocked (<frozen importlib._bootstrap>:935) (4 samples, 0.37%)exec_module (<frozen importlib._bootstrap_external>:1027) (4 samples, 0.37%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (4 samples, 0.37%)<module> (docker/api/client.py:35) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (dateutil/parser/__init__.py:2) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)<module> (glances/plugins/containers/__init__.py:19) (7 samples, 0.65%)_find_and_load (<frozen importlib._bootstrap>:1360) (7 samples, 0.65%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (7 samples, 0.65%)_load_unlocked (<frozen importlib._bootstrap>:935) (7 samples, 0.65%)exec_module (<frozen importlib._bootstrap_external>:1027) (7 samples, 0.65%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (7 samples, 0.65%)<module> (glances/plugins/containers/engines/docker.py:23) (3 samples, 0.28%)_handle_fromlist (<frozen importlib._bootstrap>:1412) (3 samples, 0.28%)__getattr__ (dateutil/__init__.py:16) (3 samples, 0.28%)import_module (importlib/__init__.py:88) (3 samples, 0.28%)_gcd_import (<frozen importlib._bootstrap>:1387) (3 samples, 0.28%)_find_and_load (<frozen importlib._bootstrap>:1360) (3 samples, 0.28%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (3 samples, 0.28%)_load_unlocked (<frozen importlib._bootstrap>:935) (3 samples, 0.28%)exec_module (<frozen importlib._bootstrap_external>:1027) (3 samples, 0.28%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (3 samples, 0.28%)exec_module (<frozen importlib._bootstrap_external>:1023) (2 samples, 0.18%)get_code (<frozen importlib._bootstrap_external>:1156) (2 samples, 0.18%)_compile_bytecode (<frozen importlib._bootstrap_external>:785) (2 samples, 0.18%)<module> (rich/console.py:51) (5 samples, 0.46%)_find_and_load (<frozen importlib._bootstrap>:1360) (5 samples, 0.46%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (5 samples, 0.46%)_load_unlocked (<frozen importlib._bootstrap>:935) (5 samples, 0.46%)exec_module (<frozen importlib._bootstrap_external>:1027) (5 samples, 0.46%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (5 samples, 0.46%)<module> (rich/_log_render.py:5) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (4 samples, 0.37%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (4 samples, 0.37%)_load_unlocked (<frozen importlib._bootstrap>:935) (4 samples, 0.37%)exec_module (<frozen importlib._bootstrap_external>:1027) (4 samples, 0.37%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (4 samples, 0.37%)<module> (rich/text.py:18) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (3 samples, 0.28%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)<module> (rich/progress.py:43) (9 samples, 0.83%)_find_and_load (<frozen importlib._bootstrap>:1360) (9 samples, 0.83%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (9 samples, 0.83%)_load_unlocked (<frozen importlib._bootstrap>:935) (9 samples, 0.83%)exec_module (<frozen importlib._bootstrap_external>:1027) (8 samples, 0.74%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (8 samples, 0.74%)<module> (podman/client.py:13) (13 samples, 1.20%)_find_and_load (<frozen importlib._bootstrap>:1360) (13 samples, 1.20%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (13 samples, 1.20%)_load_unlocked (<frozen importlib._bootstrap>:935) (13 samples, 1.20%)exec_module (<frozen importlib._bootstrap_external>:1027) (13 samples, 1.20%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (13 samples, 1.20%)<module> (podman/domain/containers_manager.py:9) (13 samples, 1.20%)_find_and_load (<frozen importlib._bootstrap>:1360) (13 samples, 1.20%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (13 samples, 1.20%)_load_unlocked (<frozen importlib._bootstrap>:935) (13 samples, 1.20%)exec_module (<frozen importlib._bootstrap_external>:1027) (12 samples, 1.11%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (12 samples, 1.11%)<module> (podman/domain/containers.py:15) (12 samples, 1.11%)_find_and_load (<frozen importlib._bootstrap>:1360) (12 samples, 1.11%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (12 samples, 1.11%)_load_unlocked (<frozen importlib._bootstrap>:935) (12 samples, 1.11%)exec_module (<frozen importlib._bootstrap_external>:1027) (10 samples, 0.92%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (10 samples, 0.92%)<module> (podman/domain/images_manager.py:24) (10 samples, 0.92%)_find_and_load (<frozen importlib._bootstrap>:1360) (10 samples, 0.92%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (10 samples, 0.92%)_load_unlocked (<frozen importlib._bootstrap>:935) (10 samples, 0.92%)exec_module (<frozen importlib._bootstrap_external>:1027) (10 samples, 0.92%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (10 samples, 0.92%)<module> (podman/api/__init__.py:4) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (glances/plugins/containers/__init__.py:20) (16 samples, 1.48%)_find_and_load (<frozen importlib._bootstrap>:1360) (16 samples, 1.48%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (16 samples, 1.48%)_load_unlocked (<frozen importlib._bootstrap>:935) (16 samples, 1.48%)exec_module (<frozen importlib._bootstrap_external>:1027) (16 samples, 1.48%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (16 samples, 1.48%)<module> (glances/plugins/containers/engines/podman.py:21) (16 samples, 1.48%)_find_and_load (<frozen importlib._bootstrap>:1360) (16 samples, 1.48%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (16 samples, 1.48%)_load_unlocked (<frozen importlib._bootstrap>:935) (16 samples, 1.48%)exec_module (<frozen importlib._bootstrap_external>:1027) (16 samples, 1.48%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (16 samples, 1.48%)<module> (podman/__init__.py:3) (16 samples, 1.48%)_find_and_load (<frozen importlib._bootstrap>:1360) (16 samples, 1.48%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (16 samples, 1.48%)_load_unlocked (<frozen importlib._bootstrap>:935) (16 samples, 1.48%)exec_module (<frozen importlib._bootstrap_external>:1027) (16 samples, 1.48%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (16 samples, 1.48%)<module> (podman/client.py:9) (3 samples, 0.28%)_find_and_load (<frozen importlib._bootstrap>:1360) (3 samples, 0.28%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (3 samples, 0.28%)_load_unlocked (<frozen importlib._bootstrap>:935) (3 samples, 0.28%)exec_module (<frozen importlib._bootstrap_external>:1027) (3 samples, 0.28%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (3 samples, 0.28%)<module> (glances/plugins/gpu/__init__.py:19) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (4 samples, 0.37%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (4 samples, 0.37%)_load_unlocked (<frozen importlib._bootstrap>:935) (4 samples, 0.37%)exec_module (<frozen importlib._bootstrap_external>:1027) (4 samples, 0.37%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (4 samples, 0.37%)<module> (glances/plugins/gpu/cards/nvidia.py:30) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (4 samples, 0.37%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (4 samples, 0.37%)_load_unlocked (<frozen importlib._bootstrap>:935) (4 samples, 0.37%)exec_module (<frozen importlib._bootstrap_external>:1027) (3 samples, 0.28%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (3 samples, 0.28%)<module> (glances/ports_list.py:14) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)<module> (glances/plugins/ports/__init__.py:22) (3 samples, 0.28%)_find_and_load (<frozen importlib._bootstrap>:1360) (3 samples, 0.28%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (3 samples, 0.28%)_load_unlocked (<frozen importlib._bootstrap>:935) (3 samples, 0.28%)exec_module (<frozen importlib._bootstrap_external>:1027) (3 samples, 0.28%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (3 samples, 0.28%)<module> (requests/__init__.py:43) (3 samples, 0.28%)_find_and_load (<frozen importlib._bootstrap>:1360) (3 samples, 0.28%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (3 samples, 0.28%)_load_unlocked (<frozen importlib._bootstrap>:935) (3 samples, 0.28%)exec_module (<frozen importlib._bootstrap_external>:1027) (3 samples, 0.28%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (3 samples, 0.28%)<module> (urllib3/__init__.py:15) (3 samples, 0.28%)_find_and_load (<frozen importlib._bootstrap>:1360) (3 samples, 0.28%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (3 samples, 0.28%)_load_unlocked (<frozen importlib._bootstrap>:935) (3 samples, 0.28%)exec_module (<frozen importlib._bootstrap_external>:1027) (3 samples, 0.28%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (3 samples, 0.28%)<module> (urllib3/_base_connection.py:5) (3 samples, 0.28%)_find_and_load (<frozen importlib._bootstrap>:1360) (3 samples, 0.28%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1310) (3 samples, 0.28%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (3 samples, 0.28%)_find_and_load (<frozen importlib._bootstrap>:1360) (3 samples, 0.28%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (3 samples, 0.28%)_load_unlocked (<frozen importlib._bootstrap>:935) (3 samples, 0.28%)exec_module (<frozen importlib._bootstrap_external>:1027) (3 samples, 0.28%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (3 samples, 0.28%)<module> (requests/compat.py:42) (2 samples, 0.18%)_resolve_char_detection (requests/compat.py:36) (2 samples, 0.18%)import_module (importlib/__init__.py:88) (2 samples, 0.18%)_gcd_import (<frozen importlib._bootstrap>:1387) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (charset_normalizer/__init__.py:26) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (charset_normalizer/api.py:7) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (charset_normalizer/cd.py:9) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1023) (2 samples, 0.18%)get_code (<frozen importlib._bootstrap_external>:1156) (2 samples, 0.18%)_compile_bytecode (<frozen importlib._bootstrap_external>:785) (2 samples, 0.18%)<module> (glances/plugins/ports/__init__.py:27) (9 samples, 0.83%)_find_and_load (<frozen importlib._bootstrap>:1360) (9 samples, 0.83%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (9 samples, 0.83%)_load_unlocked (<frozen importlib._bootstrap>:935) (9 samples, 0.83%)exec_module (<frozen importlib._bootstrap_external>:1027) (9 samples, 0.83%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (9 samples, 0.83%)<module> (requests/__init__.py:45) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (4 samples, 0.37%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (4 samples, 0.37%)_load_unlocked (<frozen importlib._bootstrap>:935) (4 samples, 0.37%)exec_module (<frozen importlib._bootstrap_external>:1027) (4 samples, 0.37%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (4 samples, 0.37%)<module> (requests/exceptions.py:9) (4 samples, 0.37%)_find_and_load (<frozen importlib._bootstrap>:1360) (4 samples, 0.37%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (4 samples, 0.37%)_load_unlocked (<frozen importlib._bootstrap>:935) (4 samples, 0.37%)exec_module (<frozen importlib._bootstrap_external>:1027) (4 samples, 0.37%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (4 samples, 0.37%)<module> (requests/compat.py:74) (2 samples, 0.18%)_handle_fromlist (<frozen importlib._bootstrap>:1415) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)_load_plugin (glances/stats.py:100) (46 samples, 4.24%)_load..import_module (importlib/__init__.py:88) (46 samples, 4.24%)impor.._gcd_import (<frozen importlib._bootstrap>:1387) (46 samples, 4.24%)_gcd_.._find_and_load (<frozen importlib._bootstrap>:1360) (45 samples, 4.15%)_find.._find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (44 samples, 4.06%)_fin.._load_unlocked (<frozen importlib._bootstrap>:935) (43 samples, 3.97%)_loa..exec_module (<frozen importlib._bootstrap_external>:1027) (42 samples, 3.87%)exec.._call_with_frames_removed (<frozen importlib._bootstrap>:488) (42 samples, 3.87%)_cal..<module> (glances/plugins/sensors/__init__.py:21) (2 samples, 0.18%)_find_and_load (<frozen importlib._bootstrap>:1360) (2 samples, 0.18%)_find_and_load_unlocked (<frozen importlib._bootstrap>:1331) (2 samples, 0.18%)_load_unlocked (<frozen importlib._bootstrap>:935) (2 samples, 0.18%)exec_module (<frozen importlib._bootstrap_external>:1027) (2 samples, 0.18%)_call_with_frames_removed (<frozen importlib._bootstrap>:488) (2 samples, 0.18%)<module> (glances/plugins/sensors/sensor/glances_batpercent.py:31) (2 samples, 0.18%)sensors_battery (psutil/__init__.py:2361) (2 samples, 0.18%)__init__ (glances/plugins/amps/__init__.py:44) (2 samples, 0.18%)__init__ (glances/amps_list.py:39) (2 samples, 0.18%)__init__ (glances/plugins/containers/__init__.py:158) (2 samples, 0.18%)__init__ (glances/plugins/containers/engines/docker.py:226) (2 samples, 0.18%)connect (glances/plugins/containers/engines/docker.py:233) (2 samples, 0.18%)from_env (docker/client.py:94) (2 samples, 0.18%)__init__ (docker/client.py:45) (2 samples, 0.18%)__init__ (docker/api/client.py:207) (2 samples, 0.18%)_retrieve_server_version (docker/api/client.py:223) (2 samples, 0.18%)version (docker/api/daemon.py:181) (2 samples, 0.18%)inner (docker/utils/decorators.py:44) (2 samples, 0.18%)_get (docker/api/client.py:246) (2 samples, 0.18%)get (requests/sessions.py:602) (2 samples, 0.18%)request (requests/sessions.py:589) (2 samples, 0.18%)send (requests/sessions.py:703) (2 samples, 0.18%)send (requests/adapters.py:644) (2 samples, 0.18%)urlopen (urllib3/connectionpool.py:787) (2 samples, 0.18%)_make_request (urllib3/connectionpool.py:534) (2 samples, 0.18%)getresponse (urllib3/connection.py:565) (2 samples, 0.18%)getresponse (http/client.py:1430) (2 samples, 0.18%)begin (http/client.py:350) (2 samples, 0.18%)parse_headers (http/client.py:249) (2 samples, 0.18%)_parse_header_lines (http/client.py:243) (2 samples, 0.18%)parsestr (email/parser.py:64) (2 samples, 0.18%)parse (email/parser.py:53) (2 samples, 0.18%)feed (email/feedparser.py:176) (2 samples, 0.18%)_call_parse (email/feedparser.py:180) (2 samples, 0.18%)_parsegen (email/feedparser.py:295) (2 samples, 0.18%)get_content_maintype (email/message.py:632) (2 samples, 0.18%)get_content_type (email/message.py:616) (2 samples, 0.18%)get (email/message.py:509) (2 samples, 0.18%)header_fetch_parse (email/_policybase.py:324) (2 samples, 0.18%)_sanitize_header (email/_policybase.py:292) (2 samples, 0.18%)nvmlInitWithFlags (pynvml.py:2785) (6 samples, 0.55%)__init__ (glances/plugins/gpu/__init__.py:77) (7 samples, 0.65%)__init__ (glances/plugins/gpu/cards/nvidia.py:52) (7 samples, 0.65%)nvmlInit (pynvml.py:2796) (7 samples, 0.65%)walk (<frozen os>:393) (2 samples, 0.18%)get_device_list (glances/plugins/gpu/cards/amd.py:90) (5 samples, 0.46%)get_device_list (glances/plugins/gpu/cards/amd.py:93) (2 samples, 0.18%)match (re/__init__.py:167) (2 samples, 0.18%)_compile (re/__init__.py:350) (2 samples, 0.18%)get_device_list (glances/plugins/gpu/cards/amd.py:94) (2 samples, 0.18%)__init__ (glances/plugins/gpu/__init__.py:78) (10 samples, 0.92%)__init__ (glances/plugins/gpu/cards/amd.py:57) (10 samples, 0.92%)cat (psutil/_common.py:800) (6 samples, 0.55%)open_binary (psutil/_common.py:764) (6 samples, 0.55%)sensors_temperatures (psutil/_pslinux.py:1334) (18 samples, 1.66%)bcat (psutil/_common.py:812) (18 samples, 1.66%)cat (psutil/_common.py:801) (12 samples, 1.11%)sensors_temperatures (psutil/_pslinux.py:1336) (4 samples, 0.37%)cat (psutil/_common.py:800) (4 samples, 0.37%)open_text (psutil/_common.py:774) (3 samples, 0.28%)sensors_temperatures (psutil/_pslinux.py:1348) (5 samples, 0.46%)bcat (psutil/_common.py:812) (5 samples, 0.46%)cat (psutil/_common.py:804) (5 samples, 0.46%)open_text (psutil/_common.py:774) (2 samples, 0.18%)sensors_temperatures (psutil/_pslinux.py:1350) (3 samples, 0.28%)cat (psutil/_common.py:804) (3 samples, 0.28%)__init__ (glances/plugins/sensors/__init__.py:84) (34 samples, 3.14%)__i..__init__ (glances/plugins/sensors/__init__.py:329) (34 samples, 3.14%)__i..__fetch_data (glances/plugins/sensors/__init__.py:341) (34 samples, 3.14%)__f..sensors_temperatures (psutil/__init__.py:2312) (34 samples, 3.14%)sen..sensors_fans (psutil/_pslinux.py:1435) (3 samples, 0.28%)bcat (psutil/_common.py:812) (3 samples, 0.28%)cat (psutil/_common.py:801) (2 samples, 0.18%)__init__ (glances/plugins/sensors/__init__.py:88) (4 samples, 0.37%)__init__ (glances/plugins/sensors/__init__.py:329) (4 samples, 0.37%)__fetch_data (glances/plugins/sensors/__init__.py:345) (4 samples, 0.37%)sensors_fans (psutil/__init__.py:2343) (4 samples, 0.37%)__get_stat__ (batinfo/battery.py:63) (4 samples, 0.37%)load_plugins (glances/stats.py:141) (112 samples, 10.33%)load_plugins (g.._load_plugin (glances/stats.py:112) (66 samples, 6.09%)_load_pl..__init__ (glances/plugins/sensors/__init__.py:98) (6 samples, 0.55%)__init__ (glances/plugins/sensors/sensor/glances_batpercent.py:49) (6 samples, 0.55%)__init__ (glances/plugins/sensors/sensor/glances_batpercent.py:92) (6 samples, 0.55%)__init__ (batinfo/battery.py:104) (6 samples, 0.55%)update (batinfo/battery.py:124) (6 samples, 0.55%)__init__ (batinfo/battery.py:38) (6 samples, 0.55%)__update__ (batinfo/battery.py:78) (6 samples, 0.55%)__get_stat__ (batinfo/battery.py:64) (2 samples, 0.18%)__init__ (glances/standalone.py:44) (113 samples, 10.42%)__init__ (glanc..__init__ (glances/stats.py:39) (113 samples, 10.42%)__init__ (glanc..load_modules (glances/stats.py:79) (113 samples, 10.42%)load_modules (g..as_dict (psutil/__init__.py:573) (2 samples, 0.18%)__exit__ (contextlib.py:148) (2 samples, 0.18%)cmdline (psutil/__init__.py:749) (2 samples, 0.18%)wrapper (psutil/_pslinux.py:1638) (2 samples, 0.18%)name (psutil/__init__.py:681) (2 samples, 0.18%)wrapper (psutil/_pslinux.py:1638) (2 samples, 0.18%)name (psutil/_pslinux.py:1785) (2 samples, 0.18%)wrapper (psutil/_pslinux.py:1638) (2 samples, 0.18%)wrapper (psutil/_common.py:466) (2 samples, 0.18%)_parse_stat_file (psutil/_pslinux.py:1728) (2 samples, 0.18%)bcat (psutil/_common.py:812) (2 samples, 0.18%)cat (psutil/_common.py:801) (2 samples, 0.18%)username (psutil/__init__.py:767) (3 samples, 0.28%)wrapper (psutil/_common.py:466) (3 samples, 0.28%)uids (psutil/__init__.py:807) (3 samples, 0.28%)wrapper (psutil/_pslinux.py:1638) (3 samples, 0.28%)uids (psutil/_pslinux.py:2304) (3 samples, 0.28%)wrapper (psutil/_pslinux.py:1638) (3 samples, 0.28%)wrapper (psutil/_common.py:466) (3 samples, 0.28%)_read_status_file (psutil/_pslinux.py:1763) (3 samples, 0.28%)username (psutil/__init__.py:769) (2 samples, 0.18%)update (glances/plugins/processcount/__init__.py:85) (15 samples, 1.38%)update (glances/processes.py:581) (15 samples, 1.38%)build_process_list (glances/processes.py:448) (15 samples, 1.38%)process_iter (psutil/__init__.py:1544) (14 samples, 1.29%)as_dict (psutil/__init__.py:580) (12 samples, 1.11%)wrapper (glances/plugins/plugin/model.py:1146) (21 samples, 1.94%)w..start (glances/__init__.py:149) (135 samples, 12.45%)start (glances/__in..__init__ (glances/standalone.py:79) (22 samples, 2.03%)_..update (glances/stats.py:287) (22 samples, 2.03%)u..inner (glances/globals.py:564) (22 samples, 2.03%)i.._func (glances/globals.py:560) (22 samples, 2.03%)_..update_plugin (glances/stats.py:274) (22 samples, 2.03%)u..wrapper (glances/plugins/plugin/model.py:1129) (22 samples, 2.03%)w..update (glances/plugins/processlist/__init__.py:245) (2 samples, 0.18%)update (glances/plugins/programlist/__init__.py:151) (3 samples, 0.28%)get_list (glances/processes.py:666) (3 samples, 0.28%)processes_to_programs (glances/programs.py:71) (2 samples, 0.18%)update_program_dict (glances/programs.py:46) (2 samples, 0.18%)update (glances/plugins/containers/__init__.py:250) (4 samples, 0.37%)<genexpr> (glances/plugins/containers/__init__.py:253) (4 samples, 0.37%)get_containers_from_updated_watcher (glances/plugins/containers/__init__.py:245) (4 samples, 0.37%)update (glances/plugins/containers/engines/docker.py:260) (3 samples, 0.28%)list (docker/models/containers.py:1009) (3 samples, 0.28%)containers (docker/api/container.py:212) (3 samples, 0.28%)inner (docker/utils/decorators.py:44) (3 samples, 0.28%)_get (docker/api/client.py:246) (3 samples, 0.28%)get (requests/sessions.py:602) (3 samples, 0.28%)request (requests/sessions.py:589) (2 samples, 0.18%)send (requests/sessions.py:703) (2 samples, 0.18%)send (requests/adapters.py:644) (2 samples, 0.18%)urlopen (urllib3/connectionpool.py:787) (2 samples, 0.18%)_make_request (urllib3/connectionpool.py:534) (2 samples, 0.18%)getresponse (urllib3/connection.py:565) (2 samples, 0.18%)getresponse (http/client.py:1430) (2 samples, 0.18%)update (glances/plugins/diskio/__init__.py:114) (2 samples, 0.18%)wrapper (glances/plugins/plugin/model.py:1199) (2 samples, 0.18%)update_local (glances/plugins/diskio/__init__.py:148) (2 samples, 0.18%)wraps (glances/globals.py:608) (2 samples, 0.18%)Queue (multiprocessing/context.py:103) (2 samples, 0.18%)__init__ (multiprocessing/queues.py:41) (2 samples, 0.18%)Lock (multiprocessing/context.py:68) (2 samples, 0.18%)__init__ (multiprocessing/synchronize.py:169) (2 samples, 0.18%)update (glances/plugins/fs/__init__.py:131) (9 samples, 0.83%)update_local (glances/plugins/fs/__init__.py:182) (8 samples, 0.74%)wraps (glances/globals.py:610) (6 samples, 0.55%)start (multiprocessing/process.py:121) (6 samples, 0.55%)_Popen (multiprocessing/context.py:282) (6 samples, 0.55%)__init__ (__init__) (6 samples, 0.55%)__init__ (multiprocessing/popen_fork.py:20) (6 samples, 0.55%)_launch (multiprocessing/popen_fork.py:67) (6 samples, 0.55%)run (subprocess.py:554) (2 samples, 0.18%)__init__ (subprocess.py:1047) (2 samples, 0.18%)gateways (netifaces/__init__.py:219) (3 samples, 0.28%)_ip_tool_path (netifaces/__init__.py:202) (3 samples, 0.28%)update (glances/plugins/ip/__init__.py:154) (4 samples, 0.37%)get_stats_for_local_input (glances/plugins/ip/__init__.py:167) (4 samples, 0.37%)get_first_ip (glances/plugins/ip/__init__.py:108) (4 samples, 0.37%)get_default_gateway (glances/plugins/ip/__init__.py:101) (4 samples, 0.37%)default_gateway (netifaces/__init__.py:244) (4 samples, 0.37%)update (glances/plugins/mem/__init__.py:259) (3 samples, 0.28%)_update_for_local (glances/plugins/mem/__init__.py:141) (3 samples, 0.28%)virtual_memory (psutil/__init__.py:2034) (3 samples, 0.28%)process_iter (psutil/__init__.py:1527) (2 samples, 0.18%)pids (psutil/__init__.py:1471) (2 samples, 0.18%)pids (psutil/_pslinux.py:1571) (2 samples, 0.18%)oneshot (psutil/__init__.py:506) (2 samples, 0.18%)oneshot (psutil/__init__.py:531) (3 samples, 0.28%)__enter__ (contextlib.py:141) (8 samples, 0.74%)oneshot (psutil/__init__.py:540) (3 samples, 0.28%)cache_deactivate (psutil/_common.py:486) (2 samples, 0.18%)oneshot_exit (psutil/_pslinux.py:1778) (2 samples, 0.18%)cache_deactivate (psutil/_common.py:486) (2 samples, 0.18%)as_dict (psutil/__init__.py:573) (22 samples, 2.03%)a..__exit__ (contextlib.py:148) (13 samples, 1.20%)oneshot (psutil/__init__.py:544) (4 samples, 0.37%)oneshot_exit (psutil/_pslinux.py:1780) (2 samples, 0.18%)as_dict (psutil/__init__.py:579) (4 samples, 0.37%)cpu_percent (psutil/__init__.py:1065) (10 samples, 0.92%)cpu_count (psutil/__init__.py:1667) (10 samples, 0.92%)cpu_count_logical (psutil/_pslinux.py:579) (10 samples, 0.92%)cpu_times (psutil/_pslinux.py:1879) (3 samples, 0.28%)cpu_percent (psutil/__init__.py:1080) (10 samples, 0.92%)wrapper (psutil/_pslinux.py:1638) (9 samples, 0.83%)cpu_times (psutil/_pslinux.py:1880) (2 samples, 0.18%)<lambda> (<string>:1) (2 samples, 0.18%)gids (psutil/__init__.py:813) (3 samples, 0.28%)wrapper (psutil/_pslinux.py:1638) (3 samples, 0.28%)io_counters (psutil/_pslinux.py:1841) (8 samples, 0.74%)open_binary (psutil/_common.py:764) (7 samples, 0.65%)io_counters (psutil/_pslinux.py:1842) (5 samples, 0.46%)wrapper (psutil/_pslinux.py:1638) (16 samples, 1.48%)io_counters (psutil/__init__.py:837) (18 samples, 1.66%)cat (psutil/_common.py:800) (12 samples, 1.11%)open_binary (psutil/_common.py:764) (10 samples, 0.92%)_parse_stat_file (psutil/_pslinux.py:1728) (22 samples, 2.03%)_..bcat (psutil/_common.py:812) (21 samples, 1.94%)b..cat (psutil/_common.py:801) (9 samples, 0.83%)_parse_stat_file (psutil/_pslinux.py:1734) (3 samples, 0.28%)_parse_stat_file (psutil/_pslinux.py:1741) (2 samples, 0.18%)name (psutil/__init__.py:681) (34 samples, 3.14%)nam..wrapper (psutil/_pslinux.py:1638) (33 samples, 3.04%)wra..name (psutil/_pslinux.py:1785) (33 samples, 3.04%)nam..wrapper (psutil/_pslinux.py:1638) (32 samples, 2.95%)wra..wrapper (psutil/_common.py:466) (31 samples, 2.86%)wr..cmdline (psutil/_pslinux.py:1795) (7 samples, 0.65%)open_text (psutil/_common.py:774) (3 samples, 0.28%)cmdline (psutil/_pslinux.py:1796) (3 samples, 0.28%)cat (psutil/_common.py:800) (2 samples, 0.18%)name (psutil/__init__.py:688) (16 samples, 1.48%)cmdline (psutil/__init__.py:749) (16 samples, 1.48%)wrapper (psutil/_pslinux.py:1638) (16 samples, 1.48%)cmdline (psutil/_pslinux.py:1799) (6 samples, 0.55%)_raise_if_zombie (psutil/_pslinux.py:1692) (6 samples, 0.55%)_is_zombie (psutil/_pslinux.py:1683) (6 samples, 0.55%)bcat (psutil/_common.py:812) (6 samples, 0.55%)cat (psutil/_common.py:801) (4 samples, 0.37%)_read_status_file (psutil/_pslinux.py:1763) (12 samples, 1.11%)open_binary (psutil/_common.py:764) (7 samples, 0.65%)num_threads (psutil/_pslinux.py:2095) (26 samples, 2.40%)nu..wrapper (psutil/_pslinux.py:1638) (26 samples, 2.40%)wr..wrapper (psutil/_common.py:466) (25 samples, 2.31%)w.._read_status_file (psutil/_pslinux.py:1764) (13 samples, 1.20%)num_threads (psutil/__init__.py:940) (29 samples, 2.68%)nu..wrapper (psutil/_pslinux.py:1638) (29 samples, 2.68%)wr..num_threads (psutil/_pslinux.py:2096) (3 samples, 0.28%)status (psutil/__init__.py:754) (2 samples, 0.18%)wrapper (psutil/_pslinux.py:1638) (2 samples, 0.18%)memory_info (psutil/_pslinux.py:1921) (12 samples, 1.11%)open_binary (psutil/_common.py:764) (6 samples, 0.55%)memory_info (psutil/_pslinux.py:1922) (2 samples, 0.18%)<genexpr> (psutil/_pslinux.py:1923) (2 samples, 0.18%)memory_info (psutil/_pslinux.py:1923) (4 samples, 0.37%)wrapper (psutil/_common.py:466) (21 samples, 1.94%)w..memory_info (psutil/__init__.py:1139) (20 samples, 1.85%)m..wrapper (psutil/_pslinux.py:1638) (20 samples, 1.85%)w..memory_info (psutil/_pslinux.py:1925) (2 samples, 0.18%)as_dict (psutil/__init__.py:580) (153 samples, 14.11%)as_dict (psutil/__ini..build_process_list (glances/processes.py:448) (189 samples, 17.44%)build_process_list (glances..process_iter (psutil/__init__.py:1544) (187 samples, 17.25%)process_iter (psutil/__init..as_dict (psutil/__init__.py:582) (3 samples, 0.28%)_init (psutil/__init__.py:337) (2 samples, 0.18%)cat (psutil/_common.py:800) (7 samples, 0.65%)open_binary (psutil/_common.py:764) (6 samples, 0.55%)_parse_stat_file (psutil/_pslinux.py:1728) (12 samples, 1.11%)bcat (psutil/_common.py:812) (12 samples, 1.11%)cat (psutil/_common.py:801) (5 samples, 0.46%)__init__ (__init__) (20 samples, 1.85%)_..__init__ (psutil/__init__.py:315) (20 samples, 1.85%)_.._init (psutil/__init__.py:348) (18 samples, 1.66%)_get_ident (psutil/__init__.py:395) (18 samples, 1.66%)wrapper (psutil/_pslinux.py:1638) (18 samples, 1.66%)create_time (psutil/_pslinux.py:1900) (17 samples, 1.57%)wrapper (psutil/_pslinux.py:1638) (17 samples, 1.57%)wrapper (psutil/_common.py:459) (17 samples, 1.57%)update (glances/processes.py:581) (211 samples, 19.46%)update (glances/processes.py:5..build_process_list (glances/processes.py:460) (22 samples, 2.03%)b..is_running (psutil/__init__.py:640) (22 samples, 2.03%)i..update (glances/processes.py:584) (2 samples, 0.18%)update (glances/processes.py:613) (4 samples, 0.37%)remove_non_running_procs (glances/processes.py:640) (4 samples, 0.37%)update (glances/plugins/processcount/__init__.py:85) (231 samples, 21.31%)update (glances/plugins/processcou..update (glances/processes.py:619) (11 samples, 1.01%)update_list (glances/processes.py:646) (11 samples, 1.01%)list_of_namedtuple_to_list_of_dict (glances/globals.py:578) (11 samples, 1.01%)namedtuple_to_dict (glances/globals.py:573) (11 samples, 1.01%)_asdict (collections/__init__.py:475) (9 samples, 0.83%)update (glances/plugins/quicklook/__init__.py:134) (2 samples, 0.18%)update (glances/plugins/sensors/__init__.py:157) (22 samples, 2.03%)u..__exit__ (concurrent/futures/_base.py:647) (21 samples, 1.94%)_..shutdown (concurrent/futures/thread.py:239) (21 samples, 1.94%)s..join (threading.py:1094) (21 samples, 1.94%)j..wrapper (glances/plugins/plugin/model.py:1146) (283 samples, 26.11%)wrapper (glances/plugins/plugin/model.py:1..wrapper (glances/plugins/plugin/model.py:1147) (2 samples, 0.18%)get (glances/timer.py:69) (2 samples, 0.18%)wrapper (glances/plugins/plugin/model.py:1129) (290 samples, 26.75%)wrapper (glances/plugins/plugin/model.py:11..wrapper (glances/plugins/plugin/model.py:1150) (4 samples, 0.37%)wrapper (glances/plugins/plugin/model.py:1146) (3 samples, 0.28%)update (glances/plugins/core/__init__.py:62) (2 samples, 0.18%)cpu_count (psutil/__init__.py:1669) (2 samples, 0.18%)cpu_count_cores (psutil/_pslinux.py:616) (2 samples, 0.18%)glob (glob.py:31) (2 samples, 0.18%)_iglob (glob.py:99) (2 samples, 0.18%)_iglob (glob.py:100) (2 samples, 0.18%)_glob0 (glob.py:116) (2 samples, 0.18%)_lexists (glob.py:205) (2 samples, 0.18%)lexists (<frozen genericpath>:29) (2 samples, 0.18%)update_plugin (glances/stats.py:274) (299 samples, 27.58%)update_plugin (glances/stats.py:274)update_views (glances/plugins/diskio/__init__.py:200) (2 samples, 0.18%)update_views (glances/plugins/plugin/model.py:550) (2 samples, 0.18%)_build_view_for_field (glances/plugins/plugin/model.py:509) (6 samples, 0.55%)_build_field_decoration (glances/plugins/plugin/model.py:489) (3 samples, 0.28%)_build_field_decoration (glances/plugins/plugin/model.py:491) (3 samples, 0.28%)_build_view_for_field (glances/plugins/plugin/model.py:510) (10 samples, 0.92%)_build_view_for_field (glances/plugins/plugin/model.py:511) (4 samples, 0.37%)_build_field_optional (glances/plugins/plugin/model.py:505) (4 samples, 0.37%)update_views (glances/plugins/plugin/model.py:551) (44 samples, 4.06%)upda.._build_view_for_field (glances/plugins/plugin/model.py:521) (3 samples, 0.28%)update_views (glances/plugins/plugin/model.py:550) (2 samples, 0.18%)update_views (glances/plugins/plugin/model.py:551) (4 samples, 0.37%)update_views (glances/plugins/sensors/__init__.py:219) (7 samples, 0.65%)get_alert (glances/plugins/plugin/model.py:728) (2 samples, 0.18%)get_limit (glances/plugins/plugin/model.py:824) (2 samples, 0.18%)update_views (glances/plugins/sensors/__init__.py:241) (3 samples, 0.28%)update_plugin (glances/stats.py:275) (64 samples, 5.90%)update_p..update_views (glances/plugins/sensors/__init__.py:243) (2 samples, 0.18%)_func (glances/globals.py:560) (365 samples, 33.67%)_func (glances/globals.py:560)update_plugin (glances/stats.py:276) (2 samples, 0.18%)__serve_once (glances/standalone.py:144) (367 samples, 33.86%)__serve_once (glances/standalone.py:144)update (glances/stats.py:287) (366 samples, 33.76%)update (glances/stats.py:287)inner (glances/globals.py:564) (366 samples, 33.76%)inner (glances/globals.py:564)msg_curse (glances/plugins/processlist/__init__.py:537) (4 samples, 0.37%)_sort_stats (glances/plugins/processlist/__init__.py:949) (4 samples, 0.37%)sort_stats (glances/processes.py:778) (4 samples, 0.37%)<lambda> (glances/processes.py:728) (2 samples, 0.18%)get_process_curses_data (glances/plugins/processlist/__init__.py:496) (2 samples, 0.18%)curse_new_line (glances/plugins/plugin/model.py:991) (2 samples, 0.18%)curse_add_line (glances/plugins/plugin/model.py:981) (2 samples, 0.18%)get_process_curses_data (glances/plugins/processlist/__init__.py:507) (4 samples, 0.37%)_get_process_curses_cmdline (glances/plugins/processlist/__init__.py:467) (2 samples, 0.18%)_get_process_curses_cmdline (glances/plugins/processlist/__init__.py:469) (2 samples, 0.18%)_get_process_curses_cmdline (glances/plugins/processlist/__init__.py:470) (2 samples, 0.18%)isdir (<frozen genericpath>:51) (2 samples, 0.18%)_get_process_curses_cpu_percent (glances/plugins/processlist/__init__.py:286) (3 samples, 0.28%)_get_process_curses_cpu_percent (glances/plugins/processlist/__init__.py:295) (2 samples, 0.18%)_get_process_curses_cpu_times (glances/plugins/processlist/__init__.py:380) (2 samples, 0.18%)_get_process_curses_cpu_times (glances/plugins/processlist/__init__.py:392) (5 samples, 0.46%)curse_add_line (glances/plugins/plugin/model.py:981) (5 samples, 0.46%)_get_process_curses_io_counters (glances/plugins/processlist/__init__.py:454) (3 samples, 0.28%)_get_process_curses_io_read_write (glances/plugins/processlist/__init__.py:435) (3 samples, 0.28%)_get_process_curses_io_counters (glances/plugins/processlist/__init__.py:455) (4 samples, 0.37%)_get_process_curses_io_read_write (glances/plugins/processlist/__init__.py:449) (2 samples, 0.18%)curse_add_line (glances/plugins/plugin/model.py:981) (2 samples, 0.18%)_get_process_curses_vms (glances/plugins/processlist/__init__.py:322) (3 samples, 0.28%)key_exist_value_not_none_not_v (glances/globals.py:239) (3 samples, 0.28%)auto_unit (glances/globals.py:435) (2 samples, 0.18%)auto_unit (glances/globals.py:453) (2 samples, 0.18%)_get_process_curses_vms (glances/plugins/processlist/__init__.py:323) (12 samples, 1.11%)auto_unit (glances/plugins/plugin/model.py:1102) (11 samples, 1.01%)auto_unit (glances/globals.py:467) (4 samples, 0.37%)_get_process_curses_memory_info (glances/plugins/processlist/__init__.py:343) (18 samples, 1.66%)_get_process_curses_vms (glances/plugins/processlist/__init__.py:324) (3 samples, 0.28%)curse_add_line (glances/plugins/plugin/model.py:981) (2 samples, 0.18%)auto_unit (glances/globals.py:434) (2 samples, 0.18%)_get_process_curses_memory_info (glances/plugins/processlist/__init__.py:344) (10 samples, 0.92%)_get_process_curses_rss (glances/plugins/processlist/__init__.py:333) (9 samples, 0.83%)auto_unit (glances/plugins/plugin/model.py:1102) (7 samples, 0.65%)auto_unit (glances/globals.py:453) (4 samples, 0.37%)_get_process_curses_memory_percent (glances/plugins/processlist/__init__.py:307) (3 samples, 0.28%)get_alert (glances/plugins/plugin/model.py:728) (2 samples, 0.18%)get_limit_action (glances/plugins/plugin/model.py:841) (2 samples, 0.18%)_get_process_curses_memory_percent (glances/plugins/processlist/__init__.py:308) (7 samples, 0.65%)get_alert (glances/plugins/plugin/model.py:757) (4 samples, 0.37%)manage_action (glances/plugins/plugin/model.py:779) (3 samples, 0.28%)_get_process_curses_nice (glances/plugins/processlist/__init__.py:412) (10 samples, 0.92%)get_nice_alert (glances/plugins/processlist/__init__.py:261) (8 samples, 0.74%)_get_process_curses_num_threads (glances/plugins/processlist/__init__.py:403) (2 samples, 0.18%)_get_process_curses_pid (glances/plugins/processlist/__init__.py:350) (2 samples, 0.18%)get_status_alert (glances/plugins/processlist/__init__.py:273) (3 samples, 0.28%)get_limit (glances/plugins/plugin/model.py:824) (2 samples, 0.18%)get_status_alert (glances/plugins/processlist/__init__.py:275) (4 samples, 0.37%)get_limit (glances/plugins/plugin/model.py:826) (2 samples, 0.18%)get_limit (glances/plugins/plugin/model.py:824) (2 samples, 0.18%)_get_process_curses_status (glances/plugins/processlist/__init__.py:423) (12 samples, 1.11%)get_status_alert (glances/plugins/processlist/__init__.py:279) (3 samples, 0.28%)_get_process_curses_username (glances/plugins/processlist/__init__.py:358) (2 samples, 0.18%)get_process_curses_data (glances/plugins/processlist/__init__.py:508) (114 samples, 10.52%)get_process_cur.._get_process_curses_username (glances/plugins/processlist/__init__.py:361) (2 samples, 0.18%)curse_add_line (glances/plugins/plugin/model.py:981) (2 samples, 0.18%)get_process_curses_data (glances/plugins/processlist/__init__.py:509) (3 samples, 0.28%)display (glances/outputs/glances_curses.py:559) (135 samples, 12.45%)display (glances/ou..__get_stat_display (glances/outputs/glances_curses.py:535) (135 samples, 12.45%)__get_stat_display ..get_stats_display (glances/plugins/plugin/model.py:952) (134 samples, 12.36%)get_stats_display ..msg_curse (glances/plugins/processlist/__init__.py:556) (128 samples, 11.81%)msg_curse (glances..get_process_curses_data (glances/plugins/processlist/__init__.py:514) (2 samples, 0.18%)__display_left (glances/outputs/glances_curses.py:809) (2 samples, 0.18%)display_plugin (glances/outputs/glances_curses.py:1084) (2 samples, 0.18%)display (glances/outputs/glances_curses.py:588) (3 samples, 0.28%)flush (glances/outputs/glances_curses.py:1125) (150 samples, 13.84%)flush (glances/output..display (glances/outputs/glances_curses.py:593) (6 samples, 0.55%)__display_right (glances/outputs/glances_curses.py:835) (6 samples, 0.55%)display_plugin (glances/outputs/glances_curses.py:1084) (6 samples, 0.55%)display_stats (glances/outputs/glances_curses.py:1044) (4 samples, 0.37%)display_stats_with_current_size (glances/outputs/glances_curses.py:1014) (4 samples, 0.37%)update (glances/outputs/glances_curses.py:1144) (156 samples, 14.39%)update (glances/output..flush (glances/outputs/glances_curses.py:1126) (6 samples, 0.55%)refresh (glances/outputs/glances_curses.py:1112) (6 samples, 0.55%)update (glances/outputs/glances_curses.py:1159) (10 samples, 0.92%)__catch_key (glances/outputs/glances_curses.py:282) (10 samples, 0.92%)get_key (glances/outputs/glances_curses.py:255) (10 samples, 0.92%)<module> (run-venv.py:9) (689 samples, 63.56%)<module> (run-venv.py:9)main (glances/__init__.py:190) (689 samples, 63.56%)main (glances/__init__.py:190)start (glances/__init__.py:153) (543 samples, 50.09%)start (glances/__init__.py:153)setup_server_mode (glances/__init__.py:103) (543 samples, 50.09%)setup_server_mode (glances/__init__.py:103)serve_forever (glances/standalone.py:184) (543 samples, 50.09%)serve_forever (glances/standalone.py:184)serve_n (glances/standalone.py:177) (543 samples, 50.09%)serve_n (glances/standalone.py:177)__serve_once (glances/standalone.py:158) (176 samples, 16.24%)__serve_once (glances/sta..update (glances/outputs/glances_curses.py:1162) (10 samples, 0.92%)wait (glances/outputs/glances_curses.py:1192) (10 samples, 0.92%)run (glances/plugins/ports/__init__.py:276) (2 samples, 0.18%)_iglob (glob.py:100) (4 samples, 0.37%)_glob1 (glob.py:109) (4 samples, 0.37%)_listdir (glob.py:188) (4 samples, 0.37%)_iterdir (glob.py:171) (3 samples, 0.28%)sensors_temperatures (psutil/_pslinux.py:1311) (7 samples, 0.65%)glob (glob.py:31) (7 samples, 0.65%)_iglob (glob.py:99) (3 samples, 0.28%)_iglob (glob.py:100) (3 samples, 0.28%)_glob1 (glob.py:109) (3 samples, 0.28%)_listdir (glob.py:188) (3 samples, 0.28%)_iterdir (glob.py:173) (2 samples, 0.18%)cat (psutil/_common.py:800) (18 samples, 1.66%)open_binary (psutil/_common.py:764) (16 samples, 1.48%)sensors_temperatures (psutil/_pslinux.py:1334) (125 samples, 11.53%)sensors_temperatu..bcat (psutil/_common.py:812) (122 samples, 11.25%)bcat (psutil/_com..cat (psutil/_common.py:801) (104 samples, 9.59%)cat (psutil/_c..sensors_temperatures (psutil/_pslinux.py:1335) (4 samples, 0.37%)cat (psutil/_common.py:800) (22 samples, 2.03%)c..open_text (psutil/_common.py:774) (18 samples, 1.66%)sensors_temperatures (psutil/_pslinux.py:1336) (38 samples, 3.51%)sen..cat (psutil/_common.py:801) (16 samples, 1.48%)cat (psutil/_common.py:804) (18 samples, 1.66%)open_binary (psutil/_common.py:764) (15 samples, 1.38%)sensors_temperatures (psutil/_pslinux.py:1348) (30 samples, 2.77%)se..bcat (psutil/_common.py:812) (30 samples, 2.77%)bc..cat (psutil/_common.py:805) (12 samples, 1.11%)cat (psutil/_common.py:804) (14 samples, 1.29%)open_binary (psutil/_common.py:764) (14 samples, 1.29%)sensors_temperatures (psutil/_pslinux.py:1349) (17 samples, 1.57%)bcat (psutil/_common.py:812) (17 samples, 1.57%)cat (psutil/_common.py:804) (25 samples, 2.31%)c..open_text (psutil/_common.py:774) (15 samples, 1.38%)sensors_temperatures (psutil/_pslinux.py:1350) (37 samples, 3.41%)sen..cat (psutil/_common.py:805) (10 samples, 0.92%)decode (<frozen codecs>:325) (2 samples, 0.18%)sensors_temperatures (psutil/__init__.py:2312) (262 samples, 24.17%)sensors_temperatures (psutil/__init__...__fetch_data (glances/plugins/sensors/__init__.py:341) (264 samples, 24.35%)__fetch_data (glances/plugins/sensors/_.._iterdir (glob.py:170) (2 samples, 0.18%)_glob1 (glob.py:109) (3 samples, 0.28%)_listdir (glob.py:188) (3 samples, 0.28%)_iglob (glob.py:100) (4 samples, 0.37%)sensors_fans (psutil/_pslinux.py:1426) (5 samples, 0.46%)glob (glob.py:31) (5 samples, 0.46%)cat (psutil/_common.py:800) (3 samples, 0.28%)open_binary (psutil/_common.py:764) (2 samples, 0.18%)sensors_fans (psutil/_pslinux.py:1435) (10 samples, 0.92%)bcat (psutil/_common.py:812) (10 samples, 0.92%)cat (psutil/_common.py:801) (7 samples, 0.65%)cat (psutil/_common.py:800) (2 samples, 0.18%)sensors_fans (psutil/_pslinux.py:1439) (9 samples, 0.83%)cat (psutil/_common.py:801) (7 samples, 0.65%)cat (psutil/_common.py:804) (4 samples, 0.37%)open_text (psutil/_common.py:774) (3 samples, 0.28%)update (glances/plugins/sensors/__init__.py:356) (293 samples, 27.03%)update (glances/plugins/sensors/__init__.py..__fetch_data (glances/plugins/sensors/__init__.py:345) (29 samples, 2.68%)__..sensors_fans (psutil/__init__.py:2343) (29 samples, 2.68%)se..sensors_fans (psutil/_pslinux.py:1440) (5 samples, 0.46%)__get_stat__ (batinfo/battery.py:63) (40 samples, 3.69%)__ge..__get_sensor_data (glances/plugins/sensors/__init__.py:125) (378 samples, 34.87%)__get_sensor_data (glances/plugins/sensors/__init__.py:12..wrapper (glances/plugins/plugin/model.py:1146) (83 samples, 7.66%)wrapper (g..update (glances/plugins/sensors/sensor/glances_batpercent.py:70) (83 samples, 7.66%)update (gl..update (glances/plugins/sensors/sensor/glances_batpercent.py:104) (83 samples, 7.66%)update (gl..update (batinfo/battery.py:124) (81 samples, 7.47%)update (ba..__init__ (__init__) (81 samples, 7.47%)__init__ (..__init__ (batinfo/battery.py:38) (81 samples, 7.47%)__init__ (..__update__ (batinfo/battery.py:78) (78 samples, 7.20%)__update__..__get_stat__ (batinfo/battery.py:64) (38 samples, 3.51%)__g..is_display (glances/plugins/plugin/model.py:910) (2 samples, 0.18%)__transform_sensors (glances/plugins/sensors/__init__.py:138) (4 samples, 0.37%)is_display (glances/plugins/plugin/model.py:912) (2 samples, 0.18%)is_hide (glances/plugins/plugin/model.py:906) (2 samples, 0.18%)__transform_sensors (glances/plugins/sensors/__init__.py:145) (3 samples, 0.28%)run (concurrent/futures/thread.py:59) (389 samples, 35.89%)run (concurrent/futures/thread.py:59)__get_sensor_data (glances/plugins/sensors/__init__.py:131) (10 samples, 0.92%)__transform_sensors (glances/plugins/sensors/__init__.py:147) (3 samples, 0.28%)<lambda> (glances/plugins/sensors/__init__.py:147) (2 samples, 0.18%)natural_keys (glances/globals.py:593) (2 samples, 0.18%)all (1,084 samples, 100%)process 651977:"uv run python run-venv.py -C conf/glances.conf --stop-after 30" (1,084 samples, 100.00%)process 651977:"uv run python run-venv.py -C conf/glances.conf --stop-after 30"process 651981:"/home/nicolargo/dev/glances/.venv/bin/python3 run-venv.py -C conf/glances.conf --stop-after 30" (1,084 samples, 100.00%)process 651981:"/home/nicolargo/dev/glances/.venv/bin/python3 run-venv.py -C conf/glances.conf --stop-after 30"_bootstrap (threading.py:1014) (393 samples, 36.25%)_bootstrap (threading.py:1014)_bootstrap_inner (threading.py:1043) (393 samples, 36.25%)_bootstrap_inner (threading.py:1043)run (threading.py:994) (391 samples, 36.07%)run (threading.py:994)_worker (concurrent/futures/thread.py:93) (391 samples, 36.07%)_worker (concurrent/futures/thread.py:93)run (concurrent/futures/thread.py:65) (2 samples, 0.18%) \ No newline at end of file diff --git a/docs/_static/glances-influxdb.png b/docs/_static/glances-influxdb.png new file mode 100644 index 0000000000..89a123761f Binary files /dev/null and b/docs/_static/glances-influxdb.png differ diff --git a/docs/_static/glances-memory-profiling-with-history.png b/docs/_static/glances-memory-profiling-with-history.png new file mode 100644 index 0000000000..b0843751da Binary files /dev/null and b/docs/_static/glances-memory-profiling-with-history.png differ diff --git a/docs/_static/glances-memory-profiling-without-history.png b/docs/_static/glances-memory-profiling-without-history.png new file mode 100644 index 0000000000..76df399521 Binary files /dev/null and b/docs/_static/glances-memory-profiling-without-history.png differ diff --git a/docs/_static/glances-pyinstrument.html b/docs/_static/glances-pyinstrument.html new file mode 100644 index 0000000000..7c14c3f6e2 --- /dev/null +++ b/docs/_static/glances-pyinstrument.html @@ -0,0 +1,33 @@ + + + + + + +
+ + + + + + + + \ No newline at end of file diff --git a/docs/_static/glances-responsive-webdesign.png b/docs/_static/glances-responsive-webdesign.png new file mode 100644 index 0000000000..60684cd5c3 Binary files /dev/null and b/docs/_static/glances-responsive-webdesign.png differ diff --git a/docs/_static/glances-summary.png b/docs/_static/glances-summary.png new file mode 100644 index 0000000000..d0186c3763 Binary files /dev/null and b/docs/_static/glances-summary.png differ diff --git a/docs/_static/gpu.png b/docs/_static/gpu.png new file mode 100644 index 0000000000..928a8baacb Binary files /dev/null and b/docs/_static/gpu.png differ diff --git a/docs/_static/grafana.png b/docs/_static/grafana.png new file mode 100644 index 0000000000..46ebf45f57 Binary files /dev/null and b/docs/_static/grafana.png differ diff --git a/docs/_static/graph-load.svg b/docs/_static/graph-load.svg new file mode 100644 index 0000000000..d351dadd4e --- /dev/null +++ b/docs/_static/graph-load.svg @@ -0,0 +1,4 @@ + +Load0.20.20.40.40.60.60.80.8111.21.21.41.41.61.62018/04/02 11:03:202018/04/02 11:03:202018/04/02 11:20:002018/04/02 11:20:002018/04/02 11:36:402018/04/02 11:36:402018/04/02 11:53:202018/04/02 11:53:202018/04/02 12:10:002018/04/02 12:10:002018/04/02 12:26:402018/04/02 12:26:402018/04/02 12:43:202018/04/02 12:43:202018/04/02 13:00:002018/04/02 13:00:00Loadmin1min5min15 \ No newline at end of file diff --git a/docs/_static/hddtemp.png b/docs/_static/hddtemp.png new file mode 100644 index 0000000000..4f4e26ff44 Binary files /dev/null and b/docs/_static/hddtemp.png differ diff --git a/docs/_static/header.png b/docs/_static/header.png new file mode 100644 index 0000000000..2c140d461f Binary files /dev/null and b/docs/_static/header.png differ diff --git a/docs/_static/ip.png b/docs/_static/ip.png new file mode 100644 index 0000000000..cdf71ffb4a Binary files /dev/null and b/docs/_static/ip.png differ diff --git a/docs/_static/irq.png b/docs/_static/irq.png new file mode 100644 index 0000000000..397a4e18a3 Binary files /dev/null and b/docs/_static/irq.png differ diff --git a/docs/_static/load.png b/docs/_static/load.png new file mode 100644 index 0000000000..bd80e6af34 Binary files /dev/null and b/docs/_static/load.png differ diff --git a/docs/_static/loadpercent.png b/docs/_static/loadpercent.png new file mode 100644 index 0000000000..f0de58cf86 Binary files /dev/null and b/docs/_static/loadpercent.png differ diff --git a/docs/_static/mem-wide.png b/docs/_static/mem-wide.png new file mode 100644 index 0000000000..60a6bece2d Binary files /dev/null and b/docs/_static/mem-wide.png differ diff --git a/docs/_static/mem.png b/docs/_static/mem.png new file mode 100644 index 0000000000..df79d0da2a Binary files /dev/null and b/docs/_static/mem.png differ diff --git a/docs/_build/html/_images/monitored.png b/docs/_static/monitored.png similarity index 100% rename from docs/_build/html/_images/monitored.png rename to docs/_static/monitored.png diff --git a/docs/_static/network.png b/docs/_static/network.png new file mode 100644 index 0000000000..bb251be68b Binary files /dev/null and b/docs/_static/network.png differ diff --git a/docs/_static/npu.png b/docs/_static/npu.png new file mode 100644 index 0000000000..8139712a26 Binary files /dev/null and b/docs/_static/npu.png differ diff --git a/docs/_static/per-cpu.png b/docs/_static/per-cpu.png new file mode 100644 index 0000000000..fbf48aabbe Binary files /dev/null and b/docs/_static/per-cpu.png differ diff --git a/docs/_static/pergpu.png b/docs/_static/pergpu.png new file mode 100644 index 0000000000..08e01fbc79 Binary files /dev/null and b/docs/_static/pergpu.png differ diff --git a/docs/_static/ports.png b/docs/_static/ports.png new file mode 100644 index 0000000000..f65c8453af Binary files /dev/null and b/docs/_static/ports.png differ diff --git a/docs/_static/processlist-extended.png b/docs/_static/processlist-extended.png new file mode 100644 index 0000000000..a45f7c0ada Binary files /dev/null and b/docs/_static/processlist-extended.png differ diff --git a/docs/_static/processlist-filter.png b/docs/_static/processlist-filter.png new file mode 100644 index 0000000000..b8d3e31273 Binary files /dev/null and b/docs/_static/processlist-filter.png differ diff --git a/docs/_static/processlist-top.png b/docs/_static/processlist-top.png new file mode 100644 index 0000000000..dd410c6dd4 Binary files /dev/null and b/docs/_static/processlist-top.png differ diff --git a/docs/_static/processlist-wide.png b/docs/_static/processlist-wide.png new file mode 100644 index 0000000000..f8b80d1c90 Binary files /dev/null and b/docs/_static/processlist-wide.png differ diff --git a/docs/_static/processlist.png b/docs/_static/processlist.png new file mode 100644 index 0000000000..c2d1e83d11 Binary files /dev/null and b/docs/_static/processlist.png differ diff --git a/docs/_static/prometheus_exporter.png b/docs/_static/prometheus_exporter.png new file mode 100644 index 0000000000..0e655aae8e Binary files /dev/null and b/docs/_static/prometheus_exporter.png differ diff --git a/docs/_static/prometheus_server.png b/docs/_static/prometheus_server.png new file mode 100644 index 0000000000..32ede88f54 Binary files /dev/null and b/docs/_static/prometheus_server.png differ diff --git a/docs/_static/quicklook-percpu.png b/docs/_static/quicklook-percpu.png new file mode 100644 index 0000000000..4956fe7f04 Binary files /dev/null and b/docs/_static/quicklook-percpu.png differ diff --git a/docs/_static/quicklook.png b/docs/_static/quicklook.png new file mode 100644 index 0000000000..bdee804b39 Binary files /dev/null and b/docs/_static/quicklook.png differ diff --git a/docs/_static/raid.png b/docs/_static/raid.png new file mode 100644 index 0000000000..fc9bd12b32 Binary files /dev/null and b/docs/_static/raid.png differ diff --git a/docs/_static/reddit.png b/docs/_static/reddit.png new file mode 100644 index 0000000000..bc90a7480c Binary files /dev/null and b/docs/_static/reddit.png differ diff --git a/docs/_static/screencast.gif b/docs/_static/screencast.gif new file mode 100644 index 0000000000..ec63432cbb Binary files /dev/null and b/docs/_static/screencast.gif differ diff --git a/docs/_static/screenshot-fetch.png b/docs/_static/screenshot-fetch.png new file mode 100644 index 0000000000..6b753b6126 Binary files /dev/null and b/docs/_static/screenshot-fetch.png differ diff --git a/docs/_static/screenshot-web.png b/docs/_static/screenshot-web.png new file mode 100644 index 0000000000..5b22cbcc8e Binary files /dev/null and b/docs/_static/screenshot-web.png differ diff --git a/docs/_static/screenshot-web2.png b/docs/_static/screenshot-web2.png new file mode 100644 index 0000000000..64ac5aabff Binary files /dev/null and b/docs/_static/screenshot-web2.png differ diff --git a/docs/_static/screenshot-wide.png b/docs/_static/screenshot-wide.png new file mode 100644 index 0000000000..728a79285e Binary files /dev/null and b/docs/_static/screenshot-wide.png differ diff --git a/docs/_static/screenshot.png b/docs/_static/screenshot.png new file mode 100644 index 0000000000..3d34a6d044 Binary files /dev/null and b/docs/_static/screenshot.png differ diff --git a/docs/_static/sensors.png b/docs/_static/sensors.png new file mode 100644 index 0000000000..588b59364f Binary files /dev/null and b/docs/_static/sensors.png differ diff --git a/docs/_static/smart.png b/docs/_static/smart.png new file mode 100644 index 0000000000..d6fdfacc37 Binary files /dev/null and b/docs/_static/smart.png differ diff --git a/docs/_static/sparkline.png b/docs/_static/sparkline.png new file mode 100644 index 0000000000..6a44eded03 Binary files /dev/null and b/docs/_static/sparkline.png differ diff --git a/docs/_static/trend.png b/docs/_static/trend.png new file mode 100644 index 0000000000..7cf0cff4a8 Binary files /dev/null and b/docs/_static/trend.png differ diff --git a/docs/_static/twitter-icon.png b/docs/_static/twitter-icon.png new file mode 100644 index 0000000000..aa8c89a59f Binary files /dev/null and b/docs/_static/twitter-icon.png differ diff --git a/docs/_static/wifi.png b/docs/_static/wifi.png new file mode 100644 index 0000000000..6fafec9a66 Binary files /dev/null and b/docs/_static/wifi.png differ diff --git a/docs/_templates/links.html b/docs/_templates/links.html new file mode 100644 index 0000000000..db4302b3b0 --- /dev/null +++ b/docs/_templates/links.html @@ -0,0 +1,7 @@ +

Useful Links

+ diff --git a/docs/aoa/actions.rst b/docs/aoa/actions.rst new file mode 100644 index 0000000000..164092ed70 --- /dev/null +++ b/docs/aoa/actions.rst @@ -0,0 +1,85 @@ +.. _actions: + +Actions +======= + +Glances can trigger actions on events for warning and critical thresholds. + +By ``action``, we mean all shell command line. For example, if you want +to execute the ``foo.py`` script if the last 5 minutes load are critical +then add the ``_action`` line to the Glances configuration file: + +.. code-block:: ini + + [load] + critical=5.0 + critical_action=python /path/to/foo.py + +All the stats are available in the command line through the use of the +`Mustache`_ syntax. `Chevron`_ is required to render the mustache's template syntax. + +Additionaly to the stats of the current plugin, the following variables are +also available: +- ``{{time}}``: current time in ISO format +- ``{{critical}}``: critical threshold value +- ``{{warning}}``: warning threshold value +- ``{{careful}}``: careful threshold value + +Another example would be to create a log file +containing used vs total disk space if a space trigger warning is +reached: + +.. code-block:: ini + + [fs] + warning=70 + warning_action=echo "{{time}} {{mnt_point}} {{used}}/{{size}}" > /tmp/fs.alert + +A last example would be to create a log file containing the total user disk +space usage for a device and notify by email each time a space trigger +critical is reached: + +.. code-block:: ini + + [fs] + critical=90 + critical_action_repeat=echo "{{time}} {{device_name}} {{percent}}" > /tmp/fs.alert && python /etc/glances/actions.d/fs-critical.py + +.. note:: + Use && as separator for multiple commands + +Within ``/etc/glances/actions.d/fs-critical.py``: + +.. code-block:: python + + import subprocess + from requests import get + + fs_alert = open('/tmp/fs.alert', 'r').readline().strip().split(' ') + device = fs_alert[0] + percent = fs_alert[1] + system = subprocess.check_output(['uname', '-rn']).decode('utf-8').strip() + ip = get('https://api.ipify.org').text + + body = 'Used user disk space for ' + device + ' is at ' + percent + '%.\nPlease cleanup the filesystem to clear the alert.\nServer: ' + str(system)+ '.\nIP address: ' + ip + ps = subprocess.Popen(('echo', '-e', body), stdout=subprocess.PIPE) + subprocess.call(['mail', '-s', 'CRITICAL: disk usage above 90%', '-r', 'postmaster@example.com', 'glances@example.com'], stdin=ps.stdout) + +.. note:: + + You can use all the stats for the current plugin. See + https://github.com/nicolargo/glances/wiki/The-Glances-RESTFUL-JSON-API + for the stats list. + +It is also possible to repeat action until the end of the alert. +Keep in mind that the command line is executed every refresh time so +use with caution: + +.. code-block:: ini + + [load] + critical=5.0 + critical_action_repeat=/home/myhome/bin/bipper.sh + +.. _Mustache: https://mustache.github.io/ +.. _Chevron: https://github.com/noahmorrison/chevron diff --git a/docs/aoa/amps.rst b/docs/aoa/amps.rst new file mode 100644 index 0000000000..83f03c6523 --- /dev/null +++ b/docs/aoa/amps.rst @@ -0,0 +1,144 @@ +.. _amps: + +Applications Monitoring Process +=============================== + +Thanks to Glances and its AMP module, you can add specific monitoring to +running processes. AMPs are defined in the Glances :ref:`configuration file`. + +You can disable AMP using the ``--disable-plugin amps`` option or pressing the +``A`` key. + +Simple AMP +---------- + +For example, a simple AMP that monitor the CPU/MEM of all Python +processes can be defined as follows: + +.. code-block:: ini + + [amp_python] + enable=true + regex=.*python.* + refresh=3 + +Every 3 seconds (``refresh``) and if the ``enable`` key is true, Glances +will filter the running processes list thanks to the ``.*python.*`` +regular expression (``regex``). + +The default behavior for an AMP is to display the number of matching +processes, CPU and MEM: + +.. image:: ../_static/amp-python.png + +You can also define the minimum (``countmin``) and/or maximum +(``countmax``) process number. For example: + +.. code-block:: ini + + [amp_python] + enable=true + regex=.*python.* + refresh=3 + countmin=1 + countmax=2 + +With this configuration, if the number of running Python scripts is +higher than 2, then the AMP is displayed with a purple color (red if +less than countmin): + +.. image:: ../_static/amp-python-warning.png + +If the regex option is not defined, the AMP will be executed every refresh +time and the process count will not be displayed (countmin and countmax will +be ignored). + +For example: + +.. code-block:: ini + + [amp_conntrack] + enable=false + refresh=30 + one_line=false + command=sysctl net.netfilter.nf_conntrack_count && sysctl net.netfilter.nf_conntrack_max + +Note: for multiple command, please use the '&&'' separator. + +For security reason, pipe is not directly allowed in a AMP command but you create a shell +script with your command: + +.. code-block:: ini + + $ cat /usr/local/bin/mycommand.sh + #!/bin/sh + ps -aux | wc -l + +and use it in the amps: + +.. code-block:: ini + + [amp_amptest] + enable=true + regex=.* + refresh=15 + one_line=false + command=/usr/local/bin/mycommand.sh + +User defined AMP +---------------- + +If you need to execute a specific command line, you can use the +``command`` option. For example, if you want to display the Dropbox +process status, you can define the following section in the Glances +configuration file: + +.. code-block:: ini + + [amp_dropbox] + # Use the default AMP (no dedicated AMP Python script) + enable=true + regex=.*dropbox.* + refresh=3 + one_line=false + command=dropbox status + countmin=1 + +The ``dropbox status`` command line will be executed and displayed in +the Glances UI: + +.. image:: ../_static/amp-dropbox.png + +You can force Glances to display the result in one line setting +``one_line`` to true. + +Embedded AMP +------------ + +Glances provides some specific AMP scripts (replacing the ``command`` +line). You can write your own AMP script to fill your needs. AMP scripts +are located in the ``amps`` folder and should be named ``glances_*.py``. +An AMP script define an Amp class (``GlancesAmp``) with a mandatory +update method. The update method call the ``set_result`` method to set +the AMP return string. The return string is a string with one or more +line (\n between lines). To enable it, the configuration file section +should be named ``[amp_*]``. + +For example, if you want to enable the Nginx AMP, the following +definition should do the job (Nginx AMP is provided by the Glances team +as an example): + +.. code-block:: ini + + [amp_nginx] + enable=true + regex=\/usr\/sbin\/nginx + refresh=60 + one_line=false + status_url=http://localhost/nginx_status + +Here's the result: + +.. image:: ../_static/amps.png + +In client/server mode, the AMP list is defined on the server side. diff --git a/docs/aoa/cloud.rst b/docs/aoa/cloud.rst new file mode 100644 index 0000000000..a65a241402 --- /dev/null +++ b/docs/aoa/cloud.rst @@ -0,0 +1,15 @@ +.. _cloud: + +CLOUD +===== + +This plugin displays information about the cloud provider if your host is running on OpenStack. + +The plugin use the standard OpenStack `metadata`_ service to retrieve the information. + +This plugin is disable by default, please use the --enable-plugin cloud option +to enable it. + +.. image:: ../_static/cloud.png + +.. _metadata: https://docs.openstack.org/nova/latest/user/metadata.html \ No newline at end of file diff --git a/docs/aoa/connections.rst b/docs/aoa/connections.rst new file mode 100644 index 0000000000..a8f31f5ca5 --- /dev/null +++ b/docs/aoa/connections.rst @@ -0,0 +1,30 @@ +.. _connections: + +Connections +=========== + +.. image:: ../_static/connections.png + +This plugin display extended information about network connections. + +The states are the following: + +- Listen: all ports created by server and waiting for a client to connect +- Initialized: All states when a connection is initialized (sum of SYN_SENT and SYN_RECEIVED) +- Established: All established connections between a client and a server +- Terminated: All states when a connection is terminated (FIN_WAIT1, CLOSE_WAIT, LAST_ACK, FIN_WAIT2, TIME_WAIT and CLOSE) +- Tracked: Current number and maximum Netfilter tracker connection (nf_conntrack_count/nf_conntrack_max) + +The configuration should be done in the ``[connections]`` section of the +Glances configuration file. + +By default the plugin is **disabled**. Please change your configuration file as following to enable it + +.. code-block:: ini + + [connections] + disable=False + # nf_conntrack thresholds in % + nf_conntrack_percent_careful=70 + nf_conntrack_percent_warning=80 + nf_conntrack_percent_critical=90 diff --git a/docs/aoa/containers.rst b/docs/aoa/containers.rst new file mode 100644 index 0000000000..e7b3e40be4 --- /dev/null +++ b/docs/aoa/containers.rst @@ -0,0 +1,63 @@ +.. _containers: + +Containers +========== + +If you use ``containers``, Glances can help you to monitor your Docker or Podman containers. +Glances uses the containers API through the `docker-py`_ and `podman-py`_ libraries. + +You can install this dependency using: + +.. code-block:: console + + pip install glances[containers] + +.. image:: ../_static/containers.png + +Note: Memory usage is compute as following "display memory usage = memory usage - inactive_file" + +It is possible to define limits and actions from the configuration file +under the ``[containers]`` section: + +.. code-block:: ini + + [containers] + disable=False + # Only show specific containers (comma-separated list of container name or regular expression) + show=thiscontainer,andthisone,andthoseones.* + # Hide some containers (comma-separated list of container name or regular expression) + hide=donotshowthisone,andthose.* + # Show only specific containers (comma-separated list of container name or regular expression) + #show=showthisone,andthose.* + # Define the maximum containers size name (default is 20 chars) + max_name_size=20 + # List of stats to disable (not display) + # Following stats can be disabled: name,status,uptime,cpu,mem,diskio,networkio,ports,command + disable_stats=command + # Global containers' thresholds for CPU and MEM (in %) + cpu_careful=50 + cpu_warning=70 + cpu_critical=90 + mem_careful=20 + mem_warning=50 + mem_critical=70 + # Per container thresholds + containername_cpu_careful=10 + containername_cpu_warning=20 + containername_cpu_critical=30 + containername_cpu_critical_action=echo {{Image}} {{Id}} {{cpu}} > /tmp/container_{{name}}.alert + # By default, Glances only display running containers + # Set the following key to True to display all containers + all=False + # Define Podman sock + #podman_sock=unix:///run/user/1000/podman/podman.sock + +You can use all the variables ({{foo}}) available in the containers plugin. + +Filtering (for hide or show) is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +.. _regex101: https://regex101.com/ +.. _docker-py: https://github.com/containers/containers-py +.. _podman-py: https://github.com/containers/podman-py \ No newline at end of file diff --git a/docs/aoa/cpu.rst b/docs/aoa/cpu.rst new file mode 100644 index 0000000000..792aa29bb5 --- /dev/null +++ b/docs/aoa/cpu.rst @@ -0,0 +1,97 @@ +.. _cpu: + +CPU +=== + +The CPU stats are shown as a percentage or values and for the configured +refresh time. + +The total CPU usage is displayed on the first line. + +.. image:: ../_static/cpu.png + +If enough horizontal space is available, extended CPU information are +displayed. + +.. image:: ../_static/cpu-wide.png + +CPU stats description: + +- **total**: sum of all CPU percentages (except idle). +- **total_min**: minimum total observed since Glances startup. +- **total_max**: maximum total observed since Glances startup. +- **total_mean**: mean (average) total computed from the history. +- **user**: percent time spent in user space. User CPU time is the time + spent on the processor running your program's code (or code in + libraries). +- **system**: percent time spent in kernel space. System CPU time is the + time spent running code in the Operating System kernel. +- **idle**: percent of CPU used by any program. Every program or task + that runs on a computer system occupies a certain amount of processing + time on the CPU. If the CPU has completed all tasks it is idle. +- **nice** *(\*nix)*: percent time occupied by user level processes with + a positive nice value. The time the CPU has spent running users' + processes that have been *niced*. +- **irq** *(Linux, \*BSD)*: percent time spent servicing/handling + hardware/software interrupts. Time servicing interrupts (hardware + + software). +- **iowait** *(Linux)*: percent time spent by the CPU waiting for I/O + operations to complete. +- **steal** *(Linux)*: percentage of time a virtual CPU waits for a real + CPU while the hypervisor is servicing another virtual processor. +- **guest** *(Linux)*: percentage of time a virtual CPU spends + servicing another virtual CPU under the control of the Linux kernel. +- **ctx_sw**: number of context switches (voluntary + involuntary) per + second. A context switch is a procedure that a computer's CPU (central + processing unit) follows to change from one task (or process) to + another while ensuring that the tasks do not conflict. +- **inter**: number of interrupts per second. +- **sw_inter**: number of software interrupts per second. Always set to + 0 on Windows and SunOS. +- **syscal**: number of system calls per second. Do not displayed on + Linux (always 0). +- **dpc**: *(Windows)*: time spent servicing deferred procedure calls. + +To switch to per-CPU stats, just hit the ``1`` key: + +.. image:: ../_static/per-cpu.png + +In this case, Glances will show on line per logical CPU on the system. +If you have multiple core, it is possible to define the maximum number +of CPU to display. The top 'max_cpu_display' will be display and an +extra line with the mean of all others CPU will be added. + +.. code-block:: ini + + [percpu] + # Define the maximum number of CPU display at a time + # If the number of CPU is higher than: + # - display the top 'max_cpu_display' (sorted by CPU consumption) + # - a last line will be added with the sum of all other CPUs + max_cpu_display=4 + +Logical cores means the number of physical cores multiplied by the number +of threads that can run on each core (this is known as Hyper Threading). + +By default, ``steal`` CPU time alerts aren't logged. If you want that, +just add to the configuration file: + +.. code-block:: ini + + [cpu] + steal_log=True + +Legend: + +================= ============ +CPU (user/system) Status +================= ============ +``<50%`` ``OK`` +``>50%`` ``CAREFUL`` +``>70%`` ``WARNING`` +``>90%`` ``CRITICAL`` +================= ============ + +.. note:: + Limit values can be overwritten in the configuration file under + the ``[cpu]`` and/or ``[percpu]`` sections. diff --git a/docs/aoa/diskio.rst b/docs/aoa/diskio.rst new file mode 100644 index 0000000000..8e7467fb7d --- /dev/null +++ b/docs/aoa/diskio.rst @@ -0,0 +1,74 @@ +.. _disk: + +Disk I/O +======== + +.. image:: ../_static/diskio.png + +Glances displays the disk I/O throughput, count and mean latency: +- bytes per second (default behavior / Bytes/s, KBytes/s, MBytes/s, etc) +- requests per second (using --diskio-iops option or *B* hotkey) +- mean latency (using --diskio-latency option or *L* hotkey) + +It's also possible to define: + +- a list of disk to show (white list) +- a list of disks to hide +- aliases for disk name (use \ to espace special characters) + +under the ``[diskio]`` section in the configuration file. + +For example, if you want to hide the loopback disks (loop0, loop1, ...) +and the specific ``sda5`` partition: + +.. code-block:: ini + + [diskio] + hide=sda5,loop.* + +or another example: + +.. code-block:: ini + + [diskio] + show=sda.* + +Filtering is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +It is also possible to define thesholds for latency and bytes read and write per second: + +.. code-block:: ini + + [diskio] + # Alias for sda1 and sdb1 + #alias=sda1:SystemDisk,sdb1:DataDisk + # Default latency thresholds (in ms) (rx = read / tx = write) + rx_latency_careful=10 + rx_latency_warning=20 + rx_latency_critical=50 + tx_latency_careful=10 + tx_latency_warning=20 + tx_latency_critical=50 + # Set thresholds (in bytes per second) for a given disk name (rx = read / tx = write) + dm-0_rx_careful=4000000000 + dm-0_rx_warning=5000000000 + dm-0_rx_critical=6000000000 + dm-0_rx_log=True + dm-0_tx_careful=700000000 + dm-0_tx_warning=900000000 + dm-0_tx_critical=1000000000 + dm-0_tx_log=True + +You also can automatically hide disk with no read or write using the +``hide_zero`` configuration key. The optional ``hide_threshold_bytes`` option +can also be used to set a threshold higher than zero. + +.. code-block:: ini + + [diskio] + hide_zero=True + hide_threshold_bytes=0 + +.. _regex101: https://regex101.com/ \ No newline at end of file diff --git a/docs/aoa/events.rst b/docs/aoa/events.rst new file mode 100644 index 0000000000..85e3d75335 --- /dev/null +++ b/docs/aoa/events.rst @@ -0,0 +1,37 @@ +.. _events: + +events +====== + +.. image:: ../_static/events.png + +Events list is displayed in the bottom of the screen if and only if: + +- at least one ``WARNING`` or ``CRITICAL`` alert was occurred +- space is available in the bottom of the console/terminal + +Each event message displays the following information: + +1. start datetime +2. duration if alert is terminated or `ongoing` if the alert is still in + progress +3. alert name +4. {min,avg,max} values or number of running processes for monitored + processes list alerts + +The configuration should be done in the ``[alert]`` section of the +Glances configuration file: + +.. code-block:: ini + + [alert] + disable=False + # Maximum number of events to display (default is 10 events) + max_events=10 + # Minimum duration for an event to be taken into account (default is 6 seconds) + min_duration=6 + # Minimum time between two events of the same type (default is 6 seconds) + # This is used to avoid too many alerts for the same event + # Events will be merged + min_interval=6 + diff --git a/docs/aoa/folders.rst b/docs/aoa/folders.rst new file mode 100644 index 0000000000..e4ac2006e0 --- /dev/null +++ b/docs/aoa/folders.rst @@ -0,0 +1,43 @@ +.. _folders: + +Folders +======= + +The folders plugin allows user, through the configuration file, to +monitor size of a predefined folders list. + +.. image:: ../_static/folders.png + +If the size cannot be computed, a ``'?'`` (non-existing folder) or a +``'!'`` (permission denied) is displayed. + +Each item is defined by: + +- ``path``: absolute path to monitor (mandatory) +- ``careful``: optional careful threshold (in MB) +- ``warning``: optional warning threshold (in MB) +- ``critical``: optional critical threshold (in MB) +- ``refresh``: interval in second between two refresh (default is 30 seconds) + +Up to ``10`` items can be defined. + +For example, if you want to monitor the ``/tmp`` folder every minute, +the following definition should do the job: + +.. code-block:: ini + + [folders] + folder_1_path=/tmp + folder_1_careful=2500 + folder_1_warning=3000 + folder_1_critical=3500 + folder_1_refresh=60 + +In client/server mode, the list is defined on the ``server`` side. + +.. warning:: + Symbolic links are not followed. + +.. warning:: + Do **NOT** define folders containing lot of files and subfolders or use an + huge refresh time... diff --git a/docs/aoa/fs.rst b/docs/aoa/fs.rst new file mode 100644 index 0000000000..d16e42bfa1 --- /dev/null +++ b/docs/aoa/fs.rst @@ -0,0 +1,66 @@ +.. _fs: + +File System +=========== + +.. image:: ../_static/fs.png + +Glances displays the used and total file system disk space. The unit is +adapted dynamically. + +Alerts are set for `user disk space usage `_. + +Legend: + +===================== ============ +User disk space usage Status +===================== ============ +``<50%`` ``OK`` +``>50%`` ``CAREFUL`` +``>70%`` ``WARNING`` +``>90%`` ``CRITICAL`` +===================== ============ + +.. note:: + Limit values can be overwritten in the configuration file under + the ``[fs]`` section. + +By default, the plugin only displays physical devices (hard disks, USB +keys). To allow other file system types, you have to enable them in the +configuration file. For example, if you want to allow the ``shm`` file +system: + +.. code-block:: ini + + [fs] + allow=shm + +With the above configuration key, it is also possible to monitor NFS +mount points (allow=nfs). Be aware that this can slow down the +performance of the plugin if the NFS server is not reachable. In this +case, the plugin will wait for a 2 seconds timeout. + +Also, you can hide mount points using regular expressions. + +To hide all mount points starting with /boot and /snap: + +.. code-block:: ini + + [fs] + hide=/boot.*,/snap.* + +Filtering are also applied on device name (Glances 3.1.4 or higher). + +It is also possible to configure a white list of devices to display. +Example to only show /dev/sdb mount points: + +.. code-block:: ini + + [fs] + show=/dev/sdb.* + +Filtering is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +.. _regex101: https://regex101.com/ \ No newline at end of file diff --git a/docs/aoa/gpu.rst b/docs/aoa/gpu.rst new file mode 100644 index 0000000000..6f7d9f1d65 --- /dev/null +++ b/docs/aoa/gpu.rst @@ -0,0 +1,57 @@ +.. _gpu: + +GPU +=== + +For the moment, following GPU are supported: +- NVidia (thanks to the `nvidia-ml-py`_ library) +- AMD (only on Linux Operating system with kernel 5.14 or higher) +- Intel (only on Linux Operating system) + +The GPU stats are shown as a percentage of value and for the configured +refresh time. It displays: + +- GPU usage (NVidia and AMD) or frequency (Intel) +- memory consumption (NVidia and AMD) +- temperature (if available) + +.. image:: ../_static/gpu.png + +If you click on the ``6`` short key, the per-GPU view is displayed: + +.. image:: ../_static/pergpu.png + +.. note:: + You can also start Glances with the ``--meangpu`` option to display + the first view by default. + +You can change the threshold limits in the configuration file: + +.. code-block:: ini + + [gpu] + # Default processor values if not defined: 50/70/90 + proc_careful=50 + proc_warning=70 + proc_critical=90 + # Default memory values if not defined: 50/70/90 + mem_careful=50 + mem_warning=70 + mem_critical=90 + # Temperature + temperature_careful=60 + temperature_warning=70 + temperature_critical=80 + +Legend: + +============== ============ +GPU (PROC/MEM) Status +============== ============ +``<50%`` ``OK`` +``>50%`` ``CAREFUL`` +``>70%`` ``WARNING`` +``>90%`` ``CRITICAL`` +============== ============ + +.. _nvidia-ml-py: https://pypi.org/project/nvidia-ml-py/ diff --git a/docs/aoa/hddtemp.rst b/docs/aoa/hddtemp.rst new file mode 100644 index 0000000000..9e8506f325 --- /dev/null +++ b/docs/aoa/hddtemp.rst @@ -0,0 +1,39 @@ +.. _sensors: + +HDD temperature sensor +====================== + +*Availability: Linux* + +This plugin will add HDD temperature to the sensors plugin. + +On your Linux system, you will need to have: +- hddtemp package installed +- hddtemp service up and running (check it with systemctl status hddtemp) +- the TCP port 7634 opened on your local firewall (if it is enabled on your system) + +For example on a CentOS/Redhat Linux operating system, you have to: + + $ sudo yum install hddtemp + + $ sudo systemctl enable hddtemp + + $ sudo systemctl enable hddtemp + +Test it in the console: + + $ hddtemp + + /dev/sda: TOSHIBA MQ01ACF050: 41°C + + /dev/sdb: ST1000LM044 HN-M101SAD: 38°C + +It should appears in the sensors plugin. + +.. image:: ../_static/hddtemp.png + +There is no alert on this information. + +.. note:: + Limit values and sensors alias names can be defined in the + configuration file under the ``[sensors]`` section. diff --git a/docs/aoa/header.rst b/docs/aoa/header.rst new file mode 100644 index 0000000000..23f07ab475 --- /dev/null +++ b/docs/aoa/header.rst @@ -0,0 +1,79 @@ +.. _header: + +Header +====== + +.. image:: ../_static/header.png + +The header shows the hostname, OS name, release version, platform +architecture IP addresses (private and public) and system uptime. +Additionally, on GNU/Linux, it also shows the kernel version. + +In client mode, the server connection status is also displayed. + +The system information message can be configured in the configuration file +(for the moment, it only work for the Curses interface): + +.. code-block:: ini + [system] + # System information to display (a string where {key} will be replaced by the value) in the Curses interface + # Available dynamics information are: hostname, os_name, os_version, os_arch, linux_distro, platform + system_info_msg= | My {os_name} system | + +The header IP message can be configured from the ip ``[ip]`` section, it allows to display private and +public IP information. + +In the default configuration file, public IP address information is disable. Set public_disabled, to False +in order to enable the feature. + +Example: + +.. code-block:: ini + + [ip] + # Disable display of private IP address + disable=False + # Configure the online service where public IP address information will be downloaded + # - public_disabled: Disable public IP address information (set to True for offline platform) + # - public_refresh_interval: Refresh interval between to calls to the online service + # - public_api: URL of the API (the API should return an JSON object) + # - public_username: Login for the online service (if needed) + # - public_password: Password for the online service (if needed) + # - public_field: Field name of the public IP address in onlibe service JSON message + # - public_template: Template to build the public message + # + # Example for IPLeak service: + # public_api=https://ipv4.ipleak.net/json/ + # public_field=ip + # public_template={ip} {continent_name}/{country_name}/{city_name} + # + public_disabled=False + public_refresh_interval=300 + public_api=https://ipv4.ipleak.net/json/ + #public_username= + #public_password= + public_field=ip + public_template={continent_name}/{country_name}/{city_name} + +**NOTE:** Setting low values for `public_refresh_interval` will result in frequent +HTTP requests to the onlive service defined in public_api. Recommended range: 120-600 seconds. +Glances uses online services in order to get the IP addresses and the additional information. +Your IP address could be blocked if too many requests are done. + + +Example: + +.. image:: ../_static/ip.png + +**Connected**: + +.. image:: ../_static/connected.png + +**Disconnected**: + +.. image:: ../_static/disconnected.png + +If you are hosted on an ``OpenStack`` instance, some additional +information can be displayed (AMI-ID, region). + +.. image:: ../_static/aws.png diff --git a/docs/aoa/index.rst b/docs/aoa/index.rst new file mode 100644 index 0000000000..56102c2def --- /dev/null +++ b/docs/aoa/index.rst @@ -0,0 +1,48 @@ +.. _aoa: + +Anatomy Of The Application +========================== + +This document is meant to give an overview of the Glances interface. + +Legend: + +=========== ============ +``GREEN`` ``OK`` +``BLUE`` ``CAREFUL`` +``MAGENTA`` ``WARNING`` +``RED`` ``CRITICAL`` +=========== ============ + +.. note:: + Only stats with colored background will be shown in the alert view. + +.. toctree:: + :maxdepth: 2 + + header + quicklook + cpu + memory + load + gpu + npu + network + connections + wifi + ports + diskio + fs + irq + folders + cloud + raid + smart + sensors + hddtemp + ps + containers + vms + amps + events + actions diff --git a/docs/aoa/irq.rst b/docs/aoa/irq.rst new file mode 100644 index 0000000000..6fbc868fe7 --- /dev/null +++ b/docs/aoa/irq.rst @@ -0,0 +1,25 @@ +.. _irq: + +IRQ +=== + +*Availability: Linux* + +This plugin is disable by default, please use the --enable irq option +to enable it. + +.. image:: ../_static/irq.png + +Glances displays the top ``5`` interrupts rate. + +This plugin is only available on GNU/Linux (stats are grabbed from the +``/proc/interrupts`` file). + +.. note:: + ``/proc/interrupts`` file doesn't exist inside OpenVZ containers. + +How to read the information: + +- The first column is the IRQ number / name +- The second column says how many times the CPU has been interrupted + during the last second diff --git a/docs/aoa/load.rst b/docs/aoa/load.rst new file mode 100644 index 0000000000..b95a0b3c85 --- /dev/null +++ b/docs/aoa/load.rst @@ -0,0 +1,74 @@ +.. _load: + +Load +==== + +*Availability: Unix and Windows with a PsUtil version >= 5.6.2* + +.. image:: ../_static/load.png + +On the *No Sheep* blog, Zachary Tirrell defines the `load average`_ +on GNU/Linux operating system: + + "In short it is the average sum of the number of processes + waiting in the run-queue plus the number currently executing + over 1, 5, and 15 minutes time periods." + +Be aware that Load on Linux, BSD and Windows are different things, high +`load on BSD`_ does not means high CPU load. The Windows load is emulated +by the PsUtil lib (see `load on Windows`_) + +Load stats description: + +- **min1**: Average sum of the number of processes waiting in the run-queue + plus the number currently executing over 1 minute. +- **min1_min**: Minimum average value observed since Glances startup. +- **min1_max**: Maximum average value observed since Glances startup. +- **min1_mean**: Mean (average) value computed from the history. +- **min5**: Average sum of the number of processes waiting in the run-queue + plus the number currently executing over 5 minutes. +- **min15**: Average sum of the number of processes waiting in the run-queue + plus the number currently executing over 15 minutes. + +Glances gets the number of CPU core (displayed on the first line) to adapt +the alerts. Alerts on load average are only set on 15 minutes time period. + +Thresholds are computed by dividing the 5 and 15 minutes average load per +CPU(s) number. For example, if you have 4 CPUs and the 5 minutes load is +1.0, then the warning threshold will be set to 2.8 (0.7 * 4 * 1.0). + +From Glances 3.1.4, if Irix/Solaris mode is off ('0' key), the value is +divided by logical core number and multiple by 100 to have load as a +percentage. + +.. image:: ../_static/loadpercent.png + +A character is also displayed just after the LOAD header and shows the +trend value (for the 1 minute load stat): + +======== ============================================================== +Trend Status +======== ============================================================== +``-`` Mean 15 lasts values equal mean 15 previous values +``↓`` Mean 15 lasts values is lower mean 15 previous values +``↑`` Mean 15 lasts values is higher mean 15 previous values +======== ============================================================== + +Legend: + +============= ============ +Load avg Status +============= ============ +``<0.7*core`` ``OK`` +``>0.7*core`` ``CAREFUL`` +``>1*core`` ``WARNING`` +``>5*core`` ``CRITICAL`` +============= ============ + +.. note:: + Limit values can be overwritten in the configuration file under + the ``[load]`` section. + +.. _load average: http://nosheep.net/story/defining-unix-load-average/ +.. _load on BSD: http://undeadly.org/cgi?action=article&sid=20090715034920 +.. _load on Windows: https://psutil.readthedocs.io/en/latest/#psutil.getloadavg diff --git a/docs/aoa/memory.rst b/docs/aoa/memory.rst new file mode 100644 index 0000000000..b2faff53b7 --- /dev/null +++ b/docs/aoa/memory.rst @@ -0,0 +1,80 @@ +.. _memory: + +Memory +====== + +Glances uses two columns: one for the ``RAM`` and one for the ``SWAP``. + +.. image:: ../_static/mem.png + +If enough space is available, Glances displays extended information for +the ``RAM``: + +.. image:: ../_static/mem-wide.png + +Stats description: + +- **percent**: the percentage usage calculated as (total-available)/total*100. +- **total**: total physical memory available. +- **used**: memory used, calculated differently depending on the platform and + designed for informational purposes only. + It's compute as following: + used memory = total - free (with free = available + buffers + cached) +- **free**: memory not being used at all (zeroed) that is readily available; + note that this doesn’t reflect the actual memory available (use ‘available’ + instead). +- **active**: (UNIX): memory currently in use or very recently used, and so it + is in RAM. +- **inactive**: (UNIX): memory that is marked as not used. +- **buffers**: (Linux, BSD): cache for things like file system metadata. +- **cached**: (Linux, BSD): cache for various things (including ZFS cache). + +Additional stats available in through the API: + +- **available**: the actual amount of available memory that can be given + instantly to processes that request more memory in bytes; this is calculated + by summing different memory values depending on the platform (e.g. free + + buffers + cached on Linux) and it is supposed to be used to monitor actual + memory usage in a cross platform fashion. +- **wired**: (BSD, macOS): memory that is marked to always stay in RAM. It is + never moved to disk. +- **shared**: (BSD): memory that may be simultaneously accessed by multiple + processes. +- **percent_min**: the minimum memory usage percentage observed since + Glances startup. +- **percent_max**: the maximum memory usage percentage observed since + Glances startup. +- **percent_mean**: the mean memory usage percentage observed since + Glances startup. + +It is possible to display the available memory instead of the used memory +by setting the ``available`` option to ``True`` in the configuration file +under the ``[mem]`` section. + +A character is also displayed just after the MEM header and shows the +trend value: + +======== ============================================================== +Trend Status +======== ============================================================== +``-`` Mean 15 lasts values equal mean 15 previous values +``↓`` Mean 15 lasts values is lower mean 15 previous values +``↑`` Mean 15 lasts values is higher mean 15 previous values +======== ============================================================== + +Alerts are only set for used memory and used swap. + +Legend: + +======== ============ +RAM/Swap Status +======== ============ +``<50%`` ``OK`` +``>50%`` ``CAREFUL`` +``>70%`` ``WARNING`` +``>90%`` ``CRITICAL`` +======== ============ + +.. note:: + Limit values can be overwritten in the configuration file under + the ``[memory]`` and/or ``[memswap]`` sections. diff --git a/docs/aoa/network.rst b/docs/aoa/network.rst new file mode 100644 index 0000000000..dae02b4b51 --- /dev/null +++ b/docs/aoa/network.rst @@ -0,0 +1,79 @@ +.. _network: + +Network +======= + +.. image:: ../_static/network.png + +Glances displays the network interface bit rate. The unit is adapted +dynamically (bit/s, kbit/s, Mbit/s, etc). + +If the interface speed is detected (not on all systems), the defaults +thresholds are applied (70% for careful, 80% warning and 90% critical). +It is possible to define this percents thresholds from the configuration +file. It is also possible to define per interface bit rate thresholds. +In this case thresholds values are define in bps. + +Additionally, you can define: + +- a list of network interfaces to hide +- automatically hide interfaces not up +- automatically hide interfaces without IP address +- per-interface limit values +- aliases for interface name (use \ to espace special characters) + +The configuration should be done in the ``[network]`` section of the +Glances configuration file. + +For example, if you want to hide the loopback interface (lo) and all the +virtual docker interface (docker0, docker1, ...): + +.. code-block:: ini + + [network] + # Default bitrate thresholds in % of the network interface speed + # Default values if not defined: 70/80/90 + rx_careful=70 + rx_warning=80 + rx_critical=90 + tx_careful=70 + tx_warning=80 + tx_critical=90 + # Define the list of hidden network interfaces (comma-separated regexp) + hide=docker.*,lo + # Define the list of network interfaces to show (comma-separated regexp) + #show=eth0,eth1 + # Automatically hide interface not up (default is False) + hide_no_up=True + # Automatically hide interface with no IP address (default is False) + hide_no_ip=True + # Set hide_zero to True to automatically hide interface with no traffic + hide_zero=False + # WLAN 0 alias + alias=wlan0:Wireless IF + # It is possible to overwrite the bitrate thresholds per interface + # WLAN 0 Default limits (in bits per second aka bps) for interface bitrate + wlan0_rx_careful=4000000 + wlan0_rx_warning=5000000 + wlan0_rx_critical=6000000 + wlan0_rx_log=True + wlan0_tx_careful=700000 + wlan0_tx_warning=900000 + wlan0_tx_critical=1000000 + wlan0_tx_log=True + +Filtering is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +You also can automatically hide interface with no traffic using the +``hide_zero`` configuration key. The optional ``hide_threshold_bytes`` option +can also be used to set a threshold higher than zero. + +.. code-block:: ini + + [network] + hide_zero=True + hide_threshold_bytes=0 + +.. _regex101: https://regex101.com/ diff --git a/docs/aoa/npu.rst b/docs/aoa/npu.rst new file mode 100644 index 0000000000..56fef45d32 --- /dev/null +++ b/docs/aoa/npu.rst @@ -0,0 +1,26 @@ +.. _npu: + +NPU +=== + +Note: this plugin is disable by default in glances.conf file. + +For the moment, only following NPU are supported on modern Linux Kernel: +- AMD: frequency +- INTEL: frequency, temperature +- ROCKSHIP: load, frequency + +.. image:: ../_static/npu.png + +.. code-block:: ini + + [npu] + disable=False + # Default NPU load thresholds in % + load_careful=50 + load_warning=70 + load_critical=90 + # Default NPU frequency thresholds in % + freq_careful=50 + freq_warning=70 + freq_critical=90 diff --git a/docs/aoa/ports.rst b/docs/aoa/ports.rst new file mode 100644 index 0000000000..5f26917e0d --- /dev/null +++ b/docs/aoa/ports.rst @@ -0,0 +1,60 @@ +.. _ports: + +Ports +===== + +*Availability: All* + +.. image:: ../_static/ports.png + +This plugin aims at providing a list of hosts/port and URL to scan. + +You can define ``ICMP`` or ``TCP`` ports scans and URL (head only) check. + +The list should be defined in the ``[ports]`` section of the Glances +configuration file. + +.. code-block:: ini + + [ports] + # Ports scanner plugin configuration + # Interval in second between two scans + refresh=30 + # Set the default timeout (in second) for a scan (can be overwrite in the scan list) + timeout=3 + # If port_default_gateway is True, add the default gateway on top of the scan list + port_default_gateway=True + # + # Define the scan list (1 < x < 255) + # port_x_host (name or IP) is mandatory + # port_x_port (TCP port number) is optional (if not set, use ICMP) + # port_x_description is optional (if not set, define to host:port) + # port_x_timeout is optional and overwrite the default timeout value + # port_x_rtt_warning is optional and defines the warning threshold in ms + # + port_1_host=192.168.0.1 + port_1_port=80 + port_1_description=Home Box + port_1_timeout=1 + port_2_host=www.free.fr + port_2_description=My ISP + port_3_host=www.google.com + port_3_description=Internet ICMP + port_3_rtt_warning=1000 + port_4_host=www.google.com + port_4_description=Internet Web + port_4_port=80 + port_4_rtt_warning=1000 + # + # Define Web (URL) monitoring list (1 < x < 255) + # web_x_url is the URL to monitor (example: http://my.site.com/folder) + # web_x_description is optional (if not set, define to URL) + # web_x_timeout is optional and overwrite the default timeout value + # web_x_rtt_warning is optional and defines the warning respond time in ms (approximately) + # + web_1_url=https://blog.nicolargo.com + web_1_description=My Blog + web_1_rtt_warning=3000 + web_2_url=https://github.com + web_3_url=http://www.google.fr + web_3_description=Google Fr diff --git a/docs/aoa/ps.rst b/docs/aoa/ps.rst new file mode 100644 index 0000000000..0abf6fa76a --- /dev/null +++ b/docs/aoa/ps.rst @@ -0,0 +1,312 @@ +.. _ps: + +Processes List +============== + +Compact view: + +.. image:: ../_static/processlist.png + +Full view: + +.. image:: ../_static/processlist-wide.png + +Filtered view: + +.. image:: ../_static/processlist-filter.png + +Extended view: + +.. image:: ../_static/processlist-extended.png + +The process view consists of 3 parts: + +- Processes summary +- Monitored processes list (optional, only in standalone mode) +- Extended stats for the selected process (optional) +- Processes list + +The processes summary line displays: + +- Total number of tasks/processes (aliases as total in the Glances API) +- Number of threads +- Number of running tasks/processes +- Number of sleeping tasks/processes +- Other number of tasks/processes (not in running or sleeping states) +- Sort key for the process list + +By default, or if you hit the ``a`` key, the processes list is +automatically sorted by: + +- ``CPU``: if there is no alert (default behavior) +- ``CPU``: if a CPU or LOAD alert is detected +- ``MEM``: if a memory alert is detected +- ``DISK I/O``: if a CPU iowait alert is detected + +You can also set the sort key in the UI: + +- by clicking on left and right arrows +- by clicking on the following shortcuts or command line option: + +.. list-table:: Title + :widths: 10 30 30 + :header-rows: 1 + + * - Shortcut + - Command line option + - Description + * - a + - Automatic sort + - Default sort + * - c + - --sort-processes cpu_percent + - Sort by CPU + * - e + - N/A + - Pin the process and display extended stats + * - i + - --sort-processes io_counters + - Sort by DISK I/O + * - j + - --programs + - Accumulate processes by program (extended stats disable in this mode) + * - m + - --sort-processes memory_percent + - Sort by MEM + * - p + - --sort-processes name + - Sort by process name + * - t + - --sort-processes cpu_times + - Sort by CPU times + * - u + - --sort-processes username + - Sort by process username + +The number of processes in the list is adapted to the screen size. + +Columns display +--------------- + +.. list-table:: Title + :widths: 10 60 + :header-rows: 0 + + * - ``CPU%`` + - Command line option + - % of CPU used by the process + If Irix/Solaris mode is off ('0' key), the value + is divided by logical core number + +========================= ============================================== +``CPU%`` % of CPU used by the process + + If Irix/Solaris mode is off ('0' key), the value + is divided by logical core number (the column + name became CPUi) +``MEM%`` % of MEM used by the process (RES divided by + the total RAM you have) +``VIRT`` Virtual Memory Size + + The total amount of virtual memory used by the + process. It includes all code, data and shared + libraries plus pages that have been swapped out + and pages that have been mapped but not used. + + Virtual memory is usually much larger than physical + memory, making it possible to run programs for which + the total code plus data size is greater than the amount + of RAM available. + + Most of the time, this is not a useful number. +``RES`` Resident Memory Size + + The non-swapped physical memory a process is + using (what's currently in the physical memory). +``PID`` Process ID (column is replaced by NPROCS in accumulated mode) +``NPROCS`` Number of process + childs (only in accumulated mode) +``USER`` User ID +``THR`` Threads number of the process +``TIME+`` Cumulative CPU time used by the process +``NI`` Nice level of the process +``S`` Process status + + The status of the process: + + - ``R``: running or runnable (on run queue) + - ``S``: interruptible sleep (waiting for an event) + - ``D``: uninterruptible sleep (usually I/O) + - ``Z``: defunct ("zombie") process + - ``T``: traced by job control signal + - ``t``: stopped by debugger during the tracing + - ``X``: dead (should never be seen) + +``R/s`` Per process I/O read rate in B/s +``W/s`` Per process I/O write rate in B/s +``CPU`` CPU core number where the process is currently running + + Displays the 0-based CPU core number (0, 1, 2, etc.) + where the process is executing. The value updates + dynamically as processes migrate between CPU cores. + + Shows ``-`` when information is unavailable. + + Available on Linux, FreeBSD, and SunOS only. + Automatically disabled on Windows and macOS. + + Can be disabled via configuration with: + ``disable_stats=cpu_num`` in the ``[processlist]`` + section of glances.conf +``COMMAND`` Process command line or command name + + User can switch to the process name by + pressing on the ``'/'`` key +========================= ============================================== + +Disable display of virtual memory +--------------------------------- + +It's possible to disable the display of the VIRT column (virtual memory) by adding the +``disable_virtual_memory=True`` option in the ``[processlist]`` section of the configuration +file (glances.conf): + +.. code-block:: ini + + [processlist] + disable_virtual_memory=True + +Process filtering +----------------- + +It's possible to filter the processes list using the ``ENTER`` key. + +Glances filter syntax is the following (examples): + +- ``python``: Filter processes name or command line starting with + *python* (regexp) +- ``.*python.*``: Filter processes name or command line containing + *python* (regexp) +- ``username:nicolargo``: Processes of nicolargo user (key:regexp) +- ``cmdline:\/usr\/bin.*``: Processes starting by */usr/bin* + +Process focus +------------- + +It's also possible to select a processes list to focus on. + +A list of Glances filters (see upper) can be define from the command line: + +.. code-block:: bash + + glances --process-focus .*python.*,.*firefox.* + + +or the glances.conf file: + +.. code-block:: ini + + [processlist] + focus=.*python.*,.*firefox.* + +Extended info +------------- + +.. image:: ../_static/processlist-top.png + +In standalone mode, additional information are provided for the top +process: + +========================= ============================================== +``CPU affinity`` Number of cores used by the process +``Memory info`` Extended memory information about the process + + For example, on Linux: swap, shared, text, + and data +``Open`` The number of threads, files and network + sessions (TCP and UDP) used by the process +``IO nice`` The process I/O niceness (priority) +========================= ============================================== + +The extended stats feature can be enabled using the +``--enable-process-extended`` option (command line) or the ``e`` key +(curses interface). + +In curses/standalone mode, you can select a process using ``UP`` and ``DOWN`` and press: +- ``k`` to kill the selected process + +.. note:: + Limit for CPU and MEM percent values can be overwritten in the + configuration file under the ``[processlist]`` section. It is also + possible to define limit for Nice values (comma-separated list). + For example: nice_warning=-20,-19,-18 + +Accumulated per program — key 'j' +--------------------------------- + +When activated ('j' hotkey or --programs option in the command line), processes are merged +to display which programs are active. The columns show the accumulated cpu consumption, the +accumulated virtual and resident memory consumption, the accumulated transferred data I/O. +The PID columns is replaced by a NPROCS column which is the number of processes. + +Export process +-------------- + +Glances version 4 introduces a new feature to export specifics processes. In order to use this +feature, you need to use the export option in the processlist section of the Glances configuration +file or the --export-process-filter option in the command line. + +The export option is a list of Glances filters. + +Example number one, export all processes named 'python' (or with a command line containing 'python'): + +.. code-block:: ini + + [processlist] + export=.*python.* + +Note: or the --export-process-filter ".*python.*" option in the command line. + +Example number two, export all processes with the name 'python' or 'bash': + +.. code-block:: ini + + [processlist] + export=.*python.*,.*bash.* + +Note: or the --export-process-filter ".*python.*,.*bash.*" option in the command line. + +Example number three, export all processes belong to 'nicolargo' user: + +.. code-block:: ini + + [processlist] + export=username:nicolargo + +Note: or the --export-process-filter "username:nicolargo" option in the command line. + +The output of the export use the PID as the key (for example if you want to export firefox process +to a CSV file): + +Configuration file (glances.conf): + +.. code-block:: ini + + [processlist] + export=.*firefox.* + +Note: or the --export-process-filter ".*firefox.*" option in the command line. + +Command line example: + +.. code-block:: bash + + glances -C ./conf/glances.conf --export csv --export-csv-file /tmp/glances.csv --disable-plugin all --enable-plugin processlist --quiet + +the result will be: + +.. code-block:: csv + + timestamp,845992.memory_percent,845992.status,845992.num_threads,845992.cpu_timesuser,845992.cpu_timessystem,845992.cpu_timeschildren_user,845992.cpu_timeschildren_system,845992.cpu_timesiowait,845992.memory_inforss,845992.memory_infovms,845992.memory_infoshared,845992.memory_infotext,845992.memory_infolib,845992.memory_infodata,845992.memory_infodirty,845992.name,845992.io_counters,845992.nice,845992.cpu_percent,845992.pid,845992.gidsreal,845992.gidseffective,845992.gidssaved,845992.key,845992.time_since_update,845992.cmdline,845992.username,total,running,sleeping,thread,pid_max + 2024-04-03 18:39:55,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0 + 2024-04-03 18:39:57,3.692938041968513,S,138,1702.88,567.89,1752.79,244.18,0.0,288919552,12871561216,95182848,856064,0,984535040,0,firefox,1863281664,0,0.5,845992,1000,1000,1000,pid,2.2084147930145264,/snap/firefox/3836/usr/lib/firefox/firefox,nicolargo,403,1,333,1511,0 + diff --git a/docs/aoa/quicklook.rst b/docs/aoa/quicklook.rst new file mode 100644 index 0000000000..82fac3aae2 --- /dev/null +++ b/docs/aoa/quicklook.rst @@ -0,0 +1,40 @@ +.. _quicklook: + +Quick Look +========== + +The ``quicklook`` plugin is only displayed on wide screen and proposes a +bar view for cpu, memory, swap and load (this list is configurable). + +In the terminal interface, click on ``3`` to enable/disable it. + +.. image:: ../_static/quicklook.png + +If the per CPU mode is on (by clicking the ``1`` key): + +.. image:: ../_static/quicklook-percpu.png + +In the Curses/terminal interface, it is also possible to switch from bar to +sparkline using 'S' hot key or --sparkline command line option (need the +sparklines Python lib on your system). Please be aware that sparklines use +the Glances history and will not be available if the history is disabled +from the command line. For the moment sparkline is not available in +client/server mode (see issue ). + +.. image:: ../_static/sparkline.png + +.. note:: + Limit values can be overwritten in the configuration file under + the ``[quicklook]`` section. + +You can also configure the stats list and the bat character used in the +user interface. + +.. code-block:: ini + + [quicklook] + # Stats list (default is cpu,mem,load) + # Available stats are: cpu,mem,load,swap + list=cpu,mem,load + # Graphical percentage char used in the terminal user interface (default is |) + bar_char=| diff --git a/docs/aoa/raid.rst b/docs/aoa/raid.rst new file mode 100644 index 0000000000..ab3622f286 --- /dev/null +++ b/docs/aoa/raid.rst @@ -0,0 +1,24 @@ +.. _raid: + +RAID +==== + +*Availability: Linux* + +*Dependency: this plugin uses the optional pymdstat Python lib* + +This plugin is disable by default, please use the --enable-plugin raid option +to enable it or enable it in the glances.conf file: + +.. code-block:: ini + + [raid] + # Documentation: https://glances.readthedocs.io/en/latest/aoa/raid.html + # This plugin is disabled by default + disable=False + +In the terminal interface, click on ``R`` to enable/disable it. + +.. image:: ../_static/raid.png + +This plugin is only available on GNU/Linux. diff --git a/docs/aoa/sensors.rst b/docs/aoa/sensors.rst new file mode 100644 index 0000000000..e43467b0dc --- /dev/null +++ b/docs/aoa/sensors.rst @@ -0,0 +1,58 @@ +.. _sensors: + +Sensors +======= + +*Availability: Linux* + +.. image:: ../_static/sensors.png + +Glances can display the sensors information using ``psutil``, +``hddtemp`` and ``batinfo``: +- motherboard and CPU temperatures +- hard disk temperature +- battery capacity + +Limit values and sensors alias names can be defined in the configuration +file under the ``[sensors]`` section. + +Limit can be defined for a specific sensor, a type of sensor or defineby the system +thresholds (default behavor). + +.. code-block:: ini + + [sensors] + # Sensors core thresholds (in Celsius...) + # By default values are grabbed from the system + # Overwrite thresholds for a specific sensor + temperature_core_Ambient_careful=45 + temperature_core_Ambient_warning=65 + temperature_core_Ambient_critical=80 + temperature_core_Ambient_log=False + # Overwrite thresholds for a specific type of sensor + #temperature_core_careful=45 + #temperature_core_warning=65 + #temperature_core_critical=80 + #alias=temp1:Motherboard 0,core 0:CPU Core 0 + +.. note 1:: + The support for multiple batteries is only available if + you have the batinfo Python lib installed on your system + because for the moment PSUtil only support one battery. + +.. note 2:: + If a sensors has temperature and fan speed with the same name unit, + it is possible to alias it using: + alias=unitname_temperature_core_alias:Alias for temp,unitname_fan_speed_alias:Alias for fan speed + +.. note 3:: + If a sensors has multiple identical features names (see #2280), then + Glances will add a suffix to the feature name. + For example, if you have one sensor with two Composite features, the + second one will be named Composite_1. + +.. note 4:: + The plugin could crash on some operating system (FreeBSD) with the + TCP or UDP blackhole option > 0 (see issue #2106). In this case, you + should disable the sensors (--disable-plugin sensors or from the + configuration file). \ No newline at end of file diff --git a/docs/aoa/smart.rst b/docs/aoa/smart.rst new file mode 100644 index 0000000000..cec758e7f5 --- /dev/null +++ b/docs/aoa/smart.rst @@ -0,0 +1,54 @@ +.. _smart: + +SMART +===== + +*Availability: all but Mac OS* + +*Dependency: this plugin uses the optional pySMART Python lib* + +This plugin is disable by default, please use the --enable-plugin smart option +to enable it. + +.. image:: ../_static/smart.png + +Glances displays all the SMART attributes. + +How to read the information: + +- The first line display the name and model of the device +- The first column is the SMART attribute name +- The second column is the SMART attribute raw value + +.. warning:: + This plugin needs administrator rights. Please run Glances as root/admin. + +Also, you can hide driver using regular expressions. + +To hide device you should use the hide option: + +.. code-block:: ini + + [smart] + hide=.*Hide_this_device.* + +It is also possible to configure a white list of devices to display. +Example to show only the specified drive: + +.. code-block:: ini + + [smart] + show=.*Show_this_device.* + +Filtering is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +.. _regex101: https://regex101.com/ + +You can also hide attributes, for example Self-tests, Errors, etc. Use a comma separated list. + +.. code-block:: ini + + [smart] + hide_attributes=attribute_name1,attribute_name2 diff --git a/docs/aoa/vms.rst b/docs/aoa/vms.rst new file mode 100644 index 0000000000..f3d77d3fb2 --- /dev/null +++ b/docs/aoa/vms.rst @@ -0,0 +1,36 @@ +.. _vms: + +VMs +=== + +Glances ``vms`` plugin is designed to display stats about VMs ran on the host. + +It's actually support two engines: `Multipass` and `Virsh`. + +No Python dependency is needed but Multipass and Virsh binary should be available: +- multipass should be executable from /snap/bin/multipass +- virsh should be executable from /usr/bin/virsh + +Note: CPU information is not availble for Multipass VM. Load is not available for Virsh VM. + +Configuration file options: + +.. code-block:: ini + + [vms] + disable=True + # Define the maximum VMs size name (default is 20 chars) + max_name_size=20 + # By default, Glances only display running VMs with states: + # 'Running', 'Paused', 'Starting' or 'Restarting' + # Set the following key to True to display all VMs regarding their states + all=False + +You can use all the variables ({{foo}}) available in the containers plugin. + +Filtering (for hide or show) is based on regular expression. Please be sure that your regular +expression works as expected. You can use an online tool like `regex101`_ in +order to test your regular expression. + +.. _Multipass: https://canonical.com/multipass +.. _Virsh: https://www.libvirt.org/manpages/virsh.html diff --git a/docs/aoa/wifi.rst b/docs/aoa/wifi.rst new file mode 100644 index 0000000000..31222290d2 --- /dev/null +++ b/docs/aoa/wifi.rst @@ -0,0 +1,27 @@ +.. _wifi: + +Wi-Fi +===== + +*Availability: Linux (with an /proc/net/wireless file) only* + +.. image:: ../_static/wifi.png + +In the configuration file, you can define signal quality thresholds: + +- ``"Poor"`` quality is between -100 and -85dBm +- ``"Good"`` quality between -85 and -60dBm +- ``"Excellent"`` between -60 and -40dBm + +Thresholds for the signal quality can be defined in the configuration file: + +.. code-block:: ini + + [wifi] + disable=False + careful=-65 + warning=-75 + critical=-85 + +You can disable this plugin using the ``--disable-plugin wifi`` option or by +hitting the ``W`` key from the user interface. diff --git a/docs/api/mcp.rst b/docs/api/mcp.rst new file mode 100644 index 0000000000..bf7c2f7cd4 --- /dev/null +++ b/docs/api/mcp.rst @@ -0,0 +1,181 @@ +.. _api_mcp: + +MCP (Model Context Protocol) server +===================================== + +Glances can expose its system monitoring data through a +`Model Context Protocol `_ (MCP) server, +allowing AI assistants (Claude, Cursor, VS Code Copilot, …) to query +real-time metrics and generate structured analyses directly from their chat +interface. + +The MCP server is mounted alongside the standard RESTful API when the web +server is started with the ``--enable-mcp`` flag. It uses **Server-Sent +Events** (SSE) as its transport layer, which means any MCP-compatible client +that supports SSE can connect to it. + +Requirements +------------ + +The ``mcp`` Python package must be installed: + +.. code-block:: bash + + pip install 'glances[mcp]' + +Start the MCP server +-------------------- + +Add ``--enable-mcp`` to any Glances web-server command: + +.. code-block:: bash + + glances -w --enable-mcp + +The MCP server is then reachable at ``http://localhost:61208/mcp``. + +The SSE endpoint used by MCP clients is: + +.. code-block:: text + + http://localhost:61208/mcp/sse + +To change the mount path (default: ``/mcp``): + +.. code-block:: bash + + glances -w --enable-mcp --mcp-path /monitoring/mcp + +Authentication +-------------- + +The MCP endpoint inherits the authentication policy of the web server. +When Glances is started with ``--password``, every MCP request must carry +valid credentials — either **HTTP Basic Auth** or a **JWT Bearer token** +(see :ref:`api_restful` for how to obtain a JWT token). + +When no password is configured the MCP endpoint is open. + +Resources +--------- + +MCP resources are read-only data sources that a client can list and read. + +Static resources +~~~~~~~~~~~~~~~~ + +============================================ ================================================ +URI Description +============================================ ================================================ +``glances://plugins`` JSON list of all active plugin names +``glances://stats`` JSON object of all plugins' current statistics +``glances://limits`` JSON object of alert thresholds for all plugins +============================================ ================================================ + +Resource templates (parameterised) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +============================================== ===================================================== +URI template Description +============================================== ===================================================== +``glances://stats/{plugin}`` Current statistics for one plugin +``glances://stats/{plugin}/history`` Historical time-series for one plugin +``glances://limits/{plugin}`` Alert thresholds for one plugin +============================================== ===================================================== + +Replace ``{plugin}`` with any name returned by ``glances://plugins`` +(e.g. ``cpu``, ``mem``, ``network``, ``processlist``, …). + +Prompts +------- + +MCP prompts are pre-built analysis templates that embed live Glances data +into a system prompt ready to be sent to an LLM. + ++-----------------------------+-----------------------------------------------------+-------------------+ +| Prompt name | Description | Parameters | ++=============================+=====================================================+===================+ +| ``system_health_summary`` | Overall health report: CPU, memory, swap, | *(none)* | +| | load, filesystems, network | | ++-----------------------------+-----------------------------------------------------+-------------------+ +| ``alert_analysis`` | Analysis of active alerts with remediation steps | ``level`` | +| | | (``warning`` / | +| | | ``critical`` / | +| | | ``all``) | ++-----------------------------+-----------------------------------------------------+-------------------+ +| ``top_processes_report`` | Report on the most CPU-intensive processes | ``nb`` | +| | | (integer, | +| | | default ``10``) | ++-----------------------------+-----------------------------------------------------+-------------------+ +| ``storage_health`` | Disk usage and I/O statistics analysis | *(none)* | ++-----------------------------+-----------------------------------------------------+-------------------+ + +Connect an MCP client +--------------------- + +Claude Desktop +~~~~~~~~~~~~~~ + +Add the following entry to your ``claude_desktop_config.json`` +(``~/Library/Application Support/Claude/claude_desktop_config.json`` on macOS, +``%APPDATA%\Claude\claude_desktop_config.json`` on Windows): + +.. code-block:: json + + { + "mcpServers": { + "glances": { + "url": "http://localhost:61208/mcp/sse" + } + } + } + +For a password-protected server, use the ``headers`` field: + +.. code-block:: json + + { + "mcpServers": { + "glances": { + "url": "http://localhost:61208/mcp/sse", + "headers": { + "Authorization": "Basic " + } + } + } + } + +Python MCP client (programmatic access) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: python + + import asyncio + from mcp.client.sse import sse_client + from mcp import ClientSession + + async def main(): + async with sse_client("http://localhost:61208/mcp/sse") as (read, write): + async with ClientSession(read, write) as session: + await session.initialize() + + # List available resources + resources = await session.list_resources() + print([str(r.uri) for r in resources.resources]) + + # Read CPU stats + from pydantic import AnyUrl + result = await session.read_resource(AnyUrl("glances://stats/cpu")) + print(result.contents[0].text) + + # Run a health-summary prompt + prompt = await session.get_prompt("system_health_summary") + print(prompt.messages[0].content.text[:200]) + + asyncio.run(main()) + +.. seealso:: + + :ref:`api_restful` — RESTful/JSON API documentation + + :ref:`cmds` — full command-line reference diff --git a/docs/api/openapi.json b/docs/api/openapi.json new file mode 100644 index 0000000000..21ebfb3e58 --- /dev/null +++ b/docs/api/openapi.json @@ -0,0 +1 @@ +{"openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {"/api/4/status": {"get": {"summary": " Api Status", "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\nThis entry point should be used to check the API health.\n\nSee related issue: Web server health check endpoint #1988", "operationId": "_api_status_api_4_status_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}, "head": {"summary": " Api Status", "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\nThis entry point should be used to check the API health.\n\nSee related issue: Web server health check endpoint #1988", "operationId": "_api_status_api_4_status_head", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/events/clear/warning": {"post": {"summary": " Events Clear Warning", "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\n\nIt's a post message to clean warning events", "operationId": "_events_clear_warning_api_4_events_clear_warning_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/events/clear/all": {"post": {"summary": " Events Clear All", "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\n\nIt's a post message to clean all events", "operationId": "_events_clear_all_api_4_events_clear_all_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/processes/extended/disable": {"post": {"summary": " Api Disable Extended Processes", "description": "Glances API RESTful implementation.\n\nDisable extended process stats\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error", "operationId": "_api_disable_extended_processes_api_4_processes_extended_disable_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/processes/extended/{pid}": {"post": {"summary": " Api Set Extended Processes", "description": "Glances API RESTful implementation.\n\nSet the extended process stats for the given PID\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error", "operationId": "_api_set_extended_processes_api_4_processes_extended__pid__post", "parameters": [{"name": "pid", "in": "path", "required": true, "schema": {"type": "string", "title": "Pid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/config": {"get": {"summary": " Api Config", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances configuration file\nHTTP/200 if OK\nHTTP/404 if others error", "operationId": "_api_config_api_4_config_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/config/{section}": {"get": {"summary": " Api Config Section", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances configuration section\nHTTP/200 if OK\nHTTP/400 if item is not found\nHTTP/404 if others error", "operationId": "_api_config_section_api_4_config__section__get", "parameters": [{"name": "section", "in": "path", "required": true, "schema": {"type": "string", "title": "Section"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/config/{section}/{item}": {"get": {"summary": " Api Config Section Item", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances configuration section/item\nHTTP/200 if OK\nHTTP/400 if item is not found\nHTTP/404 if others error", "operationId": "_api_config_section_item_api_4_config__section___item__get", "parameters": [{"name": "section", "in": "path", "required": true, "schema": {"type": "string", "title": "Section"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/args": {"get": {"summary": " Api Args", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances command line arguments\nHTTP/200 if OK\nHTTP/404 if others error", "operationId": "_api_args_api_4_args_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/args/{item}": {"get": {"summary": " Api Args Item", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances command line arguments item\nHTTP/200 if OK\nHTTP/400 if item is not found\nHTTP/404 if others error", "operationId": "_api_args_item_api_4_args__item__get", "parameters": [{"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/help": {"get": {"summary": " Api Help", "description": "Glances API RESTful implementation.\n\nReturn the help data or 404 error.", "operationId": "_api_help_api_4_help_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/all": {"get": {"summary": " Api All", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of all the plugins\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_all_api_4_all_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/all/limits": {"get": {"summary": " Api All Limits", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of all the plugins limits\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_all_limits_api_4_all_limits_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/all/views": {"get": {"summary": " Api All Views", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of all the plugins views\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_all_views_api_4_all_views_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/pluginslist": {"get": {"summary": " Api Plugins", "description": "Glances API RESTFul implementation.\n\n@api {get} /api/%s/pluginslist Get plugins list\n@apiVersion 2.0\n@apiName pluginslist\n@apiGroup plugin\n\n@apiSuccess {String[]} Plugins list.\n\n@apiSuccessExample Success-Response:\n HTTP/1.1 200 OK\n [\n \"load\",\n \"help\",\n \"ip\",\n \"memswap\",\n \"processlist\",\n ...\n ]\n\n @apiError Cannot get plugin list.\n\n @apiErrorExample Error-Response:\n HTTP/1.1 404 Not Found", "operationId": "_api_plugins_api_4_pluginslist_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/serverslist": {"get": {"summary": " Api Servers List", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the servers list (for browser mode)\nHTTP/200 if OK", "operationId": "_api_servers_list_api_4_serverslist_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/processes/extended": {"get": {"summary": " Api Get Extended Processes", "description": "Glances API RESTful implementation.\n\nGet the extended process stats (if set before)\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error", "operationId": "_api_get_extended_processes_api_4_processes_extended_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/processes/{pid}": {"get": {"summary": " Api Get Processes", "description": "Glances API RESTful implementation.\n\nGet the process stats for the given PID\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error", "operationId": "_api_get_processes_api_4_processes__pid__get", "parameters": [{"name": "pid", "in": "path", "required": true, "schema": {"type": "string", "title": "Pid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}": {"get": {"summary": " Api", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_api_4__plugin__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/history": {"get": {"summary": " Api History", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin history\nLimit to the last nb items (all if nb=0)\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_history_api_4__plugin__history_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "nb", "in": "query", "required": false, "schema": {"type": "integer", "default": 0, "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/history/{nb}": {"get": {"summary": " Api History", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin history\nLimit to the last nb items (all if nb=0)\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_history_api_4__plugin__history__nb__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "nb", "in": "path", "required": true, "schema": {"type": "integer", "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/top/{nb}": {"get": {"summary": " Api Top", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin limited to the top nb items.\nIt is used to reduce the payload of the HTTP response (example: processlist).\n\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_top_api_4__plugin__top__nb__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "nb", "in": "path", "required": true, "schema": {"type": "integer", "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/limits": {"get": {"summary": " Api Limits", "description": "Glances API RESTful implementation.\n\nReturn the JSON limits of a given plugin\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_limits_api_4__plugin__limits_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/views": {"get": {"summary": " Api Views", "description": "Glances API RESTful implementation.\n\nReturn the JSON views of a given plugin\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_views_api_4__plugin__views_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}": {"get": {"summary": " Api Item", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_api_4__plugin___item__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/views": {"get": {"summary": " Api Item Views", "description": "Glances API RESTful implementation.\n\nReturn the JSON view representation of the couple plugin/item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_views_api_4__plugin___item__views_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/history": {"get": {"summary": " Api Item History", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/history of item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_history_api_4__plugin___item__history_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "nb", "in": "query", "required": false, "schema": {"type": "integer", "default": 0, "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/history/{nb}": {"get": {"summary": " Api Item History", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/history of item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_history_api_4__plugin___item__history__nb__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "nb", "in": "path", "required": true, "schema": {"type": "integer", "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/description": {"get": {"summary": " Api Item Description", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/item description\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_description_api_4__plugin___item__description_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/unit": {"get": {"summary": " Api Item Unit", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/item unit\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_unit_api_4__plugin___item__unit_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/value/{value}": {"get": {"summary": " Api Value", "description": "Glances API RESTful implementation.\n\nReturn the process stats (dict) for the given item=value\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_value_api_4__plugin___item__value__value__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "value", "in": "path", "required": true, "schema": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "number"}], "title": "Value"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/{key}": {"get": {"summary": " Api Key", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of plugin/item/key\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_key_api_4__plugin___item___key__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/{key}/views": {"get": {"summary": " Api Key Views", "description": "Glances API RESTful implementation.\n\nReturn the JSON view representation of plugin/item/key\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_key_views_api_4__plugin___item___key__views_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": " Index", "description": "Return main index.html (/) file.\n\nParameters are available through the request object.\nExample: http://localhost:61208/?refresh=5\n\nNote: This function is only called the first time the page is loaded.", "operationId": "_index__get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}}, "components": {"schemas": {"HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, "input": {"title": "Input"}, "ctx": {"type": "object", "title": "Context"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}}} \ No newline at end of file diff --git a/docs/api/python.rst b/docs/api/python.rst new file mode 100644 index 0000000000..bfd23be7a3 --- /dev/null +++ b/docs/api/python.rst @@ -0,0 +1,1593 @@ +.. _api: + +Python API documentation +======================== + +This documentation describes the Glances Python API. + +Note: This API is only available in Glances 4.4.0 or higher. + + +TL;DR +----- + +You can access the Glances API by importing the `glances.api` module and creating an +instance of the `GlancesAPI` class. This instance provides access to all Glances plugins +and their fields. For example, to access the CPU plugin and its total field, you can +use the following code: + +.. code-block:: python + + >>> from glances import api + >>> gl = api.GlancesAPI() + >>> gl.cpu + {'cpucore': 16, + 'ctx_switches': 400275193, + 'guest': 0.0, + 'idle': 93.4, + 'interrupts': 279831071, + 'iowait': 0.3, + 'irq': 0.0, + 'nice': 0.0, + 'soft_interrupts': 112210940, + 'steal': 0.0, + 'syscalls': 0, + 'system': 4.4, + 'total': 5.7, + 'user': 1.9} + >>> gl.cpu.get("total") + 5.7 + >>> gl.mem.get("used") + 11610404872 + >>> gl.auto_unit(gl.mem.get("used")) + 10.8G + +If the stats return a list of items (like network interfaces or processes), you can +access them by their name: + +.. code-block:: python + + >>> gl.network.keys() + ['wlp0s20f3'] + >>> gl.network["wlp0s20f3"] + {'alias': None, + 'bytes_all': 144, + 'bytes_all_gauge': 7642237288, + 'bytes_all_rate_per_sec': 562.0, + 'bytes_recv': 144, + 'bytes_recv_gauge': 7236972362, + 'bytes_recv_rate_per_sec': 562.0, + 'bytes_sent': 0, + 'bytes_sent_gauge': 405264926, + 'bytes_sent_rate_per_sec': 0.0, + 'interface_name': 'wlp0s20f3', + 'key': 'interface_name', + 'speed': 0, + 'time_since_update': 0.2560842037200928} + +Init Glances Python API +----------------------- + +Init the Glances API: + +.. code-block:: python + + >>> from glances import api + >>> gl = api.GlancesAPI() + +Get Glances plugins list +------------------------ + +Get the plugins list: + +.. code-block:: python + + >>> gl.plugins() + ['alert', 'ports', 'diskio', 'containers', 'processcount', 'programlist', 'gpu', 'percpu', 'system', 'network', 'cpu', 'amps', 'processlist', 'load', 'sensors', 'uptime', 'now', 'fs', 'wifi', 'ip', 'help', 'version', 'psutilversion', 'core', 'mem', 'folders', 'quicklook', 'memswap'] + +Glances alert +------------- + +Alert stats: + +.. code-block:: python + + >>> type(gl.alert) + + >>> gl.alert + [{'avg': 84.95920654221204, + 'begin': 1772894442, + 'count': 2, + 'desc': '', + 'end': -1, + 'global_msg': 'High swap (paging) usage', + 'max': 84.95920654221204, + 'min': 84.95920654221204, + 'sort': 'memory_percent', + 'state': 'WARNING', + 'sum': 169.9184130844241, + 'top': [], + 'type': 'MEMSWAP'}, + {'avg': 70.64898040310717, + 'begin': 1772894442, + 'count': 2, + 'desc': '', + 'end': -1, + 'global_msg': 'High swap (paging) usage', + 'max': 70.70363122278216, + 'min': 70.59432958343217, + 'sort': 'memory_percent', + 'state': 'WARNING', + 'sum': 141.29796080621435, + 'top': [], + 'type': 'MEM'}] + +Alert fields description: + +* begin: Begin timestamp of the event +* end: End timestamp of the event (or -1 if ongoing) +* state: State of the event (WARNING|CRITICAL) +* type: Type of the event (CPU|LOAD|MEM) +* max: Maximum value during the event period +* avg: Average value during the event period +* min: Minimum value during the event period +* sum: Sum of the values during the event period +* count: Number of values during the event period +* top: Top 3 processes name during the event period +* desc: Description of the event +* sort: Sort key of the top processes +* global_msg: Global alert message + +Alert limits: + +.. code-block:: python + + >>> gl.alert.limits + {'alert_disable': ['False'], 'history_size': 1200.0} + +Glances ports +------------- + +Ports stats: + +.. code-block:: python + + >>> type(gl.ports) + + >>> gl.ports + [{'description': 'DefaultGateway', + 'host': '192.168.0.254', + 'indice': 'port_0', + 'port': 0, + 'refresh': 30, + 'rtt_warning': None, + 'status': 0.014996, + 'timeout': 3}] + +Ports fields description: + +* host: Measurement is be done on this host (or IP address) +* port: Measurement is be done on this port (0 for ICMP) +* description: Human readable description for the host/port +* refresh: Refresh time (in seconds) for this host/port +* timeout: Timeout (in seconds) for the measurement +* status: Measurement result (in seconds) +* rtt_warning: Warning threshold (in seconds) for the measurement +* indice: Unique indice for the host/port + +Ports limits: + +.. code-block:: python + + >>> gl.ports.limits + {'history_size': 1200.0, + 'ports_disable': ['False'], + 'ports_port_default_gateway': ['True'], + 'ports_refresh': 30.0, + 'ports_timeout': 3.0} + +Glances diskio +-------------- + +Diskio stats: + +.. code-block:: python + + >>> type(gl.diskio) + + >>> gl.diskio + Return a dict of dict with key= + >>> gl.diskio.keys() + ['nvme0n1', 'nvme0n1p1', 'nvme0n1p2', 'nvme0n1p3', 'dm-0', 'dm-1'] + >>> gl.diskio.get("nvme0n1") + {'disk_name': 'nvme0n1', + 'key': 'disk_name', + 'read_bytes': 21177210368, + 'read_count': 832513, + 'read_latency': 0, + 'read_time': 241031, + 'write_bytes': 147585041408, + 'write_count': 3553571, + 'write_latency': 0, + 'write_time': 6937742} + +Diskio fields description: + +* disk_name: Disk name. +* read_count: Number of reads. +* write_count: Number of writes. +* read_bytes: Number of bytes read. +* write_bytes: Number of bytes written. +* read_time: Time spent reading. +* write_time: Time spent writing. +* read_latency: Mean time spent reading per operation. +* write_latency: Mean time spent writing per operation. + +Diskio limits: + +.. code-block:: python + + >>> gl.diskio.limits + {'diskio_disable': ['False'], + 'diskio_hide': ['loop.*', '/dev/loop.*'], + 'diskio_hide_zero': ['False'], + 'diskio_rx_latency_careful': 10.0, + 'diskio_rx_latency_critical': 50.0, + 'diskio_rx_latency_warning': 20.0, + 'diskio_tx_latency_careful': 10.0, + 'diskio_tx_latency_critical': 50.0, + 'diskio_tx_latency_warning': 20.0, + 'history_size': 1200.0} + +Glances containers +------------------ + +Containers stats: + +.. code-block:: python + + >>> type(gl.containers) + + >>> gl.containers + [] + +Containers fields description: + +* name: Container name +* id: Container ID +* image: Container image +* status: Container status +* created: Container creation date +* command: Container command +* cpu_percent: Container CPU consumption +* memory_inactive_file: Container memory inactive file +* memory_limit: Container memory limit +* memory_usage: Container memory usage +* io_rx: Container IO bytes read rate +* io_wx: Container IO bytes write rate +* network_rx: Container network RX bitrate +* network_tx: Container network TX bitrate +* ports: Container ports +* uptime: Container uptime +* engine: Container engine (Docker and Podman are currently supported) +* pod_name: Pod name (only with Podman) +* pod_id: Pod ID (only with Podman) + +Containers limits: + +.. code-block:: python + + >>> gl.containers.limits + {'containers_all': ['False'], + 'containers_disable': ['False'], + 'containers_disable_stats': ['command'], + 'containers_max_name_size': 20.0, + 'history_size': 1200.0} + +Glances processcount +-------------------- + +Processcount stats: + +.. code-block:: python + + >>> type(gl.processcount) + + >>> gl.processcount + {'pid_max': 0, 'running': 1, 'sleeping': 441, 'thread': 2347, 'total': 588} + >>> gl.processcount.keys() + ['total', 'running', 'sleeping', 'thread', 'pid_max'] + >>> gl.processcount.get("total") + 588 + +Processcount fields description: + +* total: Total number of processes +* running: Total number of running processes +* sleeping: Total number of sleeping processes +* thread: Total number of threads +* pid_max: Maximum number of processes + +Processcount limits: + +.. code-block:: python + + >>> gl.processcount.limits + {'history_size': 1200.0, 'processcount_disable': ['False']} + +Glances gpu +----------- + +Gpu stats: + +.. code-block:: python + + >>> type(gl.gpu) + + >>> gl.gpu + Return a dict of dict with key= + >>> gl.gpu.keys() + ['intel0', 'intel1'] + >>> gl.gpu.get("intel0") + {'fan_speed': None, + 'gpu_id': 'intel0', + 'key': 'gpu_id', + 'mem': None, + 'name': 'UHD Graphics', + 'proc': 0, + 'temperature': None} + +Gpu fields description: + +* gpu_id: GPU identification +* name: GPU name +* mem: Memory consumption +* proc: GPU processor consumption +* temperature: GPU temperature +* fan_speed: GPU fan speed + +Gpu limits: + +.. code-block:: python + + >>> gl.gpu.limits + {'gpu_disable': ['False'], + 'gpu_mem_careful': 50.0, + 'gpu_mem_critical': 90.0, + 'gpu_mem_warning': 70.0, + 'gpu_proc_careful': 50.0, + 'gpu_proc_critical': 90.0, + 'gpu_proc_warning': 70.0, + 'gpu_temperature_careful': 60.0, + 'gpu_temperature_critical': 80.0, + 'gpu_temperature_warning': 70.0, + 'history_size': 1200.0} + +Glances percpu +-------------- + +Percpu stats: + +.. code-block:: python + + >>> type(gl.percpu) + + >>> gl.percpu + Return a dict of dict with key= + >>> gl.percpu.keys() + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + >>> gl.percpu.get("0") + {'cpu_number': 0, + 'dpc': None, + 'guest': 0.0, + 'guest_nice': 0.0, + 'idle': 28.0, + 'interrupt': None, + 'iowait': 0.0, + 'irq': 0.0, + 'key': 'cpu_number', + 'nice': 0.0, + 'softirq': 0.0, + 'steal': 0.0, + 'system': 10.0, + 'total': 72.0, + 'user': 0.0} + +Percpu fields description: + +* cpu_number: CPU number +* total: Sum of CPU percentages (except idle) for current CPU number. +* system: Percent time spent in kernel space. System CPU time is the time spent running code in the Operating System kernel. +* user: CPU percent time spent in user space. User CPU time is the time spent on the processor running your program's code (or code in libraries). +* iowait: *(Linux)*: percent time spent by the CPU waiting for I/O operations to complete. +* idle: percent of CPU used by any program. Every program or task that runs on a computer system occupies a certain amount of processing time on the CPU. If the CPU has completed all tasks it is idle. +* irq: *(Linux and BSD)*: percent time spent servicing/handling hardware/software interrupts. Time servicing interrupts (hardware + software). +* nice: *(Unix)*: percent time occupied by user level processes with a positive nice value. The time the CPU has spent running users' processes that have been *niced*. +* steal: *(Linux)*: percentage of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor. +* guest: *(Linux)*: percent of time spent running a virtual CPU for guest operating systems under the control of the Linux kernel. +* guest_nice: *(Linux)*: percent of time spent running a niced guest (virtual CPU). +* softirq: *(Linux)*: percent of time spent handling software interrupts. +* dpc: *(Windows)*: percent of time spent handling deferred procedure calls. +* interrupt: *(Windows)*: percent of time spent handling software interrupts. + +Percpu limits: + +.. code-block:: python + + >>> gl.percpu.limits + {'history_size': 1200.0, + 'percpu_disable': ['False'], + 'percpu_iowait_careful': 50.0, + 'percpu_iowait_critical': 90.0, + 'percpu_iowait_warning': 70.0, + 'percpu_max_cpu_display': 4.0, + 'percpu_system_careful': 50.0, + 'percpu_system_critical': 90.0, + 'percpu_system_warning': 70.0, + 'percpu_user_careful': 50.0, + 'percpu_user_critical': 90.0, + 'percpu_user_warning': 70.0} + +Glances system +-------------- + +System stats: + +.. code-block:: python + + >>> type(gl.system) + + >>> gl.system + {'hostname': 'nicolargo-xps15', + 'hr_name': 'Ubuntu 24.04 64bit / Linux 6.17.0-14-generic', + 'linux_distro': 'Ubuntu 24.04', + 'os_name': 'Linux', + 'os_version': '6.17.0-14-generic', + 'platform': '64bit'} + >>> gl.system.keys() + ['os_name', 'hostname', 'platform', 'os_version', 'linux_distro', 'hr_name'] + >>> gl.system.get("os_name") + 'Linux' + +System fields description: + +* os_name: Operating system name +* hostname: Hostname +* platform: Platform (32 or 64 bits) +* linux_distro: Linux distribution +* os_version: Operating system version +* hr_name: Human readable operating system name + +System limits: + +.. code-block:: python + + >>> gl.system.limits + {'history_size': 1200.0, 'system_disable': ['False'], 'system_refresh': 60} + +Glances network +--------------- + +Network stats: + +.. code-block:: python + + >>> type(gl.network) + + >>> gl.network + Return a dict of dict with key= + >>> gl.network.keys() + ['wlp0s20f3'] + >>> gl.network.get("wlp0s20f3") + {'alias': None, + 'bytes_all': 0, + 'bytes_all_gauge': 7642237288, + 'bytes_all_rate_per_sec': 0.0, + 'bytes_recv': 0, + 'bytes_recv_gauge': 7236972362, + 'bytes_recv_rate_per_sec': 0.0, + 'bytes_sent': 0, + 'bytes_sent_gauge': 405264926, + 'bytes_sent_rate_per_sec': 0.0, + 'interface_name': 'wlp0s20f3', + 'key': 'interface_name', + 'speed': 0, + 'time_since_update': 0.002893686294555664} + +Network fields description: + +* interface_name: Interface name. +* alias: Interface alias name (optional). +* bytes_recv: Number of bytes received. +* bytes_sent: Number of bytes sent. +* bytes_all: Number of bytes received and sent. +* speed: Maximum interface speed (in bit per second). Can return 0 on some operating-system. +* is_up: Is the interface up ? + +Network limits: + +.. code-block:: python + + >>> gl.network.limits + {'history_size': 1200.0, + 'network_disable': ['False'], + 'network_hide': ['docker.*', 'lo'], + 'network_hide_no_ip': ['True'], + 'network_hide_no_up': ['True'], + 'network_hide_zero': ['False'], + 'network_rx_careful': 70.0, + 'network_rx_critical': 90.0, + 'network_rx_warning': 80.0, + 'network_tx_careful': 70.0, + 'network_tx_critical': 90.0, + 'network_tx_warning': 80.0} + +Glances cpu +----------- + +Cpu stats: + +.. code-block:: python + + >>> type(gl.cpu) + + >>> gl.cpu + {'cpucore': 16, + 'ctx_switches': 400275193, + 'guest': 0.0, + 'idle': 93.4, + 'interrupts': 279831071, + 'iowait': 0.3, + 'irq': 0.0, + 'nice': 0.0, + 'soft_interrupts': 112210940, + 'steal': 0.0, + 'syscalls': 0, + 'system': 4.4, + 'total': 5.7, + 'user': 1.9} + >>> gl.cpu.keys() + ['total', 'user', 'nice', 'system', 'idle', 'iowait', 'irq', 'steal', 'guest', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls', 'cpucore'] + >>> gl.cpu.get("total") + 5.7 + +Cpu fields description: + +* total: Sum of all CPU percentages (except idle). +* system: Percent time spent in kernel space. System CPU time is the time spent running code in the Operating System kernel. +* user: CPU percent time spent in user space. User CPU time is the time spent on the processor running your program's code (or code in libraries). +* iowait: *(Linux)*: percent time spent by the CPU waiting for I/O operations to complete. +* dpc: *(Windows)*: time spent servicing deferred procedure calls (DPCs) +* idle: percent of CPU used by any program. Every program or task that runs on a computer system occupies a certain amount of processing time on the CPU. If the CPU has completed all tasks it is idle. +* irq: *(Linux and BSD)*: percent time spent servicing/handling hardware/software interrupts. Time servicing interrupts (hardware + software). +* nice: *(Unix)*: percent time occupied by user level processes with a positive nice value. The time the CPU has spent running users' processes that have been *niced*. +* steal: *(Linux)*: percentage of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor. +* guest: *(Linux)*: time spent running a virtual CPU for guest operating systems under the control of the Linux kernel. +* ctx_switches: number of context switches (voluntary + involuntary) per second. A context switch is a procedure that a computer's CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict. +* interrupts: number of interrupts per second. +* soft_interrupts: number of software interrupts per second. Always set to 0 on Windows and SunOS. +* syscalls: number of system calls per second. Always 0 on Linux OS. +* cpucore: Total number of CPU core. +* time_since_update: Number of seconds since last update. +* total_min: Minimum total observed since Glances startup. +* total_max: Maximum total observed since Glances startup. +* total_mean: Mean (average) total computed from the history. + +Cpu limits: + +.. code-block:: python + + >>> gl.cpu.limits + {'cpu_ctx_switches_careful': 640000.0, + 'cpu_ctx_switches_critical': 800000.0, + 'cpu_ctx_switches_warning': 720000.0, + 'cpu_disable': ['False'], + 'cpu_iowait_careful': 5.0, + 'cpu_iowait_critical': 6.25, + 'cpu_iowait_warning': 5.625, + 'cpu_steal_careful': 50.0, + 'cpu_steal_critical': 90.0, + 'cpu_steal_warning': 70.0, + 'cpu_system_careful': 50.0, + 'cpu_system_critical': 90.0, + 'cpu_system_log': ['False'], + 'cpu_system_warning': 70.0, + 'cpu_total_careful': 65.0, + 'cpu_total_critical': 85.0, + 'cpu_total_log': ['True'], + 'cpu_total_warning': 75.0, + 'cpu_user_careful': 50.0, + 'cpu_user_critical': 90.0, + 'cpu_user_log': ['False'], + 'cpu_user_warning': 70.0, + 'history_size': 1200.0} + +Glances amps +------------ + +Amps stats: + +.. code-block:: python + + >>> type(gl.amps) + + >>> gl.amps + Return a dict of dict with key= + >>> gl.amps.keys() + ['Dropbox', 'Python', 'Conntrack', 'Nginx', 'Systemd', 'SystemV'] + >>> gl.amps.get("Dropbox") + {'count': 0, + 'countmax': None, + 'countmin': 1.0, + 'key': 'name', + 'name': 'Dropbox', + 'refresh': 3.0, + 'regex': True, + 'result': None, + 'timer': 0.22821807861328125} + +Amps fields description: + +* name: AMP name. +* result: AMP result (a string). +* refresh: AMP refresh interval. +* timer: Time until next refresh. +* count: Number of matching processes. +* countmin: Minimum number of matching processes. +* countmax: Maximum number of matching processes. + +Amps limits: + +.. code-block:: python + + >>> gl.amps.limits + {'amps_disable': ['False'], 'history_size': 1200.0} + +Glances processlist +------------------- + +Processlist stats: + +.. code-block:: python + + >>> type(gl.processlist) + + >>> gl.processlist + Return a dict of dict with key= + >>> gl.processlist.keys() + [383172, 381638, 7363, 382286, 7114, 7465, 9438, 393293, 7510, 7472, 9549, 410004, 409081, 143728, 7492, 420486, 5889, 7479, 510020, 7419, 508725, 379849, 3064, 508724, 9326, 9525, 508727, 508761, 9172, 279745, 381625, 420439, 508750, 542260, 382453, 418378, 539139, 541609, 540112, 383079, 9491, 7373, 3653, 489224, 382500, 542225, 382782, 430486, 6528, 9898, 509915, 7345, 8061, 14270, 540832, 6882, 6312, 9397, 14036, 6107, 6527, 382501, 710, 382285, 2738, 7341, 8901, 6189, 6021, 6921, 3078, 6637, 6894, 6037, 6502, 6378, 382454, 6076, 2821, 6665, 6070, 3649, 1, 9329, 3050, 6013, 6214, 10325, 5856, 2755, 6917, 6094, 6061, 2750, 6068, 45075, 5502, 6273, 10323, 9328, 5655, 2751, 6495, 5523, 2726, 10326, 6087, 6064, 2719, 6112, 7631, 3114, 5472, 6079, 2558, 20127, 5525, 2822, 5526, 3432, 3069, 2958, 6466, 2747, 6058, 6092, 3727, 133846, 6066, 44462, 2931, 133836, 3659, 2740, 768, 5519, 2933, 2722, 6250, 2559, 6135, 6090, 10324, 6342, 6329, 489460, 5587, 2715, 5842, 2748, 6419, 2557, 5537, 6280, 5993, 510535, 2745, 5888, 6081, 6316, 6223, 6059, 5853, 6352, 6210, 5161, 5160, 5591, 6082, 5803, 2714, 5635, 6022, 530485, 2733, 303250, 370413, 113947, 5812, 2855, 6517, 488505, 9925, 113930, 54481, 5902, 2713, 5520, 113966, 382078, 2556, 2718, 3855, 6925, 2568, 2743, 542221, 113969, 3660, 3691, 3673, 442184, 537689, 5598, 3666, 3669, 542224, 5509, 3248, 3058, 3061, 7207, 2803, 2566, 9344, 5195, 3249, 381929, 9874, 2, 3, 4, 5, 6, 7, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 127, 129, 132, 133, 134, 135, 136, 137, 139, 141, 142, 143, 144, 145, 146, 147, 148, 151, 152, 153, 154, 155, 156, 177, 178, 201, 221, 223, 251, 259, 260, 261, 262, 263, 264, 265, 267, 268, 352, 354, 357, 358, 359, 360, 437, 438, 439, 600, 601, 603, 605, 610, 643, 644, 742, 743, 776, 942, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 1027, 1162, 1235, 1302, 1303, 1365, 1370, 1371, 1372, 1373, 1454, 1460, 1479, 1484, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1957, 1958, 1959, 1960, 1961, 1962, 1964, 1965, 1966, 1967, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2025, 2026, 2027, 2028, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2068, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2084, 2085, 2086, 2087, 2088, 2090, 2092, 2093, 2096, 2097, 2099, 3695, 3756, 3757, 3758, 3759, 3760, 3761, 3762, 3763, 3999, 113942, 399089, 440259, 475463, 480360, 482606, 488234, 488241, 490944, 491001, 506049, 508052, 512068, 513127, 514153, 514751, 518709, 519529, 520729, 521012, 521148, 522207, 522719, 523021, 523761, 524769, 525889, 528650, 528849, 529064, 529528, 530191, 530295, 531044, 531056, 531875, 533982, 534225, 534574, 534668, 535180, 535364, 535380, 535381, 535541, 535556, 537463, 537464, 538033, 538354, 538828, 539900, 540295, 540869, 540985, 541695, 541960, 541961, 541962, 542149] + >>> gl.processlist.get("383172") + {'cmdline': ['/home/nicolargo/.cache/cloud-code/cloudcode_cli/cloudcode_cli/5d90276a/cloudcode_cli', + 'duet', + '-trace', + '-logtostderr'], + 'cpu_percent': 0.0, + 'cpu_times': {'children_system': 0.0, + 'children_user': 0.0, + 'iowait': 0.0, + 'system': 10.87, + 'user': 207.36}, + 'gids': {'effective': 1000, 'real': 1000, 'saved': 1000}, + 'io_counters': [580788224, 4096, 580788224, 4096, 1], + 'key': 'pid', + 'memory_info': {'data': 3313868800, + 'dirty': 0, + 'lib': 0, + 'rss': 1551958016, + 'shared': 24248320, + 'text': 99307520, + 'vms': 5210402816}, + 'memory_percent': 9.450925135361175, + 'name': 'cloudcode_cli', + 'nice': 0, + 'num_threads': 21, + 'pid': 383172, + 'status': 'S', + 'time_since_update': 0.524019718170166, + 'username': 'nicolargo'} + +Processlist fields description: + +* pid: Process identifier (ID) +* name: Process name +* cmdline: Command line with arguments +* username: Process owner +* num_threads: Number of threads +* cpu_percent: Process CPU consumption (returned value can be > 100.0 in case of a process running multiple threads on different CPU cores) +* memory_percent: Process memory consumption +* memory_info: Process memory information (dict with rss, vms, shared, text, lib, data, dirty keys) +* status: Process status +* nice: Process nice value +* cpu_times: Process CPU times (dict with user, system, iowait keys) +* gids: Process group IDs (dict with real, effective, saved keys) +* io_counters: Process IO counters (list with read_count, write_count, read_bytes, write_bytes, io_tag keys) +* cpu_num: CPU core number where the process is currently executing (0-based indexing) + +Processlist limits: + +.. code-block:: python + + >>> gl.processlist.limits + {'history_size': 1200.0, + 'processlist_cpu_careful': 50.0, + 'processlist_cpu_critical': 90.0, + 'processlist_cpu_warning': 70.0, + 'processlist_disable': ['False'], + 'processlist_disable_stats': ['cpu_num'], + 'processlist_mem_careful': 50.0, + 'processlist_mem_critical': 90.0, + 'processlist_mem_warning': 70.0, + 'processlist_nice_warning': ['-20', + '-19', + '-18', + '-17', + '-16', + '-15', + '-14', + '-13', + '-12', + '-11', + '-10', + '-9', + '-8', + '-7', + '-6', + '-5', + '-4', + '-3', + '-2', + '-1', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19'], + 'processlist_status_critical': ['Z', 'D'], + 'processlist_status_ok': ['R', 'W', 'P', 'I']} + +Glances load +------------ + +Load stats: + +.. code-block:: python + + >>> type(gl.load) + + >>> gl.load + {'cpucore': 16, + 'min1': 0.43017578125, + 'min15': 0.5341796875, + 'min5': 0.48779296875} + >>> gl.load.keys() + ['min1', 'min5', 'min15', 'cpucore'] + >>> gl.load.get("min1") + 0.43017578125 + +Load fields description: + +* min1: Average sum of the number of processes waiting in the run-queue plus the number currently executing over 1 minute. +* min5: Average sum of the number of processes waiting in the run-queue plus the number currently executing over 5 minutes. +* min15: Average sum of the number of processes waiting in the run-queue plus the number currently executing over 15 minutes. +* cpucore: Total number of CPU core. +* min1_min: Minimum min1 observed since Glances startup. +* min1_max: Maximum min1 observed since Glances startup. +* min1_mean: Mean (average) min1 computed from the history. + +Load limits: + +.. code-block:: python + + >>> gl.load.limits + {'history_size': 1200.0, + 'load_careful': 0.7, + 'load_critical': 5.0, + 'load_disable': ['False'], + 'load_warning': 1.0} + +Glances sensors +--------------- + +Sensors stats: + +.. code-block:: python + + >>> type(gl.sensors) + + >>> gl.sensors + Return a dict of dict with key=