← All use cases System Monitoring

Real-time performance triage with htop, top, iotop

Point your agent at a system and let it watch resource usage in real time. It reads htop, identifies the offending process, checks logs, and takes action — all without you writing a single monitoring script.

Illustrative workflow and output. Verify application compatibility and results in your own test environment.

system monitoring
$ claude "the server feels slow, investigate"
 
> shell_exec("htop", interactive=true)
 
CPU[||||||||||||||||| 89%] Mem[|||||||||| 7.2G/8G]
PID USER CPU% MEM% COMMAND
3847 app 82.1 45.2 java -Xmx4g -jar app.jar
1203 root 3.2 1.1 /usr/sbin/nginx
 
> shell_interrupt()
> shell_exec("jcmd 3847 GC.heap_info")
 
garbage-first heap used 3891M max 4096M
 
Java heap near max. GC pressure causing CPU spike.
Recommending -Xmx increase or memory leak analysis.

The problem

When a production system is slow, someone has to SSH in, launch htop or top, identify the resource hog, correlate it with logs, and make a decision. This requires reading full-screen interactive tools that refresh constantly — something no API-based agent can do.

Monitoring dashboards show metrics but can't investigate. Alert systems fire but can't triage. You still need a human to do the actual detective work inside the terminal.

How agend solves it

agend lets your AI agent launch and read full-screen monitoring tools in real time. The agent can:

  • Launch htop/top — read the interactive display, identify the top CPU and memory consumers
  • Drill down — exit htop, inspect the process with jcmd, strace, lsof, or /proc
  • Check logs — tail logs with less, search for errors with grep, correlate timestamps
  • Watch I/O — use iotop to find disk bottlenecks, ss to inspect network connections
  • Take action — restart services, adjust limits, kill runaway processes, all based on what it found

The agent performs the same investigation loop a senior SRE would: observe, hypothesize, drill down, act.

What you can automate

  • CPU spike investigation and root cause analysis
  • Memory leak detection and heap analysis
  • Disk I/O bottleneck identification
  • Network connection troubleshooting
  • Log correlation across multiple services
  • Automated runbook execution for known failure modes

Key MCP tools used

  • shell_exec — launch monitoring tools in interactive mode
  • shell_interrupt — exit full-screen apps cleanly
  • shell_raw_stdout — read the current htop/top display
  • shell_watch — monitor command output over time

Who is this for

  • SRE and DevOps teams with on-call rotations
  • Platform teams managing multi-service deployments
  • Anyone tired of SSHing into servers at 3 AM
  • Teams building automated incident response

Give your agent eyes on your infrastructure.

Start Free Trial