In server administration, it is essential to have a real-time view of system status and information. This article introduces a command called `juzi` that provides various functionalities to view server status information, including CPU, memory, disk usage, network connections, system load, and more.
### Juzi Command Structure
The `juzi` command consists of a single file saved in the `/usr/local/bin/` directory with execute permission. The code is designed to be easy to customize and extend.
### Available Commands
The `juzi` command supports various subcommands:
* `version`: Displays the current version of `juzi`.
* `process`: Displays information about currently running processes.
* `network`: Displays active network connections.
* `disk`: Displays disk usage information for each mount point.
* `temperature`: Displays CPU temperature (if supported by the system).
* `logs`: Displays the last 10 lines of system logs.
* `users`: Displays information about currently logged-in users.
### Special Case: Default Command
When no subcommand is provided, `juzi` displays a comprehensive server overview, including:
* CPU information (model name).
* CPU usage (current usage percentage).
* Memory information (total, used, and free memory).
* Disk information (total, used, and free disk space).
* System load (current load average).
* System uptime (system running time).
* Network information (IP address).
* Operating system information (PRETTY_NAME).
* System load history (last hour).