{"id":13587077,"url":"https://github.com/VladimirMarkelov/pwatch","last_synced_at":"2025-04-07T19:30:40.836Z","repository":{"id":41354580,"uuid":"265436330","full_name":"VladimirMarkelov/pwatch","owner":"VladimirMarkelov","description":"Process watcher(pwatch)","archived":false,"fork":false,"pushed_at":"2022-09-03T23:03:31.000Z","size":333,"stargazers_count":39,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T06:34:34.492Z","etag":null,"topics":["cli","command-line","command-line-tool","process","process-manager","terminal","top","watch","watcher"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VladimirMarkelov.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}},"created_at":"2020-05-20T03:12:39.000Z","updated_at":"2025-02-23T07:45:11.000Z","dependencies_parsed_at":"2022-08-25T08:11:23.107Z","dependency_job_id":null,"html_url":"https://github.com/VladimirMarkelov/pwatch","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VladimirMarkelov%2Fpwatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VladimirMarkelov%2Fpwatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VladimirMarkelov%2Fpwatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VladimirMarkelov%2Fpwatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VladimirMarkelov","download_url":"https://codeload.github.com/VladimirMarkelov/pwatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247716070,"owners_count":20984168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cli","command-line","command-line-tool","process","process-manager","terminal","top","watch","watcher"],"created_at":"2024-08-01T15:06:00.438Z","updated_at":"2025-04-07T19:30:40.487Z","avatar_url":"https://github.com/VladimirMarkelov.png","language":"Rust","funding_links":[],"categories":["Rust","Other"],"sub_categories":[],"readme":"# Process Watcher (PWatch)\n\n![Build](https://github.com/VladimirMarkelov/pwatch/workflows/Quickstart/badge.svg)\n\n- [Description](#description)\n    - [Options](#options)\n- [Short Demo](#short-demo)\n    - [Screen Explanation](#screen-explanation)\n- [Precompiled binaries](#precompiled-binaries)\n- [Graph Quality](#graph-quality)\n- [Scaling Mode](#scaling-mode)\n- [Measuring Difference](#measuring-difference)\n- [Hot Keys](#hot-keys)\n- [Dead processes](#dead-processes)\n- [Screenshot](#screenshot)\n- [License](#license)\n\n## Description\n\nPWatch provides a dynamic real-time view of running processes with historical graphs.\nThe application is akin to well-know utility `top`. But while `top` is great for quick system overview,\n`PWatch` can be used to watch one or few  processes closely. With `PWatch` one can analyze what has happened to\na process in the past, even if the process is [already dead](#dead-processes). `PWatch` does not remove dead processes from the screen,\nso it possible to check the memory and CPU usage before the process exited and `PWatch` displays how much time\nago the process finished.\n\nTo start watching processes, run `PWatch`:\n\n```\npwatch PID_LIST|REGEX [OPTIONS]\n```\n\nIf the argument contains only digits and commas, the argument is considered a PID list. Otherwise the argument is\na regular expression. Two notes about regular expressions: a) they are always case-insensitive, so `pwatch firefox`\nwill watch on `firefox`, `FireFox` and so on; b) the regex filters processes which *path to binary* matches it, not\nonly binary name, that allows to watch a set of differently-named processes started from the same directory.\n\n### Options\n\n| Short name | Long name | Description                          | Values                                                                                                  |\n| ---        | ---       | ---                                  | ---                                                                                                     |\n| v          | version   | Show application version             |                                                                                                         |\n| q          | quality   | Set [graph quality](#graph-quality)  | One of `high`, `medium` or `low`                                                                        |\n| r          | refresh   | Set refresh interval in milliseconds | Default value is `1000`, only numbers within range `250`..`10000` can be used                           |\n| s          | scale     | Select memory graph scaling mode     | `zero` - the graph display range is from `0` to `maximum`; `min`(default) - from `minimum` to `maximum` |\n| t          | title     | Set title for a process              | `cmd`(default) - process command line, `path` - path to binary, `name` - binary name                    |\n| g          | graphs    | Select which graphs to show          | `all`(default), `mem`, `cpu` |\n\n## Short Demo\n\nThe image below displays what happens to a few Firefox processes after a user clicks \"Refresh\" button in the browser:\n\n\u003cimg src=\"./images/pwatch.gif\" alt=\"Watching Firefox processes\"\u003e\n\nWhen the number of processes is low, instead of showing CPU and MEM graphs side by side (as in the example), the application\ndisplays CPU on top of MEM graph. It allows `PWatch` to provide longer usage history.\n\n### Screen Explanation\n\nThe first line is a system total numbers:\n\n```\nCPU:   0%  MEM:  33% | Total: 3  Hidden: 0  Dead: 0\n```\n\nThe line with `I/O` is the total and the change since the previous measurement(in braces) amount of read and write data.\nFor Linux it should display disk I/O, for Windows it is total I/O for the process including disks.\n\nCPU and MEM is total used amount in a range 0..100%. `Total` is the number of processes `PWatch` looks after.\n`Hidden` is the number of processes that are not displayed at this moment, but you can scroll to see them.\n`Dead` the number of processes that exited while `PWatch` is watching the processes. [Dead processes](#dead-processes) are not removed\nfrom the screen, but `PWatch` stops updating them, so dead process graph are kind of frozen.\n\nCPU and MEM graphs have the same header. The MEM one is used to describe what they show:\n\n```\n 226M|\n 225M|\n +16K|     ▂▂▂▂▂▁\n     |    █████████\n 225M|  ███████████\n          ++    --\n```\n\nNote: the graph in the example is drawn in the best quality mode. See more about [quality modes here](#graph-quality).\n\nTop and bottom values are the graph display range. The values are always exact, so it this example, the top of the\ngraph is exactly `226 MiB` and the bottom line is `225 MiB`. Please note that for CPU the bottom values is missing.\nIt is because the bottom CPU line is always `0%`, so to minimize visual noise it is hidden. For memory the bottom\nvalue may be of any value depending on [memory scaling modes](#scaling-mode).\n\nThe number under top value is the current value - it the value that `top` shows. The value is always drawn in blue\ncolor for easier reading the current consumption. The current value is just a rounded real value.\n\nThe number under the current consumption is the change since some time in the past. By default, it is the difference\nbetween the current value and previously measured. But if you [set a mark](measuring-difference), the difference is\ncalculated between the current value and the value at the time when the mark was set. This value either empty (in this\ncase is is displayed as `-`), or a number with `+`' or `-` sign.\n\nUnder the difference there is the last number - all-time maximum. It is the maximum usage of CPU and memory by the\nprocess since the monitor starts. The value can be reset with hotkey `r`.\n\nThe line of `+`'s and `-`'s marks points in time when the value changed. It may look redundant, but when changes are\nso small that the graph remains a straight line, these extra characters may come in handy.\n\n## Precompiled binaries\n\nFor Windows and Ubuntu you can download precompiled binaries from [Release page](https://github.com/VladimirMarkelov/pwatch/releases).\n\n* Windows binary tested on Windows 10.\n* musl-Linux build\n\n## Graph Quality\n\nBy default, graph are drawn in the best quality. But not every font supports used characters, so one can lower graph\ndetalization if a terminal font lack some characters. E.g., `Consolas` and `Currier New` have only 3 of required 9\ncharacters, so they can be used only for `medium` quality.\n\n| Quality | Character set                     |\n| ---     | ---                               |\n| Low     | `SPACE` and `█`(full block)       |\n| medium  | `SPACE`, `▄`(half block), and `█` |\n| high    | ` ▂▃▄▅▆▇█`                        |\n\n## Scaling Mode\n\nScaling mode is applied to memory graph only. CPU graph has only one mode: from `0%` to `100%` (if process CPU usage\nexceeds `100%`, the CPU is rescaled so the top value of the graph is always a number divisible by `100`).\n\nTo make small memory usage changes more distinguishable, from start the application displays the memory consumption\ngraph between lowest (rounded down) and highest (rounded up) usage from the values visible on the graph. Pressing\nkey `F12` switches between this mode and standard one: when the graph is scales from 0(bottom) to highest usage\nsince the monitoring starts(top).\n\n## Measuring Difference\n\nHotkey `SPACE` switches between two ways of calculating the difference. Default way shows the difference between\nthe previous and the current consumptions. After pressing `SPACE`, the message `Delta for last 0s` is show at the\ntop, `PWatch` remembers the current value, and then it shows the difference between the current and remembered \nvalue.\n\n## Hot Keys\n\n| Key                          | Description                                                                |\n| ---                          | ---                                                                        |\n| F1                           | Show/hide the short hotkey \"tooltip\" at the top of the window              |\n| F2                           | Take a screenshot |\n| F6                           | Select the displayed graphs, cycles through `all`, `mem`, and `cpu`        |\n| F7                           | Change graphs quality, cycles through `high`, `medium`, and `low`          |\n| F8                           | Removes all dead processes from the screen                                 |\n| F9                           | Switch process title: `command line`(default), `path to binary`, `binary name`  |\n| F12                          | Switch memory scaling mode: `from min to max`(default), `from 0 to max`   |\n| r                            | Reset all-time maximum: set the maximum to the maximum in visible interval|\n| SPACE                        | Set/Unset the point in time from which the usage difference is calculated |\n| q, ESC                       | Exit                                                            |\n| Arrows, PageUp, and PageDown | Scroll the list of processes if some of them are out of screen  |\n| Home                         | Scroll to the first process in the list                         |\n| End                          | Scroll so the last process in the list is visible               |\n\n## Dead processes\n\nEven when a process exits, `PWatch` does not remove the process graphs. It keeps displaying the last registered values,\nand add a message (it replaces CPU's \"+/-\" bottom line) how much time ago the process finished. It is very useful to\ncheck what happens before the process exited or crashed without constant staring at the screen.\n\n## Screenshot\n\nHotkey `F2` saves the screen to a file in the current working directory.\nThe name of the file starts with `shot-` followed by the current time in format `YearMonthDay-HourMiniuteSecond`.\nThe file extension is `.txt`.\nIf a file with the same name exists(e.g., the hotkey was pressed a few times a second), it is overwritten.\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVladimirMarkelov%2Fpwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVladimirMarkelov%2Fpwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVladimirMarkelov%2Fpwatch/lists"}