diff --git a/.gitignore b/.gitignore index eca0953..44bef58 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .ipynb_checkpoints/ *.json /logs +book.html diff --git a/README.md b/README.md new file mode 100644 index 0000000..9168d03 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Readme.MD + +## Overview of the project structure + +- fonts +- log-books \ No newline at end of file diff --git a/index.html b/index.html index 76d2c41..be2d06f 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - + @@ -18,8 +18,8 @@ - Document - + A log book + @@ -27,452 +27,470 @@

TL;DR

too log didn't read

- - -
-
-
-
-
-
-

What happened today?

- Some temp debug info: This log was generated on 2024-03-18 22:38:41.543544, the next will be available after 2024-03-19 01:38:41.543544. I now have 68 logs generated! -

tldr@chopchop:~ $sudo journalctl -S today -u kitchen-stove.service -u - kitchen-bin.service -u kitchen-fridge.service -r -n

- -
    - -
  • Mar 18 21:11:15 chopchop systemd[1]: Failed to start kitchen-fridge.service - Kitchen Fridge Service.
  • - -
  • Mar 18 21:11:15 chopchop systemd[1]: kitchen-fridge.service: Failed with result 'exit-code'.
  • - -
  • Mar 18 21:11:15 chopchop systemd[1]: kitchen-fridge.service: Start request repeated too quickly.
  • - -
  • Mar 18 21:11:15 chopchop systemd[1]: Stopped kitchen-fridge.service - Kitchen Fridge Service.
  • - -
  • Mar 18 21:11:15 chopchop systemd[1]: kitchen-fridge.service: Scheduled restart job, restart counter is at 6.
  • - -
  • Mar 18 21:11:15 chopchop systemd[1]: kitchen-fridge.service: Failed with result 'exit-code'.
  • - -
  • Mar 18 21:11:15 chopchop systemd[1]: kitchen-fridge.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
  • - -
  • Mar 18 21:11:15 chopchop python3[26203]: /usr/bin/python3: can't open file '/home/xpub/kitchen/Fridge/fridge.py': [Errno 2] No such file or directory
  • - -
  • Mar 18 21:11:14 chopchop systemd[1]: Failed to start kitchen-stove.service - Kitchen Stove Service.
  • - -
  • Mar 18 21:11:14 chopchop systemd[1]: kitchen-stove.service: Failed with result 'exit-code'.
  • - -
- -

tldr@chopchop:~ $uptime -s

-

2024-03-18 07:51:34

- - - This is common, the - fragility of these machines are more prominant than any cloud user expects. Partially because of scale, - partially because a lot of labour that happen in datacenters just escapes us all when we want to just upload - an image. - - +
+

What happened today?

+
tldr@chopchop:~ $sudo journalctl -S today -u kitchen-stove.service -u
+      kitchen-bin.service -u kitchen-fridge.service -r -n
+ + +
tldr@chopchop:~ $uptime -s
+

2024-03-18 07:51:34

+ + + This is common, the + fragility of these machines are more prominant than any cloud user expects. Partially because of scale, + partially because a lot of labour that happen in datacenters just escapes us all when we want to just upload + an image. + + + + +
tldr@chopchop:~ $sudo journalctl _COMM=useradd -r -n 1 --output-fields=MES
-

tldr@chopchop:~ $sudo journalctl _COMM=useradd -r -n 1 --output-fields=MESSAGE -

-

Feb 29 15:08:48 chopchop useradd[8744]: new user: name=colord, UID=118, GID=130, home=/var/lib/colord, shell=/usr/sbin/nologin, from=/dev/pts/4 +

Mar 19 15:00:26 chopchop useradd[16047]: new user: name=chef, UID=1023, GID=1023, home=/home/chef, shell=/bin/bash, from=/dev/pts/3

- - - - Users will be trusted with not just the keys and passwords to the "house" which is the server, but with a - portion of responsibility to keep it afloat and contribute to what makes it a community of practices (and - network of knowledge and dependence). - - + + + + Users will be trusted with not just the keys and passwords to the "house" which is the server, but with a + portion of responsibility to keep it afloat and contribute to what makes it a community of practices (and + network of knowledge and dependence). + + -

tldr@chopchop:~ $sudo journalctl -S today _COMM=useradd -r

- - - A level 1 annotation for users_created_today - - - -

tldr@chopchop:~ $ grep 'install' /var/log/dpkg.log

-
    - -
  • 2024-03-10 15:16:14 install libtk8.6:armhf 8.6.13-2
  • - -
  • 2024-03-10 15:16:15 install tk8.6-blt2.5:armhf 2.5.3+dfsg-4.1
  • - -
  • 2024-03-10 15:16:15 install blt:armhf 2.5.3+dfsg-4.1
  • - -
  • 2024-03-10 15:16:15 install python3-tk:armhf 3.11.2-3
  • - -
  • 2024-03-12 14:29:01 install python3-markupsafe:armhf 2.1.2-1
  • - -
  • 2024-03-12 14:29:02 install python3-jinja2:all 3.1.2-1
  • - -
  • 2024-03-15 09:51:48 install libhttp-parser2.9:armhf 2.9.4-5
  • - -
  • 2024-03-15 09:51:48 install libmbedx509-1:armhf 2.28.3-1
  • - -
  • 2024-03-15 09:51:48 install libmbedtls14:armhf 2.28.3-1
  • - -
  • 2024-03-15 09:51:48 install libgit2-1.5:armhf 1.5.1+ds-1+deb12u1
  • - -
  • 2024-03-15 09:51:49 install bat:armhf 0.22.1-4
  • - -
