home / skills / openclaw / skills / system-uptime

system-uptime skill

/skills/alamby/system-uptime

This skill reports the current system uptime using the native uptime command to help you quickly assess stability.

npx playbooks add skill openclaw/skills --skill system-uptime

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.1 KB
---
name: system-uptime
description: "Get the current system uptime using the native 'uptime' command. Use when: user asks about system uptime, system status, or how long the system has been running."
metadata: { "openclaw": { "emoji": "⏱️", "requires": { "bins": ["uptime"] } } }
---

# System Uptime Skill

Get the current system uptime using the built-in `uptime` command.

## When to Use

✅ **USE this skill when:**

- "What's the system uptime?"
- "How long has the system been running?"
- "Show system status"
- "When was the last reboot?"

## When NOT to Use

❌ **DON'T use this skill when:**

- Need detailed system metrics → use monitoring tools
- Remote system uptime → use SSH or remote monitoring
- Historical uptime data → check system logs

## Commands

### Get System Uptime

```bash
# Basic uptime
uptime

# Using the skill CLI
node uptime-cli.js
```

## Example Output

```
11:30:45 up 2 days, 4:23, 2 users, load average: 1.23, 1.15, 1.08
```

## Notes

- Uses the standard Unix `uptime` command
- Works on macOS, Linux, and other Unix-like systems
- No additional dependencies required

Overview

This skill retrieves the current system uptime by running the native Unix `uptime` command. It provides a quick, human-readable summary of how long the system has been running, number of users, and load averages. Use it for fast status checks and simple automation hooks that need current uptime info.

How this skill works

The skill executes the system `uptime` command and returns its standard output. It parses the command output when useful but otherwise delivers the raw uptime line (e.g., "up 2 days, 4:23, 2 users, load average: ..."). It runs locally on Unix-like systems and requires no additional dependencies.

When to use it

  • Ask for current system uptime or time since last reboot
  • Check basic system status or load averages
  • Run quick diagnostics during troubleshooting
  • Include in startup scripts or health checks
  • Validate system stability before deployments

Best practices

  • Run the skill on the host you want to inspect; it reports local uptime only
  • Use SSH or remote monitoring tools for remote systems, not this local-only command
  • Treat output as transient — `uptime` shows current state, not historical trends
  • Parse the output carefully if you need structured fields (uptime, users, load averages)
  • Wrap calls with error handling to cover environments without `uptime` available

Example use cases

  • Quickly answer "How long has this server been up?" during incident triage
  • Add a startup check to CI/CD scripts to skip actions on recently rebooted hosts
  • Display uptime on an admin dashboard or status page as a lightweight health indicator
  • Run as part of a maintenance checklist to confirm systems haven’t been recently restarted
  • Embed in simple automation to notify when uptime drops below a threshold after reboots

FAQ

Does this work on Windows?

No. The skill uses the Unix `uptime` command and is intended for macOS, Linux, and other Unix-like systems.

Do I need special permissions to run it?

No special privileges are normally required; any user with access to the shell can run `uptime`. Ensure your environment allows executing system commands.