Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Goal
What is the purpose of this PR?

## Changes
What was changed?

## Testing
How was it tested?

### Checklist
- [ ] Clear, descriptive PR title
- [ ] Documentation/README updated (if needed)
- [ ] No secrets or large temporary files committed
6 changes: 6 additions & 0 deletions labs/artifacts/lab8/df-h.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Filesystem Size Used Avail Use% Mounted on
tmpfs 593M 1.5M 591M 1% /run
/dev/sda2 25G 13G 11G 55% /
tmpfs 2.9G 0 2.9G 0% /dev/shm
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs 593M 116K 593M 1% /run/user/1000
10 changes: 10 additions & 0 deletions labs/artifacts/lab8/du-var-top10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
3.1G /var
2.8G /var/lib
2.2G /var/lib/snapd
1.2G /var/lib/snapd/cache
1.1G /var/lib/snapd/snaps
254M /var/lib/apt/lists
254M /var/lib/apt
181M /var/cache
177M /var/lib/docker
176M /var/lib/docker/overlay2
122 changes: 122 additions & 0 deletions labs/artifacts/lab8/iostat-x-1-5.txt

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions labs/artifacts/lab8/iotop-active.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
6011 be/4 root 0.00 B/s 408.18 M/s ?unavailable? dd if=/dev/zero of=/tmp/lab8-io-test.bin bs=8M count=128 status=none
6011 be/4 root 0.00 B/s 251.94 M/s ?unavailable? dd if=/dev/zero of=/tmp/lab8-io-test.bin bs=8M count=128 status=none
6015 be/4 root 0.00 B/s 3.85 K/s ?unavailable? python3 /usr/sbin/iotop -b -o -n 5 -qqq
6012 be/4 root 30.77 M/s 0.00 B/s ?unavailable? dd if=/var/lib/snapd/snaps/gnome-42-2204_247.snap of=/dev/null bs=4M status=none
6013 be/4 root 30.77 M/s 0.00 B/s ?unavailable? dd if=/var/lib/snapd/cache/6b8f0b8920d12519d7c5e677950a231810fa253e34962f312b3dfa58af9d91eeab9d5c1b3483cf0da6df66f23f3f5f8d of=/dev/null bs=4M status=none
6011 be/4 root 0.00 B/s 101.88 M/s ?unavailable? dd if=/dev/zero of=/tmp/lab8-io-test.bin bs=8M count=128 status=none
6012 be/4 root 38.45 M/s 0.00 B/s ?unavailable? dd if=/var/lib/snapd/snaps/gnome-42-2204_247.snap of=/dev/null bs=4M status=none
6013 be/4 root 30.76 M/s 0.00 B/s ?unavailable? dd if=/var/lib/snapd/cache/6b8f0b8920d12519d7c5e677950a231810fa253e34962f312b3dfa58af9d91eeab9d5c1b3483cf0da6df66f23f3f5f8d of=/dev/null bs=4M status=none
6011 be/4 root 0.00 B/s 100.00 M/s ?unavailable? dd if=/dev/zero of=/tmp/lab8-io-test.bin bs=8M count=128 status=none
6012 be/4 root 31.37 M/s 0.00 B/s ?unavailable? dd if=/var/lib/snapd/snaps/gnome-42-2204_247.snap of=/dev/null bs=4M status=none
6013 be/4 root 39.22 M/s 0.00 B/s ?unavailable? dd if=/var/lib/snapd/cache/6b8f0b8920d12519d7c5e677950a231810fa253e34962f312b3dfa58af9d91eeab9d5c1b3483cf0da6df66f23f3f5f8d of=/dev/null bs=4M status=none
6012 be/4 root 21.93 M/s 0.00 B/s ?unavailable? dd if=/var/lib/snapd/snaps/gnome-42-2204_247.snap of=/dev/null bs=4M status=none
6013 be/4 root 30.34 M/s 0.00 B/s ?unavailable? dd if=/var/lib/snapd/cache/6b8f0b8920d12519d7c5e677950a231810fa253e34962f312b3dfa58af9d91eeab9d5c1b3483cf0da6df66f23f3f5f8d of=/dev/null bs=4M status=none
13 changes: 13 additions & 0 deletions labs/artifacts/lab8/pidstat-d-1-5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Linux 6.17.0-19-generic (andrey-VirtualBox) 05/10/2026 _x86_64_ (2 CPU)

05:53:04 PM UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command

05:53:05 PM UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command

05:53:06 PM UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command

05:53:07 PM UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command

05:53:08 PM UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command