- +
tldr@chopchop:~ $sudo journalctl -S today _COMM=useradd -r
+ + + A level 1 annotation for users_created_today + + - + +
tldr@chopchop:~ $ grep 'install' /var/log/dpkg.log
+
    + +
  • 2024-03-10 15:16:14 install libtk8.6:armhf 8.6.13-2
  • + +
  • 2024-03-10 15:16:15 install tk8.6-blt2.5:armhf 2.5.3+dfsg-4.1
  • + +
  • 2024-03-10 15:16:15 install blt:armhf 2.5.3+dfsg-4.1
  • + +
  • 2024-03-10 15:16:15 install python3-tk:armhf 3.11.2-3
  • + +
  • 2024-03-12 14:29:01 install python3-markupsafe:armhf 2.1.2-1
  • + +
  • 2024-03-12 14:29:02 install python3-jinja2:all 3.1.2-1
  • + +
  • 2024-03-15 09:51:48 install libhttp-parser2.9:armhf 2.9.4-5
  • + +
  • 2024-03-15 09:51:48 install libmbedx509-1:armhf 2.28.3-1
  • + +
  • 2024-03-15 09:51:48 install libmbedtls14:armhf 2.28.3-1
  • + +
  • 2024-03-15 09:51:48 install libgit2-1.5:armhf 1.5.1+ds-1+deb12u1
  • + +
  • 2024-03-15 09:51:49 install bat:armhf 0.22.1-4
  • + +
  • 2024-03-19 10:38:35 install fonts-font-awesome:all 5.0.10+really4.7.0~dfsg-4.1
  • + +
  • 2024-03-19 10:38:35 install python3-dateutil:all 2.8.2-2
  • + +
  • 2024-03-19 10:38:36 install ghp-import:all 2.1.0-3
  • + +
  • 2024-03-19 10:38:36 install libjs-popper.js:all 1.16.1+ds-6
  • + +
  • 2024-03-19 10:38:36 install libjs-bootstrap4:all 4.6.1+dfsg1-4
  • + +
  • 2024-03-19 10:38:36 install libjs-highlight.js:all 9.18.5+dfsg1-2
  • + +
  • 2024-03-19 10:38:37 install libjs-lunr:all 2.3.9~dfsg-2
  • + +
  • 2024-03-19 10:38:37 install libjs-modernizr:all 2.6.2+ds1-5
  • + +
  • 2024-03-19 10:38:37 install libjs-sizzle:all 2.3.6+ds+~2.3.3-2
  • + +
  • 2024-03-19 10:38:37 install python3-tornado:armhf 6.2.0-3
  • + +
  • 2024-03-19 10:38:38 install python3-livereload:all 2.6.3-2
  • + +
  • 2024-03-19 10:38:38 install python3-colorama:all 0.4.6-2
  • + +
  • 2024-03-19 10:38:38 install python3-click:all 8.1.3-2
  • + +
  • 2024-03-19 10:38:38 install python3-joblib:all 1.2.0-4
  • + +
  • 2024-03-19 10:38:39 install python3-regex:armhf 0.1.20221031-1
  • + +
  • 2024-03-19 10:38:39 install python3-tqdm:all 4.64.1-1
  • + +
  • 2024-03-19 10:38:39 install python3-nltk:all 3.8-1
  • + +
  • 2024-03-19 10:38:40 install python3-lunr:all 0.6.2-2
  • + +
  • 2024-03-19 10:38:40 install sphinx-rtd-theme-common:all 1.2.0+dfsg-1
  • + +
  • 2024-03-19 10:38:40 install python3-markdown:all 3.4.1-2
  • + +
  • 2024-03-19 10:38:40 install python3-mergedeep:all 1.3.4-3
  • + +
  • 2024-03-19 10:38:40 install python3-yaml:armhf 6.0-3+b1
  • + +
  • 2024-03-19 10:38:41 install python3-pyyaml-env-tag:all 0.1-3
  • + +
  • 2024-03-19 10:38:41 install python3-watchdog:all 2.2.1-1
  • + +
  • 2024-03-19 10:38:41 install mkdocs:all 1.4.2+dfsg-2
  • + +
  • 2024-03-19 10:38:41 install node-jquery:all 3.6.1+dfsg+~3.5.14-1
  • + +
  • 2024-03-19 10:38:42 install python3-argcomplete:all 2.0.0-1
  • + +
  • 2024-03-19 10:38:42 install python3-userpath:all 1.8.0-1
  • + +
  • 2024-03-19 10:38:42 install pipx:all 1.1.0-1
  • + +
  • 2024-03-19 10:38:42 install python3-pyinotify:all 0.9.6-2
  • + +
  • 2024-03-19 10:38:43 install python3-simplejson:armhf 3.18.3-1
  • + +
  • 2024-03-19 10:42:57 install libjs-term.js:all 0.0.7-4
  • + +
  • 2024-03-19 10:42:57 install python3-ptyprocess:all 0.7.0-5
  • + +
  • 2024-03-19 10:42:57 install python3-terminado:all 0.17.0-1
  • + +
  • 2024-03-19 10:42:57 install python3-xstatic:all 1.0.0-7
  • + +
  • 2024-03-19 10:42:58 install python3-xstatic-term.js:all 0.0.7.0-4
  • + +
+ - -

tldr@chopchop:~ $ grep 'remove' /var/log/dpkg.log

-
    - -
  • 2024-03-15 09:55:52 startup packages remove
  • - -
  • 2024-03-15 09:55:52 remove bat:armhf 0.22.1-4
  • - -
- + + + +
tldr@chopchop:~ $ grep 'remove' /var/log/dpkg.log
+
    + +
  • 2024-03-15 09:55:52 startup packages remove
  • + +
  • 2024-03-15 09:55:52 remove bat:armhf 0.22.1-4
  • + +
+ + +
tldr@chopchop:~ $sudo journalctl _COMM=systemd-login
+    --output-fields=MESSAGE -S today -g "New session" | grep -v 'Boot'
+
    + +
+ +
tldr@chopchop:~ $sudo journalctl _COMM=groupadd -r --output-fields=MESSAGE
+
    + +
