You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
5.0 KiB
Django/Jinja

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" sizes="180x180" href="">
<meta name="author" content="html makers">
<meta name="description" content="">
<meta name="keywords" content="">
<meta property="og:type" content="">
<meta property="og:title" content="A log book of {{now}} from OG">
<meta property="og:image" content="">
<meta property="og:description" content="">
<meta property="og:url" content="">
<title>A log book of {{now}}</title>
</head>
<body>
<header>
<h1>TL;DR</h1>
<h2>too log didn't read</h2>
</header>
<article>
<h2>What happened today?</h2>
<pre><em>tldr@chopchop:~ $</em>sudo journalctl -S today -u kitchen-stove.service -u
kitchen-bin.service -u kitchen-fridge.service -r -n</pre>
{% if kitchen_services|length > 0 %}
<ul>
{% for item in kitchen_services %}
<li>{{ item }}</li>
{% endfor %}
</ul>
{% endif %}
<pre><em>tldr@chopchop:~ $</em>uptime -s</pre>
<p>{{ since_last_boot }}</p>
{% if since_last_boot is defined %}
<mark class="annotation fn-annotatation" level="1">
{% 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 %}
</mark>
{% endif %}
<pre><em>tldr@chopchop:~ $</em>sudo journalctl _COMM=useradd -r -n 1 --output-fields=MES</pre>
<p>{{last_user_added}}</p>
{% if last_user_name is defined %}
<mark class="annotation fn-annotatation" level="1">
{{ last_user_name}} user/s was/were added [] days ago, and the network of trust grew ever so slightly.
</mark>
{% endif %}
{% if last_user_added is defined %}
<mark class="annotation fn-annotatation" level="2">
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).
</mark>
{% endif %}
<pre><em>tldr@chopchop:~ $</em>sudo journalctl -S today _COMM=useradd -r</pre>
{% if users_created_today is defined %}
<mark class="annotation fn-annotatation" level="1">
A level 1 annotation for users_created_today
</mark>
{% endif %}
{% if list_package_installs|length > 0 %}
<pre><em>tldr@chopchop:~ $</em> grep 'install' /var/log/dpkg.log</pre>
<ul>
{% for item in list_package_installs %}
<li>{{ item }}</li>
{% endfor %}
</ul>
{% endif %}
{% if list_package_upgrade|length > 0 %}
<pre><em>tldr@chopchop:~ $</em> grep 'upgrade' /var/log/dpkg.log</pre>
<ul>
{% for item in list_package_upgrade %}
<li>{{ item }}</li>
{% endfor %}
</ul>
{% endif %}
{% if list_package_remove|length > 0 %}
<pre><em>tldr@chopchop:~ $</em> grep 'remove' /var/log/dpkg.log</pre>
<ul>
{% for item in list_package_remove %}
<li>{{ item }}</li>
{% endfor %}
</ul>
{% endif %}
<pre><em>tldr@chopchop:~ $</em>sudo journalctl _COMM=systemd-login
--output-fields=MESSAGE -S today -g "New session" | grep -v 'Boot'</pre>
<ul>
{% for item in logins_today %}
<li>{{ item }}</li>
{% endfor %}
</ul>
<pre><em>tldr@chopchop:~ $</em>sudo journalctl _COMM=groupadd -r --output-fields=MESSAGE</pre>
<ul>
{% for item in groups_created %}
<li>{{ item }}</li>
{% endfor %}
</ul>
<pre><em>tldr@chopchop:~ $</em>sudo journalctl _COMM=groupremove -r --output-fields=MES</pre>
<ul>
{% for item in groups_removed %}
<li>{{ item }}</li>
{% endfor %}
</ul>
<pre><em>tldr@chopchop:~ $</em>sudo journalctl _COMM=usermod -r</pre>
<ul>
{% for item in user_modified %}
<li>{{ item }}</li>
{% endfor %}
</ul>
<pre><em>tldr@chopchop:~ $</em>sudo journalctl _COMM=userdel -r</pre>
<ul>
{% for item in user_deleted %}
<li>{{ item }}</li>
{% endfor %}
</ul>
<hr />
<pre><em>tldr@chopchop:~ $</em>sudo service --status-all</pre>
<ul>
{% for item in list_active_services %}
<li>{{ item }}</li>
{% endfor %}
</ul>
<pre><em>tldr@chopchop:~ $</em>getent group</pre>
<ul>
{% for item in list_groups %}
<li>{{ item }}</li>
{% endfor %}
</ul>
</article>
<script type="text/javascript" src="script.js"></script>
</body>
</html>