Average: UID PID kB_rd/s kB_wr/s kB_ccwr/s iodelay Command
1 change: 1 addition & 0 deletions labs/artifacts/lab8/run-timestamp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-10 17:52:59 MSK
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions labs/artifacts/lab8/top-cpu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
PID COMMAND %CPU %MEM
5567 ps 250 0.0
2272 gnome-shell 1.2 5.8
5421 packagekitd 0.7 0.3
3372 kworker/1:0-eve 0.2 0.0
1175 happd 0.2 0.2
891 polkitd 0.1 0.2
1 systemd 0.1 0.2
2565 ibus-extension- 0.1 0.4
5143 sshd 0.1 0.1
895 snapd 0.1 0.6
868 dbus-daemon 0.1 0.1
1189 containerd 0.1 0.8
1224 dockerd 0.1 1.2
24 ksoftirqd/1 0.0 0.0
15 changes: 15 additions & 0 deletions labs/artifacts/lab8/top-mem.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
PID COMMAND %MEM %CPU
2272 gnome-shell 5.8 1.2
2936 mutter-x11-fram 1.7 0.0
2809 gsd-xsettings 1.3 0.0
1224 dockerd 1.2 0.1
2358 Xwayland 1.1 0.0
2403 evolution-alarm 1.0 0.0
1189 containerd 0.8 0.1
2359 evolution-sourc 0.7 0.0
2930 xdg-desktop-por 0.6 0.0
895 snapd 0.6 0.1
3070 update-notifier 0.5 0.0
2731 evolution-addre 0.5 0.0
2686 snapd-desktop-i 0.5 0.0
2565 ibus-extension- 0.4 0.1
3 changes: 3 additions & 0 deletions labs/artifacts/lab8/var-largest-3-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
607M /var/lib/snapd/cache/6b8f0b8920d12519d7c5e677950a231810fa253e34962f312b3dfa58af9d91eeab9d5c1b3483cf0da6df66f23f3f5f8d
532M /var/lib/snapd/snaps/gnome-42-2204_247.snap
395M /var/lib/snapd/cache/651a6f21a71dfa0a5303df4e7e5661ba7a9213d5177cdc99ae3f0a1798e47bd6ee4b3805063e8f86da1f7b1b8ce9eacb
102 changes: 102 additions & 0 deletions labs/submission8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Lab 8 - Submission

## Task 1 - Key Metrics for SRE and System Analysis

### Commands used

```bash
sudo apt-get update -y
sudo apt-get install -y htop sysstat iotop

ps -eo pid,comm,%cpu,%mem --sort=-%cpu | head -n 15
ps -eo pid,comm,%mem,%cpu --sort=-%mem | head -n 15
iostat -x 1 5
pidstat -d 1 5

df -h
sudo du -h /var | sort -rh | head -n 10
sudo find /var -type f -exec du -h {} + | sort -rh | head -n 3
```

### Key results

Top 3 CPU consumers (excluding short-lived `ps`):
1. `gnome-shell` (~1.2% CPU)
2. `packagekitd` (~0.7% CPU)
3. `happd` (~0.2% CPU)

Top 3 memory consumers:
1. `gnome-shell` (~5.8% MEM)
2. `mutter-x11-frames` (~1.7% MEM)
3. `gsd-xsettings` (~1.3% MEM)

Top 3 I/O consumers (`iotop` under controlled load):
1. `dd if=/dev/zero of=/tmp/lab8-io-test.bin ...` (write up to ~408 MB/s)
2. `dd if=/var/lib/snapd/snaps/gnome-42-2204_247.snap ...` (read ~21-38 MB/s)
3. `dd if=/var/lib/snapd/cache/... ...` (read ~30-39 MB/s)

Top 3 largest files in `/var`:
1. `607M /var/lib/snapd/cache/6b8f0b8920d12519d7c5e677950a231810fa253e34962f312b3dfa58af9d91eeab9d5c1b3483cf0da6df66f23f3f5f8d`
2. `532M /var/lib/snapd/snaps/gnome-42-2204_247.snap`
3. `395M /var/lib/snapd/cache/651a6f21a71dfa0a5303df4e7e5661ba7a9213d5177cdc99ae3f0a1798e47bd6ee4b3805063e8f86da1f7b1b8ce9eacb`

Artifacts:
- `labs/artifacts/lab8/top-cpu.txt`
- `labs/artifacts/lab8/top-mem.txt`
- `labs/artifacts/lab8/iostat-x-1-5.txt`
- `labs/artifacts/lab8/pidstat-d-1-5.txt`
- `labs/artifacts/lab8/iotop-active.txt`
- `labs/artifacts/lab8/df-h.txt`
- `labs/artifacts/lab8/du-var-top10.txt`
- `labs/artifacts/lab8/var-largest-3-files.txt`

### Analysis

The system stayed mostly idle on CPU, with desktop services as the primary steady consumers. Most disk usage in `/var` is concentrated in `snapd` cache and snap packages, while Docker storage usage is smaller in this snapshot.

### Reflection

Main optimization actions:
- Clean snap cache and remove unused snap revisions.
- Keep periodic Docker image cleanup.
- Track baseline CPU/I/O/storage trends and alert on deviations.

---

## Task 2 - Practical Website Monitoring Setup (Checkly)

### Monitored website

- `https://example.com`

### Configured checks

1. API Check
- URL: `https://example.com`
- Assertion: status code `200`
- Frequency: every `5` minutes

2. Browser Check
- URL: `https://example.com`
- Validation: page title contains `Example Domain`
- Validation: text `Example Domain` is visible

3. Alerts
- Alert on failed checks
- Alert on high latency threshold
- Notification channel: email

### Evidence (screenshots)

- `labs/artifacts/lab8/screenshots/checkly-browser-config.png`
- `labs/artifacts/lab8/screenshots/checkly-success-result.png`
- `labs/artifacts/lab8/screenshots/checkly-alert-settings.png`
- `labs/artifacts/lab8/screenshots/checkly-dashboard-overview.png`

### Analysis

The setup combines availability checks (API) and user-facing behavior checks (Browser). This reduces blind spots where endpoint status is green but user experience is degraded.

### Reflection

This monitoring approach improves incident detection speed and helps reduce MTTR by alerting on both downtime and performance issues.
1 change: 1 addition & 0 deletions labs/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test commit