-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5cfae21
Showing
8 changed files
with
492 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Oled Monitor | ||
After=multi-user.target | ||
Conflicts[email protected] | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/python3 /home/ubuntu/scripts/OLED/HMON/hpara-v14.py | ||
StandardInput=tty-force | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[Oled-config] | ||
csvpath = /var/www/ncdata/Hauke/files/PRIVAT/PRGM/PYTHON/OLED/MONITOR/csvtest.csv | ||
csvpath2 = /home/ubuntu/scripts/OLED/HMON/RPI-OLED-LOGGER/csvtest.csv | ||
num = 2 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Timestamp, CPU Percent, CPU Temp, NET Total, MEM Free, DISK Free | ||
2021-08-30 09:42:01.253863,3.6,46.7,900.0,5926776832,250.0G | ||
2021-08-30 09:42:07.304982,4.1,46.3,2736.5,5924626432,250.0G | ||
2021-08-30 09:42:13.355812,3.4,46.3,2360.6666666666665,5925801984,250.0G | ||
2021-08-30 09:42:19.405837,3.3,46.3,16187.666666666666,5925289984,250.0G | ||
2021-08-30 09:42:25.455219,3.5,46.7,1819.1666666666667,5923745792,250.0G | ||
2021-08-30 09:42:31.509616,3.1,46.3,1231.5,5924261888,250.0G | ||
2021-08-30 09:42:37.567036,4.0,47.2,2569.1666666666665,5924003840,250.0G | ||
2021-08-30 09:42:43.612461,2.9,46.3,1162.3333333333333,5924777984,250.0G | ||
2021-08-30 09:42:49.664677,3.3,46.7,1175.3333333333333,5925036032,250.0G | ||
2021-08-30 09:42:55.712830,4.5,46.3,2352.8333333333335,5925437440,250.0G | ||
2021-08-30 09:43:01.762593,3.0,45.8,1354.3333333333333,5925437440,250.0G | ||
2021-08-30 09:43:07.813438,4.2,45.3,2595.8333333333335,5925265408,250.0G | ||
2021-08-30 09:43:13.864421,3.1,46.3,1280.6666666666667,5925298176,250.0G | ||
2021-08-30 09:43:19.917606,3.1,46.7,2380.8333333333335,5925265408,250.0G | ||
2021-08-30 09:43:25.969269,4.3,47.2,4607.833333333333,5925609472,250.0G | ||
2021-08-30 09:43:32.015404,4.5,46.7,9331.5,5926760448,250.0G | ||
2021-08-30 10:58:47.128586,5.2,45.8,208794.27666666667,6977576960,250.3G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2014-18 Richard Hull and contributors | ||
# See LICENSE.rst for details. | ||
|
||
import sys | ||
import logging | ||
|
||
from luma.core import cmdline, error | ||
|
||
|
||
# logging | ||
logging.basicConfig( | ||
level=logging.DEBUG, | ||
format='%(asctime)-15s - %(message)s' | ||
) | ||
# ignore PIL debug messages | ||
logging.getLogger('PIL').setLevel(logging.ERROR) | ||
|
||
|
||
def display_settings(device, args): | ||
""" | ||
Display a short summary of the settings. | ||
:rtype: str | ||
""" | ||
iface = '' | ||
display_types = cmdline.get_display_types() | ||
if args.display not in display_types['emulator']: | ||
iface = 'Interface: {}\n'.format(args.interface) | ||
|
||
lib_name = cmdline.get_library_for_display_type(args.display) | ||
if lib_name is not None: | ||
lib_version = cmdline.get_library_version(lib_name) | ||
else: | ||
lib_name = lib_version = 'unknown' | ||
|
||
import luma.core | ||
version = 'luma.{} {} (luma.core {})'.format( | ||
lib_name, lib_version, luma.core.__version__) | ||
|
||
return 'Version: {}\nDisplay: {}\n{}Dimensions: {} x {}\n{}'.format( | ||
version, args.display, iface, device.width, device.height, '-' * 60) | ||
|
||
|
||
def get_device(actual_args=None): | ||
""" | ||
Create device from command-line arguments and return it. | ||
""" | ||
if actual_args is None: | ||
actual_args = sys.argv[1:] | ||
parser = cmdline.create_parser(description='luma.examples arguments') | ||
args = parser.parse_args(actual_args) | ||
|
||
if args.config: | ||
# load config from file | ||
config = cmdline.load_config(args.config) | ||
args = parser.parse_args(config + actual_args) | ||
|
||
# create device | ||
try: | ||
device = cmdline.create_device(args) | ||
print(display_settings(device, args)) | ||
return device | ||
|
||
except error.Error as e: | ||
parser.error(e) | ||
return None |
Oops, something went wrong.