+ +
tldr@chopchop:~ $sudo journalctl _COMM=groupremove -r --output-fields=MES
+ +
    + +
+ +
tldr@chopchop:~ $sudo journalctl _COMM=usermod -r
+
    + +
+ +
tldr@chopchop:~ $sudo journalctl _COMM=userdel -r
+
    + +
+ +
+ +
tldr@chopchop:~ $sudo service --status-all
+
    + +
  • [ - ] alsa-utils
  • + +
  • [ - ] apparmor
  • + +
  • [ + ] atop
  • + +
  • [ + ] atopacct
  • + +
  • [ + ] bluetooth
  • + +
  • [ - ] console-setup.sh
  • + +
  • [ + ] cron
  • + +
  • [ + ] cups
  • + +
  • [ + ] cups-browsed
  • + +
  • [ + ] dbus
  • + +
  • [ + ] dphys-swapfile
  • + +
  • [ + ] exim4
  • + +
  • [ + ] fake-hwclock
  • + +
  • [ - ] fcgiwrap
  • + +
  • [ - ] hwclock.sh
  • + +
  • [ - ] incron
  • + +
  • [ - ] keyboard-setup.sh
  • + +
  • [ + ] kmod
  • + +
  • [ + ] networking
  • + +
  • [ - ] nfs-common
  • + +
  • [ + ] nginx
  • + +
  • [ - ] paxctld
  • + +
  • [ - ] php7.4-fpm
  • + +
  • [ + ] php8.2-fpm
  • + +
  • [ + ] procps
  • + +
  • [ - ] pulseaudio-enable-autospawn
  • + +
  • [ + ] raspi-config
  • + +
  • [ + ] rng-tools-debian
  • + +
  • [ - ] rpcbind
  • + +
  • [ - ] rsync
  • + +
  • [ - ] saned
  • + +
  • [ + ] ssh
  • + +
  • [ - ] sudo
  • + +
  • [ + ] triggerhappy
  • + +
  • [ + ] udev
  • + +
  • [ - ] uuidd
  • + +
  • [ - ] x11-common
  • + +
-

tldr@chopchop:~ $sudo journalctl _COMM=systemd-logind -r - --output-fields=MESSAGE -S today -g "New session" | grep -v 'Boot'

-
    - -
-

tldr@chopchop:~ $sudo journalctl _COMM=groupadd -r --output-fields=MESSAGE

-
    - -
-

tldr@chopchop:~ $sudo journalctl _COMM=groupremove -r --output-fields=MESSAGE -

-
    - -
-

tldr@chopchop:~ $sudo journalctl _COMM=usermod -r

-
    - -
-

tldr@chopchop:~ $sudo journalctl _COMM=userdel -r

-
    - -
+
tldr@chopchop:~ $getent group
+
    + +
  • root:x:0:
  • + +
  • daemon:x:1:
  • + +
  • bin:x:2:
  • + +
  • sys:x:3:
  • + +
  • adm:x:4:xpub
  • + +
  • tty:x:5:
  • + +
  • disk:x:6:
  • + +
  • lp:x:7:aleevadh,bernabereit,lorenzo,mania,mszw,mxrwho,river,senak,thijsoid,v,vitrinekast,wang,xpub,xpub,zerozeta,zz1,www-data
  • + +
  • mail:x:8:
  • + +
  • news:x:9:
  • + +
  • uucp:x:10:
  • + +
  • man:x:12:
  • + +
  • proxy:x:13:
  • + +
  • kmem:x:15:
  • + +
  • dialout:x:20:xpub,mb,river,joak,aleevadh,bernabereit,lorenzo,mania,mszw,mxrwho,river,senak,thijsoid,v,vitrinekast,wang,xpub,zerozeta,zz1,murtaugh,mb
  • + +
  • fax:x:21:
  • + +
  • voice:x:22:
  • + +
  • cdrom:x:24:xpub
  • + +
  • floppy:x:25:
  • + +
  • tape:x:26:
  • + +
  • sudo:x:27:joak,aleevadh,bernabereit,lorenzo,mania,mszw,mxrwho,river,senak,thijsoid,v,vitrinekast,wang,xpub,zerozeta,zz1,murtaugh,mb,strt,cristina,chipchip,killer
  • + +
  • audio:x:29:xpub,river,pulse,vitrinekast,liquidsoap
  • + +
  • dip:x:30:
  • + +
  • www-data:x:33:vitrinekast
  • + +
  • backup:x:34:
  • + +
  • operator:x:37:
  • + +
  • list:x:38:
  • + +
  • irc:x:39:
  • + +
  • src:x:40:
  • + +
  • gnats:x:41:
  • + +
  • shadow:x:42:
  • + +
  • utmp:x:43:
  • + +
  • video:x:44:xpub
  • + +
  • sasl:x:45:
  • + +
  • plugdev:x:46:xpub
  • + +
  • staff:x:50:
  • + +
  • games:x:60:xpub
  • + +
  • users:x:100:xpub,murtaugh,aleevadh,h4ck3r,mania,mszw,mxrwho,senak,v,wang,zerozeta,bernabereit,lorenzo,mb,river,thijsoid,vitrinekast,zz1,joak,cristina,strt,chipchip,killer,chef
  • + +
  • nogroup:x:65534:
  • + +
  • systemd-journal:x:101:
  • + +
  • systemd-network:x:102:
  • + +
  • systemd-resolve:x:103:
  • + +
  • input:x:104:xpub
  • + +
  • kvm:x:105:
  • + +
  • render:x:106:xpub
  • + +
  • crontab:x:107:
  • + +
  • netdev:x:108:xpub
  • + +
  • systemd-timesync:x:109:
  • + +
  • messagebus:x:110:
  • + +
  • bluetooth:x:112:
  • + +
  • avahi:x:113:
  • + +
  • spi:x:999:xpub
  • + +
  • i2c:x:998:xpub
  • + +
  • gpio:x:997:xpub
  • + +
  • systemd-coredump:x:996:
  • + +
  • xpub:x:1000:
  • + +
  • vitrinekast:x:1001:
  • + +
  • senak:x:1002:
  • + +
  • lorenzo:x:1003:
  • + +
  • mxrwho:x:1004:
  • + +
  • bernabereit:x:1005:
  • + +
  • river:x:1006:
  • + +
  • v:x:1007:
  • + +
  • mania:x:1008:
  • + +
  • aleevadh:x:1009:
  • + +
  • h4ck3r:x:1010:
  • + +
  • thijsoid:x:1011:
  • + +
  • mszw:x:1012:
  • + +
  • zerozeta:x:1013:
  • + +
  • wang:x:1014:
  • + +
  • zz1:x:1015:
  • + +
  • Debian-exim:x:114:
  • + +
  • rtkit:x:115:
  • + +
  • murtaugh:x:1017:
  • + +
  • mb:x:1016:
  • + +
  • pulse:x:116:
  • + +
  • pulse-access:x:117:
  • + +
  • mlocate:x:118:
  • + +
  • uuidd:x:119:
  • + +
  • joak:x:1018:
  • + +
  • sgx:x:120:
  • + +
  • plocate:x:121:
  • + +
  • polkitd:x:995:
  • + +
  • _ssh:x:111:
  • + +
  • pipewire:x:122:
  • + +
  • cristina:x:1019:
  • + +
  • strt:x:1020:
  • + +
  • incron:x:123:
  • + +
  • chipchip:x:1021:
  • + +
  • killer:x:1022:
  • + +
  • tcpdump:x:124:
  • + +
  • liquidsoap:x:125:
  • + +
  • lpadmin:x:126:river,xpub
  • + +
  • ssl-cert:x:127:
  • + +
  • scanner:x:128:saned
  • + +
  • saned:x:129:
  • + +
  • colord:x:130:
  • + +
  • chef:x:1023:
  • + +
