Skip to content

Commit 1fb49f6

Browse files
authored
Merge pull request #22 from systemswatch/documentation-refresh-1
Documentation Editions
2 parents 8615272 + 71ed65d commit 1fb49f6

8 files changed

Lines changed: 79 additions & 2 deletions

README.md

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,81 @@
11
[![Pylint](https://github.com/systemswatch/processwatch/actions/workflows/pylint.yml/badge.svg)](https://github.com/systemswatch/processwatch/actions/workflows/pylint.yml)
2-
# Process Watch
3-
* License: (Apache 2.0), Copyright (C) 2024, Author Phil Chen
2+
3+
# PROCESS WATCH
4+
* License: (Apache 2.0), Copyright (C) 2025, Author Phil Chen
45
* The author or owner of this repository is not liable for damages or losses arising from your use or inability to use the code.
6+
7+
## DESCRIPTION
8+
Process Watch monitors processes and workflows in your Linux system for anomalies or situations which when arise trigger predetermined actions you designate.
9+
10+
This is useful for systems issues, automating troubleshooting, provisioning, scaling, and much more.
11+
12+
## PREREQUISITES
13+
Python 3.11 or higher
14+
15+
## INSTALLATION
16+
17+
### Install Process Watch on Ubuntu
18+
19+
1. `gunzip -c process-watch.tar.gz | tar -xvf - `
20+
2. `mv process-watch /usr/local/`
21+
3. `cd /usr/local/process-watch`
22+
4. `pip install -r requirements.txt`
23+
5. `/usr/local/process-watch/tools/config_tool.py`
24+
6. `cd /usr/local/process-watch/systemd`
25+
7. `sudo cp process_watch.service /etc/systemd/system/`
26+
8. `sudo systemctl daemon-reload`
27+
9. `sudo systemctl enable process_watch`
28+
10. `sudo systemctl start process_watch`
29+
30+
## CONFIGURATION
31+
32+
Configuring Process Watch is done through a configuration tool located in the tools directory. The configuration tool will give you several options to create or manage configurations.
33+
34+
1. `python3 /usr/local/process-watch/tools/config_tool.py`
35+
36+
<img src="documentation/config-tool-menu.png" alt="Config Tool Menu" width="400" height="213">
37+
38+
### Configure Process Profile Configuration
39+
40+
Process profilers are the different functionalities Process Watch offers based on process utilization. Any time you make a new configuration via the configuration tool you must restart Process Watch by executing `sudo systemctl restart process_watch` for the new config to take effect.
41+
42+
You can access the Process Profile Configuration menu from the main menu by choosing the option "Create a Process Profile Configuration".
43+
44+
<img src="documentation/configuration-creation-sub-menu.png" alt="Configuration Creation Menu" width="400" height="245">
45+
46+
### Create General Process Profiler
47+
48+
The General Process Profiler, will monitor the process you dictate at the interval you specify and write CPU, RSS memory usage, file descriptor, and thread count log entry in the logs directory under the naming convention `your-file-name-gen-profiler.log`.
49+
50+
You can create a General Process Profiler via the Process Profile Configuration menu by choosing the option "Create General Process Profiler".
51+
52+
See the following example below for configuration options:
53+
54+
<img src="documentation/general-process-profiler-settings.png" alt="General Process Profiler Settings" width="500" height="223">
55+
56+
### Create Memory Process Profiler
57+
58+
The Memory Process Profiler, will monitor the memory utilization for the process you dictate at the interval you specify and write a log entry when you exceed a memory threshold you define in the logs directory under the naming convention `your-file-name-mem-profiler.log`. Memory Process Profiler can also take action when the memory threshold is exceeded. We recommend you write a shell script for the wanted action or actions upon exceeding the memory threshold.
59+
60+
You can create a Memory Process Profiler via the Process Profile Configuration Menu by choosing the option "Create Memory Process Profiler".
61+
62+
See the following example below for configuration options:
63+
64+
<img src="documentation/memory-process-profiler-settings.png" alt="Memory Process Profiler Settings" width="750" height="334">
65+
66+
### Create File Descriptor Process Profiler
67+
68+
The File Descriptor Process Profiler, will monitor the file descriptor utilization for the process you dictate at the interval you specify and write a log entry when you exceed a file descriptor threshold you define in the logs directory under the naming convention `your-file-name-fds-profiler.log`. File Descriptor Process Profiler can also take action when the file descriptor threshold is exceeded. We recommend you write a shell script for the wanted action or actions upon exceeding the file descriptor threshold.
69+
70+
You can create a File Descriptor Process Profiler via the Process Profile Configuration Menu by choosing the option "Create File Descriptor Process Profiler".
71+
72+
See the following example below for configuration options:
73+
74+
<img src="documentation/memory-process-profiler-settings.png" alt="Memory Process Profiler Settings" width="750" height="334">
75+
76+
### Quick Notes
77+
78+
* Logs are stored in `/usr/local/process_watch/logs`
79+
* Each profiler has its own log file.
80+
* If you need to run Process Watch as a non-root user simply modify the systemd file swapping root for your user.
81+
* If you need access to see the contents of individual Profiler Configuration files they are located at `/usr/local/process_watch/watch_list` under the configuration file name you provided upon creation.

documentation/config-tool-menu.png

57.1 KB
Loading
87.2 KB
Loading
69.4 KB
Loading
85.6 KB
Loading
49.6 KB
Loading
162 KB
Loading
156 KB
Loading

0 commit comments

Comments
 (0)