2012-11-06 30 views
7

使用varnish-cache,我正在運行varnishtop -c -i RxURL以顯示來自緩存的客戶端請求的數量。輸出看起來有點像這樣:如何讀取varnishtop的輸出?

list length 40                                      

    121.76 RxURL   /some/path/to/file 
    105.17 RxURL   /some/other/file 
    42.91 RxURL   /and/another 
    14.61 RxURL   /yet/another 
    14.59 RxURL   /etc 
    13.63 RxURL   /etc/etc 

什麼號碼121.76105.17等代表什麼?

它們在首次發行varnishtop時正在增加,但隨後趨於穩定,因此我傾向於相信每個特定時間範圍內的點擊次數。是這樣嗎?時間是什麼時候?

這不是在man page解釋。感謝您的幫助!

編輯:漆版本是2.1

回答

14

varnishtop命令顯示超過60秒滾動合計數。這意味着即使所有流量都停止,顯示屏上的平均時間也需要60秒。

列表長度40

列表中的項目總數,因爲屏幕只能顯示在同一時間這麼多。

121.76 RxURL /一些/路徑/到/文件中的最後60秒內接收到用於/some/path/to/file

〜121的請求。

其他一些有趣的監控統計:

# most frequent cookies 
varnishtop -i RxHeader -I Cookie 

# continually updated list of frequent URLs 
varnishtop -i RxURL 

# most frequent UA strings 
varnishtop -i RxHeader -C -I ^User-Agent 

# frequent charset (Accept-Charset can be replaced with any other HTTP header) 
varnishtop -i RxHeader -C -I '^Accept-Charset' 

# Requests resulting in 404's 
varnishlog -b -m "RxStatus:404" 
+0

謝謝。我得到的數字在60秒內沒有意義,但也許我應該重新審視。 –

0

這是每60秒請求的平均數量。該手冊確實說 - 但在參數的說明,而不是工具的一般性描述:

-p period Specifies the number of seconds to measure over, the default is 60 seconds. The first number in the list is the average number of requests seen over this time period.

+0

謝謝,但這是從漆的文檔'3.0',不'2.1'。事實上''''中不能識別'-p'。 '2.1'文檔中也沒有類似的「時期」概念。 –

+0

我也應該注意上面的數字對於'60'秒是不可能的;對於我正在檢查的具體工作量來說,這種方式太高了(上面的數字只是樣本;我的實際數據在60秒內不可能累計)。 –

+0

哦,讓我在那裏......但似乎很奇怪,他們改變了它的行爲。您可以在60秒內嘗試使用varnishlog,然後處理該信息以確保您不會錯過任何東西。 – Clarence