+
-
-

tldr@chopchop:~ $sudo service --status-all

-
    - -
  • [ - ] alsa-utils
  • - -
  • [ - ] apparmor
  • - -
  • [ + ] atop
  • - -
  • [ + ] atopacct
  • - -
  • [ + ] bluetooth
  • - -
  • [ - ] console-setup.sh
  • - -
  • [ + ] cron
  • - -
  • [ + ] cups
  • - -
  • [ + ] cups-browsed
  • - -
  • [ + ] dbus
  • - -
  • [ + ] dphys-swapfile
  • - -
  • [ + ] exim4
  • - -
  • [ + ] fake-hwclock
  • - -
  • [ - ] fcgiwrap
  • - -
  • [ - ] hwclock.sh
  • - -
  • [ + ] incron
  • - -
  • [ - ] keyboard-setup.sh
  • - -
  • [ + ] kmod
  • - -
  • [ + ] networking
  • - -
  • [ - ] nfs-common
  • - -
  • [ + ] nginx
  • - -
  • [ - ] paxctld
  • - -
  • [ - ] php7.4-fpm
  • - -
  • [ + ] php8.2-fpm
  • - -
  • [ + ] procps
  • - -
  • [ - ] pulseaudio-enable-autospawn
  • - -
  • [ + ] raspi-config
  • - -
  • [ + ] rng-tools-debian
  • - -
  • [ - ] rpcbind
  • - -
  • [ - ] rsync
  • - -
  • [ - ] saned
  • - -
  • [ + ] ssh
  • - -
  • [ - ] sudo
  • - -
  • [ + ] triggerhappy
  • - -
  • [ + ] udev
  • - -
  • [ - ] uuidd
  • - -
  • [ - ] x11-common
  • - -
-

tldr@chopchop:~ $getent group

