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 […]

Adding a partition – AWS EBS

You have attached a new EBS volume Use ‘fdisk -l’ to find. first disk is the boot disk of your EC2 subsequent disks are the ones you have attached. root@host ]# fdisk -l WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own Disk /dev/xvda: 8589 MB, 8589934592 bytes, 16777216 sectors Units = […]

Google cloud debian – nslookup is missing

nslookup missing Have to install it. user @iowa_f1:~$ sudo apt-get install dnsutils -y Reading package lists… Done Building dependency tree Reading state information… Done dnsutils is already the newest version (1:9.11.5.P4+dfsg-5.1+deb10u3). 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. This will install nslookup and dig. Dig is a dns inquire program, that is a bit more […]

Large .cache directory – Linux

[user@myhost .cache]$ du -sh 72M .    So what is this? Pip cache ‘pip cache dir’ [user@myhost ~]$ pip cache dir /home/user/.cache/pip [user@myhost ~]$ to clean – ‘pip cache purge’ [user@myhost ~]$ pip cache purge Files removed: 155    check the space [user@myhost .cache]$ du -sh 2.5M . [user@jibsheet .cache]$ 95% or more reduction of space.