3 Basic Apache2 commands to find more about webserver

Version Information [ec2-user@asw-host]$ sudo apachectl -v Server version: Apache/2.4.46 (Amazon) Server built: Aug 24 2020 18:40:26 Modules loaded [ec2-user@aws host]$ sudo apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) access_compat_module (shared) actions_module (shared) alias_module (shared) Running Config [ec2-user@aws host]$ sudo apachectl -S VirtualHost configuration: *:80 myhost (/etc/httpd/conf/httpd.conf:45) *:8443 myhost (/etc/httpd/conf.d/nss.conf:83) *:443 is a NameVirtualHost default server myhost (/etc/httpd/conf/httpd.conf:54) […]

Python Logging – how to have 2 loggers to same rotating logfile

Here is an example using app with “Schedule” This is using the Schedule Python module Docs for Schedule Module – has own logger Solution – is just to add the same handler instance to the 2nd logger. logger = logging.getLogger(‘weather_obs_f’) ch = logging.StreamHandler(stream=sys.stdout) ch_format = logging.Formatter(‘weather_obs – %(message)s’ ch.setFormatter(ch_format) ch.setLevel(logging.INFO) pid = os.getpid() fhandler = TimedRotatingFileHandler(‘weather_obs.’ + str(pid) + ‘.log’, […]

Graviton – getting python pandas to work

Procedure  I reviewed the packages available – yum list – output of ‘yum list’ see numpy and scipy but no pandas – means we might have to compile. 2.   Install  development packages root@graviton~]# sudo yum install “@Development tools” python3-pip python3-devel blas-devel gcc-gfortran lapack-devel …. Installed: autoconf.noarch 0:2.69-11.amzn2 automake.noarch 0:1.13.4-3.1.amzn2 bison.aarch64 0:3.0.4-6.amzn2.0.2 byacc.aarch64 0:1.9.20130304-3.amzn2.0.2 cscope.aarch64 0:15.8-10.amzn2.0.2 ctags.aarch64 0:5.8-13.amzn2.0.2 diffstat.aarch64 0:1.57-4.amzn2.0.2 doxygen.aarch64 […]

AWS – Graviton ( ARM64 )

Some links to get started. https://github.com/aws/aws-graviton-getting-started/tree/master https://aws.amazon.com/ec2/instance-types/a1/   working on getting pandas installed.  

loading 3 day weather data using pandas

Notes   In [1]: import pandas as pd import numpy as np import lxml In [2]: df = pd.read_html(‘https://w1.weather.gov/data/obhistory/KDCA.html’) In [7]: type(df) Out[7]: list In [11]: df[3] Out[11]: Date Time(edt) Wind(mph) Vis.(mi.) Weather Sky Cond. Temperature (ºF) RelativeHumidity WindChill(°F) HeatIndex(°F) Pressure Precipitation (in.) Date Time(edt) Wind(mph) Vis.(mi.) Weather Sky Cond. Air Dwpt 6 hour RelativeHumidity WindChill(°F) HeatIndex(°F) altimeter(in) sea level(mb) 1 hr 3 hr […]