-
    - -
  • root:x:0:
  • - -
  • daemon:x:1:
  • - -
  • bin:x:2:
  • - -
  • sys:x:3:
  • - -
  • adm:x:4:xpub
  • - -
  • tty:x:5:
  • - -
  • disk:x:6:
  • - -
  • lp:x:7:aleevadh,bernabereit,lorenzo,mania,mszw,mxrwho,river,senak,thijsoid,v,vitrinekast,wang,xpub,xpub,zerozeta,zz1,www-data
  • - -
  • mail:x:8:
  • - -
  • news:x:9:
  • - -
  • uucp:x:10:
  • - -
  • man:x:12:
  • - -
  • proxy:x:13:
  • - -
  • kmem:x:15:
  • - -
  • dialout:x:20:xpub,mb,river,joak,aleevadh,bernabereit,lorenzo,mania,mszw,mxrwho,river,senak,thijsoid,v,vitrinekast,wang,xpub,zerozeta,zz1,murtaugh,mb
  • - -
  • fax:x:21:
  • - -
  • voice:x:22:
  • - -
  • cdrom:x:24:xpub
  • - -
  • floppy:x:25:
  • - -
  • tape:x:26:
  • - -
  • sudo:x:27:joak,aleevadh,bernabereit,lorenzo,mania,mszw,mxrwho,river,senak,thijsoid,v,vitrinekast,wang,xpub,zerozeta,zz1,murtaugh,mb,strt,cristina,chipchip,killer
  • - -
  • audio:x:29:xpub,river,pulse,vitrinekast,liquidsoap
  • - -
  • dip:x:30:
  • - -
  • www-data:x:33:vitrinekast
  • - -
  • backup:x:34:
  • - -
  • operator:x:37:
  • - -
  • list:x:38:
  • - -
  • irc:x:39:
  • - -
  • src:x:40:
  • - -
  • gnats:x:41:
  • - -
  • shadow:x:42:
  • - -
  • utmp:x:43:
  • - -
  • video:x:44:xpub
  • - -
  • sasl:x:45:
  • - -
  • plugdev:x:46:xpub
  • - -
  • staff:x:50:
  • - -
  • games:x:60:xpub
  • - -
  • users:x:100:xpub,murtaugh,aleevadh,h4ck3r,mania,mszw,mxrwho,senak,v,wang,zerozeta,bernabereit,lorenzo,mb,river,thijsoid,vitrinekast,zz1,joak,cristina,strt,chipchip,killer
  • - -
  • nogroup:x:65534:
  • - -
  • systemd-journal:x:101:
  • - -
  • systemd-network:x:102:
  • - -
  • systemd-resolve:x:103:
  • - -
  • input:x:104:xpub
  • - -
  • kvm:x:105:
  • - -
  • render:x:106:xpub
  • - -
  • crontab:x:107:
  • - -
  • netdev:x:108:xpub
  • - -
  • systemd-timesync:x:109:
  • - -
  • messagebus:x:110:
  • - -
  • bluetooth:x:112:
  • - -
  • avahi:x:113:
  • - -
  • spi:x:999:xpub
  • - -
  • i2c:x:998:xpub
  • - -
  • gpio:x:997:xpub
  • - -
  • systemd-coredump:x:996:
  • - -
  • xpub:x:1000:
  • - -
  • vitrinekast:x:1001:
  • - -
  • senak:x:1002:
  • - -
  • lorenzo:x:1003:
  • - -
  • mxrwho:x:1004:
  • - -
  • bernabereit:x:1005:
  • - -
  • river:x:1006:
  • - -
  • v:x:1007:
  • - -
  • mania:x:1008:
  • - -
  • aleevadh:x:1009:
  • - -
  • h4ck3r:x:1010:
  • - -
  • thijsoid:x:1011:
  • - -
  • mszw:x:1012:
  • - -
  • zerozeta:x:1013:
  • - -
  • wang:x:1014:
  • - -
  • zz1:x:1015:
  • - -
  • Debian-exim:x:114:
  • - -
  • rtkit:x:115:
  • - -
  • murtaugh:x:1017:
  • - -
  • mb:x:1016:
  • - -
  • pulse:x:116:
  • - -
  • pulse-access:x:117:
  • - -
  • mlocate:x:118:
  • - -
  • uuidd:x:119:
  • - -
  • joak:x:1018:
  • - -
  • sgx:x:120:
  • - -
  • plocate:x:121:
  • - -
  • polkitd:x:995:
  • - -
  • _ssh:x:111:
  • - -
  • pipewire:x:122:
  • - -
  • cristina:x:1019:
  • - -
  • strt:x:1020:
  • - -
  • incron:x:123:
  • - -
  • chipchip:x:1021:
  • - -
  • killer:x:1022:
  • - -
  • tcpdump:x:124:
  • - -
  • liquidsoap:x:125:
  • - -
  • lpadmin:x:126:river,xpub
  • - -
  • ssl-cert:x:127:
  • - -
  • scanner:x:128:saned
  • - -
  • saned:x:129:
  • - -
  • colord:x:130:
  • - -
-
-
-
- - - - diff --git a/log-books/a.epub b/log-books/a.epub new file mode 100644 index 0000000..aa34232 Binary files /dev/null and b/log-books/a.epub differ diff --git a/log-books/log_2024-03-21_22:37:39.epub b/log-books/log_2024-03-21_22:37:39.epub new file mode 100644 index 0000000..3cd4b2f Binary files /dev/null and b/log-books/log_2024-03-21_22:37:39.epub differ diff --git a/log-books/log_2024-03-22_08:54:54.epub b/log-books/log_2024-03-22_08:54:54.epub new file mode 100644 index 0000000..c288d00 Binary files /dev/null and b/log-books/log_2024-03-22_08:54:54.epub differ diff --git a/logged_book.epub b/logged_book.epub new file mode 100644 index 0000000..c288d00 Binary files /dev/null and b/logged_book.epub differ diff --git a/output.html b/output.html deleted file mode 100644 index 7e2ccbf..0000000 --- a/output.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - Document - - - - - -
-

TL;DR

-

too log didn't read

-

This log was generated on 2024-03-18 16:00:25.550452, the next will be available after 2024-03-18 19:00:25.550452

-
- - - -
-
-
-
-
-

What happened today?

- -
uptime -s
-

2024-03-18 07:51:34

- - - This is common, the fragility of these machines are more prominant than any cloud user expects. Partially because of scale, partially because a lot of labour that happen in datacenters just escapes us all when we want to just upload an image. - - - - -

the ones below do not have the "right" annotation levels

- -
last_user_added
-

Feb 29 15:08:48 chopchop useradd[8744]: new user: name=colord, UID=118, GID=130, home=/var/lib/colord, shell=/usr/sbin/nologin, from=/dev/pts/4 - - - - A level 1 annotation for last_user_added - - - -

users_created_today
-

-- No entries -- - - - - A level 1 annotation for users_created_today - - - -

list_active_services
-

[ - ] alsa-utils - [ - ] apparmor - [ + ] atop - [ + ] atopacct - [ + ] bluetooth - [ - ] console-setup.sh - [ + ] cron - [ + ] cups - [ + ] cups-browsed - [ + ] dbus - [ + ] dphys-swapfile - [ + ] exim4 - [ + ] fake-hwclock - [ - ] fcgiwrap - [ - ] hwclock.sh - [ + ] incron - [ - ] keyboard-setup.sh - [ + ] kmod - [ + ] networking - [ - ] nfs-common - [ + ] nginx - [ - ] paxctld - [ - ] php7.4-fpm - [ + ] php8.2-fpm - [ + ] procps - [ - ] pulseaudio-enable-autospawn - [ + ] raspi-config - [ + ] rng-tools-debian - [ - ] rpcbind - [ - ] rsync - [ - ] saned - [ + ] ssh - [ - ] sudo - [ + ] triggerhappy - [ + ] udev - [ - ] uuidd - [ - ] x11-common - - - - A level 1 annotation for list_active_services - - - -

list_groups
-

