Linux command
varnishhist 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Display request histogram
varnishhist
Connect to specific instance
varnishhist -n [instance_name]
Read from log file
varnishhist -r [/var/log/varnish.log]
Set update delay
varnishhist -d [2]
Filter by pattern
varnishhist -q "[RespStatus == 200]"
Exclude pattern
varnishhist -x "[BogoHeader]"
说明
varnishhist reads Varnish shared memory logs and displays a live histogram of request processing times. It visualizes the distribution of cache hits and misses, helping identify performance patterns. The display updates continuously, showing how request latencies distribute across logarithmic time buckets. Cache hits (|) and misses (#) use different characters, making it easy to compare their performance characteristics. Useful for real-time monitoring of Varnish cache performance and identifying latency issues. Filter options allow focusing on specific request types or excluding noise.
参数
- -n _name_
- Specify varnishd instance name.
- -r _file_
- Read log from file instead of shared memory.
- -d _delay_
- Delay between updates in seconds (default: 1).
- -q _query_
- Filter log entries with VSL query.
- -x _regex_
- Exclude entries matching regular expression.
- -T _seconds_
- Transaction timeout (default: 120).
- -h
- Display help.
- -V
- Display version.
FAQ
What is the varnishhist command used for?
varnishhist reads Varnish shared memory logs and displays a live histogram of request processing times. It visualizes the distribution of cache hits and misses, helping identify performance patterns. The display updates continuously, showing how request latencies distribute across logarithmic time buckets. Cache hits (|) and misses (#) use different characters, making it easy to compare their performance characteristics. Useful for real-time monitoring of Varnish cache performance and identifying latency issues. Filter options allow focusing on specific request types or excluding noise.
How do I run a basic varnishhist example?
Run `varnishhist` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n _name_ do in varnishhist?
Specify varnishd instance name.