-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow_log.py
executable file
·36 lines (30 loc) · 1.27 KB
/
show_log.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python3
# Author: Vladimir Novick , <vlad.novick@gmail.com>
#
# https://www.linkedin.com/in/vladimirnovick
#
# https://github.com/Vladimir-Novick/Monitoring-Memory-Usage
#
#
# Date: 09.07.2017
# Purpose: check max using memory and create log file
#
# 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.
import sys
print("")
print(" MEMORY MONITOR SERVICE")
print(" ----------------------")
print(" memory_monitor.service")
print("")
print(" Service provide periodical check max using memory and create log file")
print(" File: /var/monitor/memory.log")
print(" ______________________________________________________________________")
print(" ")
with open('/var/monitor/memory.log', 'r') as fin:
print(fin.read())