process-manage

List and manage system processes across macOS and Linux.

34|5|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/linanwx/nagobot --skill process-manage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: process-manage
Source: https://github.com/linanwx/nagobot/tree/main/cmd/templates/skills/process-manage
Command: npx skills add https://github.com/linanwx/nagobot --skill process-manage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing and troubleshooting system processes can be tedious and error-prone across different platforms. This Skill provides a unified set of commands to list, locate, and monitor processes, making it easier to diagnose performance issues and ensure system health.

Core Features & Use Cases

  • List All Processes: exec: ps aux | head -30

  • Find by Name: exec: ps aux | grep -i "PROCESS_NAME" | grep -v grep

  • Find by PID: exec: ps -p PID -o pid,ppid,user,%cpu,%mem,start,command

  • Tree View (Linux): exec: ps auxf | head -40

  • Tree View (macOS): exec: pstree 2>/dev/null || ps -ef | head -30

  • Find by Port: exec: lsof -i :PORT_NUMBER

  • By User: exec: ps -u USERNAME -o pid,%cpu,%mem,command | head -20

  • Top CPU consumers: exec: ps aux --sort=-%cpu | head -11

  • Top memory consumers: exec: ps aux --sort=-%mem | head -11

  • System load: exec: uptime

  • One-shot top snapshot: exec: top -bn1 | head -20 2>/dev/null || top -l 1 | head -20

  • Kill by PID: exec: kill PID

  • Force kill: exec: kill -9 PID

  • Kill by name: exec: pkill "PROCESS_NAME"

  • Kill all by name: exec: pkill -f "PATTERN"

  • Kill by port: exec: lsof -ti :PORT_NUMBER | xargs kill -9 2>/dev/null && echo "Killed" || echo "No process on port PORT_NUMBER"

  • Memory & Swap: Linux: exec: free -h; macOS: exec: vm_stat | perl -ne '/page size of (\d+)/ and $size=$1; /Pages\s+(\w+):\s+(\d+)/ and printf("%-16s %6.1f MB\n", "$1:", $2 * $size / 1048576)'

  • Disk I/O: Linux: exec: iostat -xd 1 2 2>/dev/null | tail -20; macOS: exec: iostat -w 1 -c 2 2>/dev/null

  • Open Files: By process: exec: lsof -p PID | head -30; Open file count by process: exec: lsof | awk '{print $1}' | sort | uniq -c | sort -rn | head -15

  • Service Management (Linux systemd): Status: exec: systemctl status SERVICE_NAME; Start / stop / restart: exec: sudo systemctl start SERVICE_NAME exec: sudo systemctl stop SERVICE_NAME exec: sudo systemctl restart SERVICE_NAME; List running services: exec: systemctl list-units --type=service --state=running

  • Crontab (System Cron): exec: crontab -l 2>/dev/null || echo "No crontab for current user"

  • Notes: Cross-platform nuances and recommended practices.

Quick Start

Run the process-manage skill to list and monitor current system processes.

Frequently Asked Questions about process-manage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and kill a process running on a specific port in Linux or macOS?

You can find a process by port using lsof -i :PORT_NUMBER, then terminate it with kill -9 PID or pkill. This unified process management approach works across both Linux and macOS without needing separate tools.

What is the best way to monitor CPU and memory usage of system processes across different platforms?

The best way to monitor system processes cross-platform is using ps aux --sort=-%cpu or top -bn1 to snapshot resource usage. These commands provide unified CPU and memory reporting on both macOS and Linux servers.

Can I view the process tree hierarchy on macOS the same way I do on Linux?

Yes, you can view process trees on macOS using pstree or fall back to ps -ef. Linux supports ps auxf natively. This ensures you can visualize parent-child process relationships across different operating systems.

How do I list all running systemd services and manage their status from the command line?

To list running systemd services, use systemctl list-units --type=service --state=running. You can manage status by executing sudo systemctl start, stop, or restart with the service name to control Linux system services.

Does this process management approach work for diagnosing system load and disk I/O on local machines?

Yes, this process management approach works for diagnosing system load and disk I/O. You can execute uptime for load averages and use iostat or vm_stat to monitor disk and memory statistics across Linux and macOS environments.

Why would I use pkill instead of kill -9 when terminating processes by name?

Use pkill to terminate processes by name using pkill "PROCESS_NAME" or pkill -f "PATTERN" for full command matching. Unlike kill -9 which requires a specific PID, pkill targets multiple matching processes simultaneously without manual PID lookup.