1---2name: server-management3description: "Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands."4risk: safe5source: community6date_added: "2026-02-27"7metadata:8 source: https://skillmd.com/skills/phoroth/server-management9---1011# Server Management1213> Server management principles for production operations.14> **Learn to THINK, not memorize commands.**1516---1718## 1. Process Management Principles1920### Tool Selection2122| Scenario | Tool |23|----------|------|24| **Node.js app** | PM2 (clustering, reload) |25| **Any app** | systemd (Linux native) |26| **Containers** | Docker/Podman |27| **Orchestration** | Kubernetes, Docker Swarm |2829### Process Management Goals3031| Goal | What It Means |32|------|---------------|33| **Restart on crash** | Auto-recovery |34| **Zero-downtime reload** | No service interruption |35| **Clustering** | Use all CPU cores |36| **Persistence** | Survive server reboot |3738---3940## 2. Monitoring Principles4142### What to Monitor4344| Category | Key Metrics |45|----------|-------------|46| **Availability** | Uptime, health checks |47| **Performance** | Response time, throughput |48| **Errors** | Error rate, types |49| **Resources** | CPU, memory, disk |5051### Alert Severity Strategy5253| Level | Response |54|-------|----------|55| **Critical** | Immediate action |56| **Warning** | Investigate soon |57| **Info** | Review daily |5859### Monitoring Tool Selection6061| Need | Options |62|------|---------|63| Simple/Free | PM2 metrics, htop |64| Full observability | Grafana, Datadog |65| Error tracking | Sentry |66| Uptime | UptimeRobot, Pingdom |6768---6970## 3. Log Management Principles7172### Log Strategy7374| Log Type | Purpose |75|----------|---------|76| **Application logs** | Debug, audit |77| **Access logs** | Traffic analysis |78| **Error logs** | Issue detection |7980### Log Principles81821. **Rotate logs** to prevent disk fill832. **Structured logging** (JSON) for parsing843. **Appropriate levels** (error/warn/info/debug)854. **No sensitive data** in logs8687---8889## 4. Scaling Decisions9091### When to Scale9293| Symptom | Solution |94|---------|----------|95| High CPU | Add instances (horizontal) |96| High memory | Increase RAM or fix leak |97| Slow response | Profile first, then scale |98| Traffic spikes | Auto-scaling |99100### Scaling Strategy101102| Type | When to Use |103|------|-------------|104| **Vertical** | Quick fix, single instance |105| **Horizontal** | Sustainable, distributed |106| **Auto** | Variable traffic |107108---109110## 5. Health Check Principles111112### What Constitutes Healthy113114| Check | Meaning |115|-------|---------|116| **HTTP 200** | Service responding |117| **Database connected** | Data accessible |118| **Dependencies OK** | External services reachable |119| **Resources OK** | CPU/memory not exhausted |120121### Health Check Implementation122123- Simple: Just return 200124- Deep: Check all dependencies125- Choose based on load balancer needs126127---128129## 6. Security Principles130131| Area | Principle |132|------|-----------|133| **Access** | SSH keys only, no passwords |134| **Firewall** | Only needed ports open |135| **Updates** | Regular security patches |136| **Secrets** | Enprojectnment vars, not files |137| **Audit** | Log access and changes |138139---140141## 7. Troubleshooting Priority142143When something's wrong:1441451. **Check if running** (process status)1462. **Check logs** (error messages)1473. **Check resources** (disk, memory, CPU)1484. **Check network** (ports, DNS)1495. **Check dependencies** (database, APIs)150151---152153## 8. Anti-Patterns154155| ❌ Don't | ✅ Do |156|----------|-------|157| Run as root | Use non-root user |158| Ignore logs | Set up log rotation |159| Skip monitoring | Monitor from day one |160| Manual restarts | Auto-restart config |161| No backups | Regular backup schedule |162163---164165> **Remember:** A well-managed server is boring. That's the goal.166167## When to Use168This skill is applicable to execute the workflow or actions described in the overview.169170## Limitations171- Use this skill only when the task clearly matches the scope described above.172- Do not treat the output as a substitute for enprojectnment-specific validation, testing, or expert review.173- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.