Challenge - 5 Problems
Supervisor Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate1:30remaining
What is the output of this Supervisor status command?
You run
supervisorctl status on your Raspberry Pi. What output will you see if the service myapp is running and has been up for 5 minutes?Raspberry Pi
myapp RUNNING pid 1234, uptime 0:05:00
Attempts:
2 left
💡 Hint
Look for the status that means the program is active and running.
✗ Incorrect
The
RUNNING status means the process is active. The uptime shows how long it has been running.🧠 Conceptual
intermediate1:00remaining
Which file does Supervisor use to configure managed programs?
On a Raspberry Pi, where do you usually define the programs Supervisor should manage?
Attempts:
2 left
💡 Hint
Think about configuration files ending with .conf.
✗ Incorrect
Supervisor reads program configurations from files in /etc/supervisor/conf.d/ with .conf extension.
🔧 Debug
advanced2:00remaining
Why does this Supervisor program fail to start?
Given this Supervisor program config snippet, why does the program fail to start?
[program:myapp]
command=/home/pi/myapp/start.sh
user=pi
autostart=true
autorestart=true
The start.sh script is executable and works when run manually.
Raspberry Pi
[program:myapp] command=/home/pi/myapp/start.sh user=pi autostart=true autorestart=true
Attempts:
2 left
💡 Hint
Think about environment differences between manual run and Supervisor run.
✗ Incorrect
Supervisor runs programs with a minimal environment. If start.sh depends on environment variables, it may fail.
📝 Syntax
advanced1:30remaining
Which Supervisor config snippet correctly restarts a program on failure?
Choose the correct Supervisor program config to restart
myapp automatically if it crashes.Attempts:
2 left
💡 Hint
Look for the official Supervisor keys for restarting.
✗ Incorrect
Supervisor uses
autostart and autorestart keys to control automatic restarts.🚀 Application
expert2:00remaining
How to reload Supervisor config without stopping running programs?
You updated a program config file in /etc/supervisor/conf.d/ on your Raspberry Pi. Which command reloads the config and applies changes without stopping running programs?
Attempts:
2 left
💡 Hint
One command reads new configs, the other applies them.
✗ Incorrect
The
reread command tells Supervisor to scan config files, and update applies changes without stopping unaffected programs.