root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4:xpub -tty:x:5: -disk:x:6: -lp:x:7:aleevadh,bernabereit,lorenzo,mania,mszw,mxrwho,river,senak,thijsoid,v,vitrinekast,wang,xpub,xpub,zerozeta,zz1,www-data -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20:xpub,mb,river,joak,aleevadh,bernabereit,lorenzo,mania,mszw,mxrwho,river,senak,thijsoid,v,vitrinekast,wang,xpub,zerozeta,zz1,murtaugh,mb -fax:x:21: -voice:x:22: -cdrom:x:24:xpub -floppy:x:25: -tape:x:26: -sudo:x:27:joak,aleevadh,bernabereit,lorenzo,mania,mszw,mxrwho,river,senak,thijsoid,v,vitrinekast,wang,xpub,zerozeta,zz1,murtaugh,mb,strt,cristina,chipchip,killer -audio:x:29:xpub,river,pulse,vitrinekast,liquidsoap -dip:x:30: -www-data:x:33:vitrinekast -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44:xpub -sasl:x:45: -plugdev:x:46:xpub -staff:x:50: -games:x:60:xpub -users:x:100:xpub,murtaugh,aleevadh,h4ck3r,mania,mszw,mxrwho,senak,v,wang,zerozeta,bernabereit,lorenzo,mb,river,thijsoid,vitrinekast,zz1,joak,cristina,strt,chipchip,killer -nogroup:x:65534: -systemd-journal:x:101: -systemd-network:x:102: -systemd-resolve:x:103: -input:x:104:xpub -kvm:x:105: -render:x:106:xpub -crontab:x:107: -netdev:x:108:xpub -systemd-timesync:x:109: -messagebus:x:110: -bluetooth:x:112: -avahi:x:113: -spi:x:999:xpub -i2c:x:998:xpub -gpio:x:997:xpub -systemd-coredump:x:996: -xpub:x:1000: -vitrinekast:x:1001: -senak:x:1002: -lorenzo:x:1003: -mxrwho:x:1004: -bernabereit:x:1005: -river:x:1006: -v:x:1007: -mania:x:1008: -aleevadh:x:1009: -h4ck3r:x:1010: -thijsoid:x:1011: -mszw:x:1012: -zerozeta:x:1013: -wang:x:1014: -zz1:x:1015: -Debian-exim:x:114: -rtkit:x:115: -murtaugh:x:1017: -mb:x:1016: -pulse:x:116: -pulse-access:x:117: -mlocate:x:118: -uuidd:x:119: -joak:x:1018: -sgx:x:120: -plocate:x:121: -polkitd:x:995: -_ssh:x:111: -pipewire:x:122: -cristina:x:1019: -strt:x:1020: -incron:x:123: -chipchip:x:1021: -killer:x:1022: -tcpdump:x:124: -liquidsoap:x:125: -lpadmin:x:126:river,xpub -ssl-cert:x:127: -scanner:x:128:saned -saned:x:129: -colord:x:130: - - - - A level 1 annotation for list_groups - - - - -

list_package_installs
-

2024-03-10 15:16:14 install libtk8.6:armhf 8.6.13-2 -2024-03-10 15:16:14 status half-installed libtk8.6:armhf 8.6.13-2 -2024-03-10 15:16:15 install tk8.6-blt2.5:armhf 2.5.3+dfsg-4.1 -2024-03-10 15:16:15 status half-installed tk8.6-blt2.5:armhf 2.5.3+dfsg-4.1 -2024-03-10 15:16:15 install blt:armhf 2.5.3+dfsg-4.1 -2024-03-10 15:16:15 status half-installed blt:armhf 2.5.3+dfsg-4.1 -2024-03-10 15:16:15 install python3-tk:armhf 3.11.2-3 -2024-03-10 15:16:15 status half-installed python3-tk:armhf 3.11.2-3 -2024-03-10 15:16:16 status installed libtk8.6:armhf 8.6.13-2 -2024-03-10 15:16:16 status installed tk8.6-blt2.5:armhf 2.5.3+dfsg-4.1 -2024-03-10 15:16:16 status installed blt:armhf 2.5.3+dfsg-4.1 -2024-03-10 15:16:16 status installed python3-tk:armhf 3.11.2-3 -2024-03-10 15:16:16 status installed libc-bin:armhf 2.36-9+rpt2+deb12u4 -2024-03-12 14:29:01 install python3-markupsafe:armhf 2.1.2-1 -2024-03-12 14:29:01 status half-installed python3-markupsafe:armhf 2.1.2-1 -2024-03-12 14:29:02 install python3-jinja2:all 3.1.2-1 -2024-03-12 14:29:02 status half-installed python3-jinja2:all 3.1.2-1 -2024-03-12 14:29:02 status installed python3-markupsafe:armhf 2.1.2-1 -2024-03-12 14:29:03 status installed python3-jinja2:all 3.1.2-1 -2024-03-15 09:51:48 install libhttp-parser2.9:armhf 2.9.4-5 -2024-03-15 09:51:48 status half-installed libhttp-parser2.9:armhf 2.9.4-5 -2024-03-15 09:51:48 install libmbedx509-1:armhf 2.28.3-1 -2024-03-15 09:51:48 status half-installed libmbedx509-1:armhf 2.28.3-1 -2024-03-15 09:51:48 install libmbedtls14:armhf 2.28.3-1 -2024-03-15 09:51:48 status half-installed libmbedtls14:armhf 2.28.3-1 -2024-03-15 09:51:48 install libgit2-1.5:armhf 1.5.1+ds-1+deb12u1 -2024-03-15 09:51:48 status half-installed libgit2-1.5:armhf 1.5.1+ds-1+deb12u1 -2024-03-15 09:51:49 install bat:armhf 0.22.1-4 -2024-03-15 09:51:49 status half-installed bat:armhf 0.22.1-4 -2024-03-15 09:51:50 status installed libmbedx509-1:armhf 2.28.3-1 -2024-03-15 09:51:50 status installed libmbedtls14:armhf 2.28.3-1 -2024-03-15 09:51:50 status installed libhttp-parser2.9:armhf 2.9.4-5 -2024-03-15 09:51:50 status installed libgit2-1.5:armhf 1.5.1+ds-1+deb12u1 -2024-03-15 09:51:50 status installed bat:armhf 0.22.1-4 -2024-03-15 09:51:50 status installed libc-bin:armhf 2.36-9+rpt2+deb12u4 -2024-03-15 09:55:52 status installed bat:armhf 0.22.1-4 -2024-03-15 09:55:52 status half-installed bat:armhf 0.22.1-4 -2024-03-15 09:55:52 status not-installed bat:armhf - - - - A level 1 annotation for list_package_installs - - - -

