Skip to content

Commit

Permalink
Details for systemd. kubectl without clusterAdmin
Browse files Browse the repository at this point in the history
  • Loading branch information
lwindolf committed Sep 6, 2023
1 parent 959fe4d commit 4900edf
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/probes/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
}
},
"k8s Pods": {
"command" : "kubectl get pods -A 2>/dev/null | egrep -i 'Err|Failed|ImagePull|Pending|Creating'",
"command" : "(kubectl get pods -A 2>/dev/null || kubectl get pods 2>/dev/null) | egrep -i 'Err|Failed|ImagePull|Pending|Creating'",
"local" : "True",
"localOnly" : "True",
"initial": "True",
Expand All @@ -298,7 +298,7 @@
}
},
"k8s PVCs": {
"command": "kubectl get pvc -A 2>/dev/null | egrep -i 'Failed|Pending'",
"command": "(kubectl get pvc -A 2>/dev/null || kubectl get pvc 2>/dev/null) | egrep -i 'Failed|Pending'",
"local" : "True",
"localOnly" : "True",
"initial": "True",
Expand Down
35 changes: 33 additions & 2 deletions frontend/notebooks/systemd.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
# %% [markdown]
## Debugging Systemd Problems

# %% [markdown]
Status for a specific unit
# %% [shell]
systemctl status dbus
# %% [markdown]
Failed systemd units

# %% [shell]
systemctl --failed
# %% [markdown]
Status for a specific unit
Reset a failed unit. This is useful if the restart of a unit runs into a rate limit and you cannot restart it anymore.
# %% [shell]
systemctl reset-failed <unit>
# %% [markdown]
### Modifying Units
# %% [shell]
systemctl edit <unit>
systemctl daemon-reload
# %% [markdown]
### Performance Debugging
# %% [shell]
systemd-analyze blame
# %% [markdown]
### Logging Disk Space

Show used disk space
# %% [shell]
journalctl --disk-usage
# %% [markdown]
Force a log rotation
# %% [shell]
journalctl --rotate
# %% [markdown]
Drop all logs older 2 days
# %% [shell]
journalctl --vacuum-time=2d
# %% [markdown]
Free everything until only 100MB used
# %% [shell]
systemctl status dbus
journalctl --vacuum-size=100M

0 comments on commit 4900edf

Please sign in to comment.