cost Verified current stable Not installed? System Operations

Cost / Show Resource Usage Current Session

Show Resource Usage Current Session

Display CPU and memory usage statistics for the current session.

$
Terminal
/cost

When To Use

During performance tuning efforts or troubleshooting resource bottlenecks in critical processes.

Pro Tip

Pair with --detailed flag for granular process insights; monitor multiple sessions simultaneously to identify heavy resource consumers.

Anatomy of Output

Understanding the result

CPU Usage: 75% by session ID 5678 Utilization

CPU burden for the session in context.

Memory Usage: 512 MB Consumption

Total memory consumption attributed to the session.

I/O Wait: 30% I/O Performance

Percentage of I/O wait time in context.

Troubleshooting

Common pitfalls

Error: Unable to retrieve resource statistics

Solution: Check permissions for accessing resource metrics.

Error: No active sessions found

Solution: Ensure the command is executed within a valid session.

Error: Resource usage data not available

Solution: Run the command with sufficient privileges.

Command Breakdown

What each part is doing

/cost
Base Command
The executable that performs this operation. Here it runs Cost before the shell applies any redirect operators.

Alternative Approaches

Comparable commands in other tools

Alternative system operations tools for the same job.