{"id":20054201,"url":"https://github.com/yaroslaff/highla","last_synced_at":"2026-01-25T16:02:02.232Z","repository":{"id":262502337,"uuid":"887305393","full_name":"yaroslaff/highla","owner":"yaroslaff","description":"Execute diagnostics when Load Average is high.","archived":false,"fork":false,"pushed_at":"2024-11-13T09:59:42.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T11:51:12.207Z","etag":null,"topics":["ddos","high-load","load","load-average","mariadb","monitoring","mysql","netstat","performance","postgresql","system-administration","top","uptime","usage"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaroslaff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-12T14:14:41.000Z","updated_at":"2024-11-13T09:59:46.000Z","dependencies_parsed_at":"2025-01-12T21:27:26.889Z","dependency_job_id":"79f2cdb6-611c-4428-9405-1c025c6b3325","html_url":"https://github.com/yaroslaff/highla","commit_stats":null,"previous_names":["yaroslaff/highla"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yaroslaff/highla","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaroslaff%2Fhighla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaroslaff%2Fhighla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaroslaff%2Fhighla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaroslaff%2Fhighla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaroslaff","download_url":"https://codeload.github.com/yaroslaff/highla/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaroslaff%2Fhighla/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28755045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T13:59:49.818Z","status":"ssl_error","status_checked_at":"2026-01-25T13:59:33.728Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddos","high-load","load","load-average","mariadb","monitoring","mysql","netstat","performance","postgresql","system-administration","top","uptime","usage"],"created_at":"2024-11-13T12:39:15.542Z","updated_at":"2026-01-25T16:02:02.195Z","avatar_url":"https://github.com/yaroslaff.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HighLA - Run diagnostics on high load average\n\nHighla checks current load average and executes set of built-in diagnostic or external script to collect data at the precise moment when load average is high.\n\n## Install\n~~~shell\n# pipx way, recommended\npipx install highla\n\n# pip3 way, obsolete. recommended to use in virtualenv\npip3 install highla\n~~~\n\n## Empty diag\nhighla has one required parameter - Load Average threshold. If current Load Average is lower than threshold, it will do nothing. If current Load Average is higher, it will run diagnostic specified in other arguments.\n\n~~~shell\n# no diag at all\n\n# trigger if LA over 20 (current LA is lower, so nothing printed)\n$ highla 20\n\n# trigger if LA over 3.5 (prints timestamp and current LA on stdout)\n$ highla 3.5\n# 2024/11/13 01:29:01 LA: 4.05\n~~~\n\n## built-in top \nprints top-N CPU-intensive processes\n\n~~~shell\n$ highla 1 --top 5\n# 2024/11/13 01:35:19 LA: 3.69\n## Top CPU usage\n  792682 wireguard-vanity-keygen 307.9%\n  877929 highla 2.0%\n  1192 irq/33-nvidia 1.0%\n  2158 asterisk 1.0%\n  3767 ibus-portal 1.0%\n\n~~~\n\n## built-in netstat\n\nPrints summary and all connections in ESTABLISHED/CLOSE_WAIT states\n~~~shell\n$ highla 1 --tcp\n# 2024/11/13 01:37:32 LA: 3.47\n## TCP connections: ESTABLISHED: 13, LISTEN: 41, CLOSE_WAIT: 8\n10.8.1.2:56286 31.9.10.169:443 ESTABLISHED\n10.8.1.2:44456 81.217.149.89:443 ESTABLISHED\n10.0.0.2:51832 10.0.0.5:1692 CLOSE_WAIT\n10.0.0.2:40222 10.0.0.5:1989 CLOSE_WAIT\n...\n~~~\n\n## bult-in log file comparison\nThis tool allows to detect log files which grows faster during high-la event. It accepts glob patterns (like `/var/log/apache2/*.log`, more than one pattern are allowed), measure size at first run, waits some time (`-w`, default it 5 seconds), measures size again, and prints 5 most fast growing log files and last line from each of them:\n\n~~~shell\nhighla 0.01 -w 60 --size /var/log/apache2/*log\n...\n... waiting 60 seconds before 2nd part of diagnostics\n## File sizes difference\n/var/log/apache2/example.com-access.log sz: 57312780 diff: 36997\n  109.118.67.166 - - [12/Nov/2024:20:13:45 +0100] \"GET /favicon.ico HTTP/1.1\" 200 10225 \"https://www.example.com/\" \"Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1\"\n/var/log/apache2/example.org-access.log sz: 5176826 diff: 4911\n  66.249.76.230 - - [12/Nov/2024:20:13:47 +0100] \"GET /myscript.php?ide=2283 HTTP/1.1\" 200 12352 \"-\" \"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.116 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\"\n...\n~~~\nHere we see example.com access log grows faster then others and we see last log line for further manual investigation.\n\n## External diagnostic script (e.g. to see database queries)\nIf option `--script /path/script.sh` given, highla will execute this script and print it's stdout.\n\nExample script:\n~~~\n#!/bin/sh\nmysql -u root -pNotMyRealPassword -e \"SHOW FULL PROCESSLIST\"\n~~~\n\nExample output:\n~~~shell\n## User script /root/processlist.sh\n+---------+------+-----------+------+---------+------+----------+-----------------------+----------+\n| Id      | User | Host      | db   | Command | Time | State    | Info                  | Progress |\n+---------+------+-----------+------+---------+------+----------+-----------------------+----------+\n| 3568874 | root | localhost | NULL | Query   |    0 | starting | SHOW FULL PROCESSLIST |    0.000 |\n+---------+------+-----------+------+---------+------+----------+-----------------------+----------+\n~~~\n\n## Running in loop\nYou can start highla in tmux/screen background session or as systemd service running in loop.\n\nIn example below we run it in a loop, checking LA every 60 seconds, if if LA\u003e5, it will print top-10 processes, TCP connections, fast-growing apache log files and custom script which will show mariadb processlist.  Results will be printed to stdout and file highla.log\n\n~~~\nhighla 5 -s /root/processlist.sh -w 10 --loop 60 --top 10 --tcp --size /var/log/apache2/*log | tee highla.log\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaroslaff%2Fhighla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaroslaff%2Fhighla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaroslaff%2Fhighla/lists"}