Linux command
rhit 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Analyze default nginx log files
rhit
Filter logs from a specific date onward
rhit -d '[2024-01-15]..'
Measure by bytes transferred
rhit -m bytes [/var/log/nginx/access.log]
说明
rhit reads nginx log files from their standard locations (including gzipped logs), analyzes them, and displays results in formatted tables in the terminal. It supports filtering by date, measuring by hits or bytes, and viewing popular or unpopular IP addresses.
参数
- -d _DATE_RANGE_
- Filter logs by date range (e.g., '2024-01-15..', '..2024-02-01').
- -m _METRIC_
- Measure by the given metric: hits or bytes.
FAQ
What is the rhit command used for?
rhit reads nginx log files from their standard locations (including gzipped logs), analyzes them, and displays results in formatted tables in the terminal. It supports filtering by date, measuring by hits or bytes, and viewing popular or unpopular IP addresses.
How do I run a basic rhit example?
Run `rhit` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d _DATE_RANGE_ do in rhit?
Filter logs by date range (e.g., '2024-01-15..', '..2024-02-01').