Probe: Minimal systemctl check

This commit is contained in:
iotux
2025-12-28 07:57:46 +01:00
parent f54850908f
commit 9f272a5721
+9 -40
View File
@@ -8,49 +8,18 @@ jobs:
investigate:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 1. Dump Environment Variables
run: env | sort
- name: 2. List Running Processes
run: ps -ef
- name: 3. Check for Systemd (PID 1)
- name: Check Systemd
run: |
echo "PID 1 is:"
echo "1. Checking PID 1..."
ps -p 1 -o comm=
echo "Checking systemctl:"
systemctl status || true
- name: 4. Check for Docker
- name: Check Service Status
run: |
which docker || echo "Docker executable not found"
docker --version || echo "Docker version check failed"
docker info || echo "Docker daemon check failed"
- name: 5. Kernel & OS Info
run: |
uname -a
cat /etc/os-release
cat /proc/cgroups || echo "No cgroups access"
- name: 6. Test Monitor Command
run: |
echo "Testing native systemctl check..."
# Check a service we know exists (dbus is visible in your process list)
if systemctl is-active dbus; then
echo "✅ SUCCESS: systemctl is-active dbus passed!"
echo "2. Checking if cron is active..."
if systemctl is-active cron; then
echo "✅ SUCCESS: cron is active via systemctl"
else
echo "❌ FAIL: systemctl is-active dbus failed."
fi
# Check a non-existent service (should fail gracefully)
if systemctl is-active fake-service-xyz; then
echo "❌ FAIL: fake-service should not be active."
else
echo "✅ SUCCESS: fake-service reported inactive."
echo "❌ FAIL: systemctl returned error"
exit 1
fi