2023-04-16 16:51:13 +02:00
|
|
|
# openSUSE OOMAnalyser
|
2022-01-12 20:24:42 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
## Introduction
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2023-04-16 16:51:13 +02:00
|
|
|
This is a forked version of [Carsten Grohmann's OOMAnalyser](https://git.sr.ht/~carstengrohmann/OOMAnalyser) targeting SUSE based operating systems.
|
|
|
|
|
|
|
|
It is a small project to transform the OOM message of a Linux kernel into a more user-friendly format.
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2019-11-24 10:46:44 +01:00
|
|
|
OOMAnalyser consists of a web page into whose input field the OOM message is copied. JavaScript code extracts the data
|
|
|
|
from it and displays the details. All processing takes place in the browser. No data is transferred to external servers.
|
|
|
|
This makes it possible to use a locally stored copy of the website for analysis.
|
2017-11-25 13:14:54 +01:00
|
|
|
|
2019-12-05 06:44:20 +01:00
|
|
|
This project is written in [Python](https://www.python.org) and uses [Transcrypt](https://www.transcrypt.org/) to
|
|
|
|
translate Python code into JavaScript.
|
2019-02-10 18:15:02 +01:00
|
|
|
|
2021-09-04 23:24:52 +02:00
|
|
|
The current online version is available at [https://www.carstengrohmann.de/oom/](https://www.carstengrohmann.de/oom/) .
|
2019-02-10 18:15:02 +01:00
|
|
|
|
2020-01-09 20:49:28 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
## Installation
|
|
|
|
|
2022-08-10 21:21:50 +02:00
|
|
|
Installing OOMAnalyser is quite easy since OOMAnalyser consists only of two files, an HTML file and a JavaScript file.
|
|
|
|
Both can be stored locally to use OOMAnalyser without an Internet connection.
|
2019-02-10 18:15:02 +01:00
|
|
|
|
|
|
|
### Installation steps
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2023-01-08 13:46:36 +01:00
|
|
|
1. Open [https://www.carstengrohmann.de/oom/](https://www.carstengrohmann.de/oom/) in a browser
|
2020-10-29 21:32:41 +01:00
|
|
|
2. Browse down to the paragraph "Local Installation" at the end of the document
|
|
|
|
3. Download the HTML file and the JavaScript file to the main directory
|
|
|
|
4. Open the file `OOMAnalyser.html` in your favourite browser
|
2019-02-10 18:15:02 +01:00
|
|
|
|
2023-01-08 13:46:36 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
## Building OOMAnalyser
|
2017-12-21 22:00:34 +01:00
|
|
|
|
|
|
|
### Requirements
|
|
|
|
|
2020-12-08 10:50:40 +01:00
|
|
|
* [Python](http://www.python.org) 3.7
|
2020-10-29 21:32:41 +01:00
|
|
|
* [Transcrypt](https://www.transcrypt.org/) 3.7
|
2020-11-19 09:45:46 +01:00
|
|
|
* [Rollup](https://rollupjs.org/)
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
|
|
|
|
### Prepare the build environment
|
|
|
|
|
|
|
|
* Clone the repository:
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2022-01-17 20:47:37 +01:00
|
|
|
# git clone https://git.sr.ht/~carstengrohmann/OOMAnalyser
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2022-01-17 20:47:37 +01:00
|
|
|
* Set up the Python virtual environment:
|
2023-01-08 13:46:36 +01:00
|
|
|
|
2022-01-17 20:47:37 +01:00
|
|
|
# virtualenv env
|
|
|
|
# . env/bin/activate
|
|
|
|
# env/bin/pip install -Ur requirements.txt
|
2023-01-08 13:46:36 +01:00
|
|
|
|
2022-01-17 20:47:37 +01:00
|
|
|
or
|
2023-01-08 13:46:36 +01:00
|
|
|
|
2022-01-17 20:47:37 +01:00
|
|
|
# make venv
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
### Build OOMAnalyser
|
2020-01-09 20:49:28 +01:00
|
|
|
|
2017-11-25 12:52:55 +01:00
|
|
|
```
|
|
|
|
# . env/bin/activate
|
|
|
|
# transcrypt --build --map --nomin -e 6 OOMAnalyser.py
|
2022-11-19 09:39:06 +01:00
|
|
|
# rollup --config rollup.config.mjs
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
or
|
2017-12-21 22:00:34 +01:00
|
|
|
|
|
|
|
# make build
|
2017-11-25 12:52:55 +01:00
|
|
|
```
|
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
### Usage
|
2020-01-09 20:49:28 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
* Change into the source directory and start your own small web server.
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
* Start Python built-in web server:
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2022-01-17 20:47:37 +01:00
|
|
|
# python3 -m http.server 8080 --bind 127.0.0.1
|
2023-01-08 13:46:36 +01:00
|
|
|
|
2022-01-17 20:47:37 +01:00
|
|
|
or
|
2023-01-08 13:46:36 +01:00
|
|
|
|
2022-01-17 20:47:37 +01:00
|
|
|
# make websrv
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2020-01-09 20:49:28 +01:00
|
|
|
* Open the URL http://localhost:8080/OOMAnalyser.html in your favorite browser.
|
2017-12-21 22:00:34 +01:00
|
|
|
|
|
|
|
|
2022-01-18 21:55:44 +01:00
|
|
|
## Publish a new release
|
|
|
|
### Naming
|
|
|
|
|
|
|
|
* `NEW_VERSION` - Version string of the new version e.g. `0.5.0`
|
|
|
|
* `NEW_GIT_VERSION` - Git version string of the new version e.g. `v0.5.0`
|
|
|
|
|
|
|
|
### Steps
|
|
|
|
1. Commit all open changes
|
|
|
|
2. Updating the documentation in `README.md` and `OOMAnalyser.html` and commit changes
|
|
|
|
|
|
|
|
# git commit -m "Update documentation"
|
|
|
|
|
|
|
|
3. Update version number in `OOMAnalyser.py` and `Makefile`
|
|
|
|
|
|
|
|
# git commit -m "Bump version number to <NEW_VERSION>"
|
|
|
|
|
|
|
|
4. Create a new annotated git tag with shortened changelog
|
|
|
|
|
|
|
|
# git tag -a <NEW_GIT_VERSION>
|
|
|
|
|
|
|
|
5. Push changes into public repositories
|
|
|
|
|
2023-01-08 13:46:36 +01:00
|
|
|
# git push
|
2022-01-18 21:55:44 +01:00
|
|
|
# git push origin --tags
|
|
|
|
|
|
|
|
6. Create release packages in zip and tar.gz format
|
|
|
|
|
|
|
|
# make release
|
|
|
|
|
|
|
|
7. Create release on SourceHut & GitHub
|
|
|
|
|
|
|
|
8. Start a new development cycle by setting new version numbers
|
2023-01-08 13:46:36 +01:00
|
|
|
|
2022-01-18 21:55:44 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
## Resources
|
|
|
|
|
2017-12-21 22:00:34 +01:00
|
|
|
* [Transcrypt](https://www.transcrypt.org/)
|
2017-11-25 12:52:55 +01:00
|
|
|
* [Linux man pages online](https://man7.org/)
|
|
|
|
* [Decoding the Linux kernel's page allocation failure messages](https://utcc.utoronto.ca/~cks/space/blog/linux/DecodingPageAllocFailures)
|
|
|
|
* [Linux Kernel OOM Log Analysis](http://elearningmedium.com/linux-kernel-oom-log-analysis/)
|
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
|
2017-11-25 12:52:55 +01:00
|
|
|
## Known Bugs/Issues
|
|
|
|
|
2020-10-29 15:04:52 +01:00
|
|
|
Check the project [issue tracker](https://todo.sr.ht/~carstengrohmann/OOMAnalyser)
|
2019-02-10 18:15:02 +01:00
|
|
|
for current open bugs. New bugs can be reported there also.
|
|
|
|
|
2017-11-25 12:52:55 +01:00
|
|
|
|
|
|
|
## License
|
2019-02-10 18:15:02 +01:00
|
|
|
|
|
|
|
This project is licensed under the MIT license.
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2023-01-08 13:46:36 +01:00
|
|
|
> Copyright (c) 2017-2023 Carsten Grohmann, mail <add at here> carstengrohmann.de
|
2022-01-17 20:47:37 +01:00
|
|
|
>
|
|
|
|
> Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
|
|
> this software and associated documentation files (the "Software"), to deal in
|
|
|
|
> the Software without restriction, including without limitation the rights to
|
|
|
|
> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
|
|
> of the Software, and to permit persons to whom the Software is furnished to do
|
|
|
|
> so, subject to the following conditions:
|
|
|
|
>
|
|
|
|
> The above copyright notice and this permission notice shall be included in all
|
|
|
|
> copies or substantial portions of the Software.
|
|
|
|
>
|
|
|
|
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
> SOFTWARE.
|
2017-11-25 12:52:55 +01:00
|
|
|
|
|
|
|
Enjoy!
|
2023-01-08 13:46:36 +01:00
|
|
|
Carsten Grohmann
|