Home / Prompts / Servers

Restart a stopped service

Find why a service stopped, then bring it back.

ServersStep by step

The prompt

Check the status of the service called myapp. If it is not running, show the last 50 log lines, explain why it stopped, and restart it after I confirm. Then check it is running.

What the AI will do

  1. Checks whether the service is running.
  2. If it stopped, shows the last 50 log lines and explains why.
  3. Restarts it after you confirm, then checks it is running.

On Windows, Mac and Linux

Linux: uses systemctl and journalctl; restarting needs sudo. Mac: uses launchctl or brew services. Windows: uses PowerShell and Event Viewer logs; restarting most services needs an administrator account.

How to use it

  1. Make sure Shellway is connected in ChatGPT, Claude or Cursor.
  2. Paste the prompt and change the folder names or paths to match your computer.
  3. Review the plan your AI shows before you confirm any changes.

Example reply

An illustration of a typical answer. Your AI will show the real files, names and numbers from your computer.

myapp.service: failed (exit code 1) at 02:14.
Log: Error: ENOSPC, no space left on device (writing /var/log/myapp/app.log)
Cause: disk full; log rotation is not set up.
I can free 2.4 GB of old logs and restart the service. Go ahead?

Good to know

Your AI shows its plan before it changes anything, and your rules on the computer still apply: read-only mode, allowed folders and blocked commands, with a backup before each file edit (safety rules). Works in ChatGPT, Claude, Claude Code and Cursor; the free plan gives 50 actions a day (pricing).

Related prompts