2019-02-10 18:15:02 +01:00
|
|
|
# OOMAnalyser
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
## Introduction
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
OOMAnalyser is a small project to transform the OOM output of a Linux kernel
|
|
|
|
into a more human friendly format and show the information on a single web
|
|
|
|
page. All data will be processed locally in your browser - the data will not
|
|
|
|
transferred to foreign servers. Thereby the OOM webpage can be used without an
|
|
|
|
Internet connection also.
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
This project is written in Python and it uses [Transcrypt](https://www.transcrypt.org/) to
|
|
|
|
compile the Python sources into JavaScript.
|
2017-11-25 13:14:54 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
The current online version is available on https://www.carstengrohmann.de/oom/.
|
|
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Installing OOMAnalyser is quite easy since OOMAnalyser consists only of two files, a
|
|
|
|
HTML file and a JavaScript file. Both can be stored locally to use OOMAnalyser
|
|
|
|
without an Internet connection.
|
|
|
|
|
|
|
|
### Installation steps
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
1. Create an own directory and add a `__javascript__` subdirectory
|
|
|
|
2. Open https://www.carstengrohmann.de/oom/ in a browser
|
|
|
|
3. Browse down to the paragraph "Local Installation" at the end of the document
|
|
|
|
4. Download the HTML file to the main directory and the javascript file to the
|
|
|
|
`__javascript__` subdirectory
|
|
|
|
5. Open the file `OOMAnalyser.html` in your favourite browser.
|
|
|
|
|
|
|
|
|
|
|
|
## Building OOMAnalyser
|
2017-12-21 22:00:34 +01:00
|
|
|
|
|
|
|
### Requirements
|
|
|
|
|
2017-11-25 12:52:55 +01:00
|
|
|
* [Python](http://www.python.org) 3.6 or later
|
2018-09-30 22:37:35 +02:00
|
|
|
* [Transcrypt](https://www.transcrypt.org/) 3.6.101
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
|
|
|
|
### Prepare the build environment
|
|
|
|
|
|
|
|
* Clone the repository:
|
|
|
|
```
|
2017-12-21 22:00:34 +01:00
|
|
|
# git clone https://github.com/CarstenGrohmann/OOMAnalyser
|
2019-02-10 18:15:02 +01:00
|
|
|
```
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
* Setup the Python virtual environment:
|
|
|
|
```
|
2017-11-25 12:52:55 +01:00
|
|
|
# virtualenv env
|
|
|
|
# . env/bin/activate
|
|
|
|
# env/bin/pip install -Ur requirements.txt
|
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
or
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2017-11-25 12:52:55 +01:00
|
|
|
# make venv
|
2019-02-10 18:15:02 +01:00
|
|
|
```
|
2017-11-25 12:52:55 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
### Build OOMAnalyser
|
2017-11-25 12:52:55 +01:00
|
|
|
```
|
|
|
|
# . env/bin/activate
|
|
|
|
# transcrypt --build --map --nomin -e 6 OOMAnalyser.py
|
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
|
|
|
|
* 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
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
```
|
|
|
|
# python3 -m http.server 8080 --bind 127.0.0.1
|
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
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
# make websrv
|
|
|
|
```
|
2017-12-21 22:00:34 +01:00
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
* Open the URL http://localhost:8080/OOMAnalyser.html in your favorite browser.
|
2017-12-21 22:00:34 +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
|
|
|
|
|
2019-02-10 18:15:02 +01:00
|
|
|
Check the project [issue tracker](https://github.com/CarstenGrohmann/OOMAnalyser/issues)
|
|
|
|
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
|
|
|
|
2017-11-25 12:52:55 +01:00
|
|
|
```
|
2019-02-07 20:52:37 +01:00
|
|
|
Copyright (c) 2017-2019 Carsten Grohmann, mail <add at here> carsten-grohmann.de
|
2017-11-25 12:52:55 +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.
|
|
|
|
```
|
|
|
|
|
|
|
|
Enjoy!
|
2017-12-21 22:00:34 +01:00
|
|
|
Carsten Grohmann
|