list_package_upgrade
-

- - - A level 1 annotation for list_package_upgrade - - - -

list_package_remove
-

2024-03-15 09:55:52 startup packages remove -2024-03-15 09:55:52 remove bat:armhf 0.22.1-4 - - - - A level 1 annotation for list_package_remove - - - -

device_info
-

Raspberry Pi 4 Model B Rev 1.4 - - - A level 1 annotation for device_info - - - -

debian_version
-

12.1 - - - - A level 1 annotation for debian_version - - - -

kernel_version
-

Linux chopchop 6.1.65-v8+ #1703 SMP PREEMPT Tue Dec 5 16:25:41 GMT 2023 aarch64 GNU/Linux - - - - A level 1 annotation for kernel_version - - - -

-
- - - - - - - - - - - diff --git a/page.html b/page.html deleted file mode 100644 index cf69ce5..0000000 --- a/page.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - Document - - - - - - - -
-

TL;DR

-

too log didn't read

-
- - - -
-
-
-
-
-

What happened today?

-
10.0.0.1 - - [05/Mar/2024:14:27:39 +0000]
-            "GET /~murtaugh/__lab__/api/sessions?1709648858744
-            AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
-            10.0.0.1 - - [05/Mar/2024:14:27:39 +0000] "GET /~murtaugh/__lab__/
-            api/kernelspecs?1709648858775 HTTP/1.1" 200 540
-            "https://hub.xpub.nl/chopchop/~murtaugh/__lab__/lab/tree/public_html/
-            T2_Assessments.ipynb" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
-            (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
-        
- a new user was added, a network of trust grew -
lic_html/T2_Assessments.ipynb" "Mozilla/5.0 (X11; Linux x86_64)
-                AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
-                10.0.0.1 - - [05/Mar/2024:14:27:39 +0000] "GET /~murtaugh/__lab__/
-                api/kernelspecs?1709648858775 HTTP/1.1" 200 540
-                "https://hub.xpub.nl/chopchop/~murtaugh/__lab__/lab/tree/public_html/
-                T2_Assessments.ipynb" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
-                (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" 10.0.0.1 - - [05/Mar/2024:14:27:39 +0000]
-                "GET /~murtaugh/__lab__/api/sessions?1709648858744
-                AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
-                10.0.0.1 - - [05/Mar/2024:14:27:39 +0000] "GET /~murtaugh/__lab__/
-                api/kernelspecs?1709648858775 HTTP/1.1" 200 540
-                "https://hub.xpub.nl/chopchop/~murtaugh/__lab__/lab/tree/public_html/
-                T2_Assessments.ipynb" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
-                (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
- a new user was added, a network of trust grew -
   lic_html/T2_Assessments.ipynb" "Mozilla/5.0 (X11; Linux x86_64)
-            AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
-            10.0.0.1 - - [05/Mar/2024:14:27:39 +0000] "GET /~murtaugh/__lab__/
-            api/kernelspecs?1709648858775 HTTP/1.1" 200 540
-            "https://hub.xpub.nl/chopchop/~murtaugh/__lab__/lab/tree/public_html/
-            T2_Assessments.ipynb" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
-            (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
- there's a peak users logged into the server, if everyone uses -
-
- - - - - - - - - - \ No newline at end of file diff --git a/print.css b/print.css new file mode 100644 index 0000000..cd6986f --- /dev/null +++ b/print.css @@ -0,0 +1,23 @@ +body { + font-family: Eurostile; +} + +ul { + list-style-type: none; + padding: 0 0; + margin-bottom: 1cm; +} + +dfn, samp, dd { + text-align: center; +} + +mark { + background: yellow; + display: block; + clear:both; +} + +code { + font-family: monospace; +} \ No newline at end of file diff --git a/script.py b/script.py index 88ebec5..bd65a48 100644 --- a/script.py +++ b/script.py @@ -5,11 +5,13 @@ import os import fnmatch # TODO: check sorting of these files (should be chronological) +# Getting the dynamic variables log_files = fnmatch.filter(os.listdir("./logs"), '*.html') - now = datetime.today() next_report = now + timedelta(hours=3) +log_file_name = "log_" + now.strftime("%Y-%m-%d_%H:%M:%S") + ".html" +# Execute a command on the command line. Based = used for piped commands def run_command(command, based = False): result = subprocess.run(command, capture_output=True, input=based) result.check_returncode() @@ -18,7 +20,10 @@ def run_command(command, based = False): return "" else: return stripped - + + +# Run all the commands for getting the logs, and assign to variables +print("start running the log commands"); last_user_added = subprocess.run(["sudo", "journalctl","_COMM=useradd","-r","-n", "1" , "--output-fields=MESSAGE"], capture_output=True) last_user_added_name = run_command(['grep', '-Po', "(?<=name)\W*\K[^ ]*"], based=last_user_added.stdout) users_created_today = run_command(["sudo", "journalctl", "-S","today","_COMM=useradd","-r","--output-fields=MESSAGE"]).splitlines() @@ -38,16 +43,17 @@ device_info = run_command(['awk', '-F:', '{ print $2}'], based=device_info_grab. ip_address_show = subprocess.run(["ip", "addr", "show", "end0"], check=True, capture_output=True) ip_address = run_command(['awk', '$1 == "inet" {gsub(/\/.*$/, "", $2); print $2}' ], based=ip_address_show.stdout) +print("start running the service commands, this sometimes takes longer"); logins_today_log = subprocess.run(["sudo", "journalctl","_COMM=systemd-logind","-r" , "--output-fields=MESSAGE", "-S", "today", "-g", "'New session'" ], capture_output=True) logins_today = run_command(['grep', '-v', "'Boot'"], based=logins_today_log.stdout) - kitchen_services = run_command(["sudo", "journalctl", "-S", "today", "-u", "kitchen-stove.service", "-u", "kitchen-bin.service", "-u", "kitchen-fridge.service", "-r", "-n"]).splitlines() -# loading the environment +# loading the jinja template environment +print("Filling the template"); env = Environment(loader=FileSystemLoader("templates")) -# # loading the template -template = env.get_template("template.jinja") +# loading the template (use template.jinja when generating the html webview) +template = env.get_template("book.jinja") # rendering the template and storing the resultant text in variable output output = template.render( @@ -78,10 +84,17 @@ output = template.render( user_deleted = run_command(["sudo", "journalctl", "-S","today","_COMM=userdel","-r"]).splitlines(), ) -log_file_name = "logs/log_" + now.strftime("%Y-%m-%d_%H:%M:%S") + ".html" -with open("index.html", "w") as f: +print("Output the files"); +# Export the html as book.html, which is used as an input for pandoc +with open("book.html", "w") as f: print(output, file=f) + subprocess.run(["pandoc", "book.html", "-o", "logged_book.epub", "-c", "print.css", "--metadata", "title="+log_file_name], capture_output=True) + print("just generated a new book, also put it in the backlog of logs") + subprocess.run(["cp", "logged_book.epub", "log-books/log_" + now.strftime("%Y-%m-%d_%H:%M:%S") + ".epub"], capture_output=True) + print("Finished"); -with open(log_file_name, "w") as f: - print(output, file=f) \ No newline at end of file +# At the moment, we are not storing logs in the log folder anymore +# with open(log_file_name, "w") as f: +# print(output, file=f) + \ No newline at end of file diff --git a/style.css b/style.css index cb9e394..be1f799 100644 --- a/style.css +++ b/style.css @@ -39,8 +39,10 @@ body { margin: 0 0; padding: 0 0; font-family: "DuctusRegular", sans-serif; - background-color: var(--background); - display: grid; + background-color: black; + /* background-color: var(--background); */ + + /* display: grid; */ grid-template-columns: min-content 1fr min-content; grid-template-rows: min-content min-content 1fr min-content; grid-gap: 1rem 1rem; @@ -183,7 +185,7 @@ nav label { } .annotation { - background-color: white; + background-color: pink; color: black; width: auto; max-height: 0px; diff --git a/templates/book.jinja b/templates/book.jinja new file mode 100644 index 0000000..9908943 --- /dev/null +++ b/templates/book.jinja @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + A log book of {{now}} + + + + +
+

TL;DR

+

too log didn't read

+
+ +
+

What happened today?

+
tldr@chopchop:~ $sudo journalctl -S today -u kitchen-stove.service -u
+      kitchen-bin.service -u kitchen-fridge.service -r -n
+ {% if kitchen_services|length > 0 %} + + {% endif %} + +
tldr@chopchop:~ $uptime -s
+

{{ since_last_boot }}

+ {% if since_last_boot is defined %} + + {% if days_since_last_boot|int > 14 %}This is unusual, we are used to ...{% else %}This is common, the + fragility of these machines are more prominant than any cloud user expects. Partially because of scale, + partially because a lot of labour that happen in datacenters just escapes us all when we want to just upload + an image.{% endif %} + + {% endif %} + + +
tldr@chopchop:~ $sudo journalctl _COMM=useradd -r -n 1 --output-fields=MES
+ +

{{last_user_added}}

+ {% if last_user_name is defined %} + + {{ last_user_name}} user/s was/were added [] days ago, and the network of trust grew ever so slightly. + + {% endif %} + {% if last_user_added is defined %} + + Users will be trusted with not just the keys and passwords to the "house" which is the server, but with a + portion of responsibility to keep it afloat and contribute to what makes it a community of practices (and + network of knowledge and dependence). + + {% endif %} + + +
tldr@chopchop:~ $sudo journalctl -S today _COMM=useradd -r
+ {% if users_created_today is defined %} + + A level 1 annotation for users_created_today + + {% endif %} + + {% if list_package_installs|length > 0 %} +
tldr@chopchop:~ $ grep 'install' /var/log/dpkg.log
+ + {% endif %} + + {% if list_package_upgrade|length > 0 %} +
tldr@chopchop:~ $ grep 'upgrade' /var/log/dpkg.log
+ + {% endif %} + + {% if list_package_remove|length > 0 %} +
tldr@chopchop:~ $ grep 'remove' /var/log/dpkg.log
+ + {% endif %} + +
tldr@chopchop:~ $sudo journalctl _COMM=systemd-login
+    --output-fields=MESSAGE -S today -g "New session" | grep -v 'Boot'
+ + +
tldr@chopchop:~ $sudo journalctl _COMM=groupadd -r --output-fields=MESSAGE
+ + +
tldr@chopchop:~ $sudo journalctl _COMM=groupremove -r --output-fields=MES
+ + + +
tldr@chopchop:~ $sudo journalctl _COMM=usermod -r
+ + +
tldr@chopchop:~ $sudo journalctl _COMM=userdel -r
+ + +
+ +
tldr@chopchop:~ $sudo service --status-all
+ + +
tldr@chopchop:~ $getent group
+ +
+ + + + + \ No newline at end of file