Breaking News
Loading...
01 December 2011

Perintah-perintah untuk monitoring squid proxy

Berikut ini adalah beberapa perintah yang dapat Anda lakukan untuk melihat performansi squid proxy server Anda. Perintah ini dapat anda buat dalam bentuk file berextensi .sh dan letakkan di direktori /usr/sbin, sehingga anda tidak perlu menghapalkan syntax2 tersebut. Cukup membantu untuk para network administrator atw teknisi. ^_^ Selamat mencoba..
Perintah pertama
squidclient -h localhost -p 8080 mgr:info
Sesuaikan port 8080 dengan port squid Anda.
Hasilnya:
HTTP/1.0 200 OK
Server: squid/2.7.STABLE7
Date: Fri, 20 Aug 2010 12:29:34 GMT
Content-Type: text/plain
Expires: Fri, 20 Aug 2010 12:29:34 GMT
X-Cache: MISS from proxy1.netsolusindo.com
X-Cache-Lookup: MISS from proxy1.netsolusindo.com:8080
Via: 1.0 proxy1.netsolusindo.com:8080 (squid/2.7.STABLE7)
Connection: close

Squid Object Cache: Version 2.7.STABLE7
Start Time:     Wed, 18 Aug 2010 12:00:39 GMT
Current Time:   Fri, 20 Aug 2010 12:29:34 GMT
Connection information for squid:
        Number of clients accessing cache:      2
        Number of HTTP requests received:       1179697
        Number of ICP messages received:        0
        Number of ICP messages sent:    0
        Number of queued ICP replies:   0
        Number of HTCP messages received:       0
        Number of HTCP messages sent:   0
        Request failure ratio:   0.00
        Average HTTP requests per minute since start:   405.5
        Average ICP messages per minute since start:    0.0
        Select loop called: 22503753 times, 7.756 ms avg
Cache information for squid:
        Request Hit Ratios:     5min: 35.1%, 60min: 35.9%
        Byte Hit Ratios:        5min: 16.9%, 60min: 20.7%
        Request Memory Hit Ratios:      5min: 0.2%, 60min: 1.2%
        Request Disk Hit Ratios:        5min: 77.8%, 60min: 75.0%
        Storage Swap size:      27342220 KB
        Storage Mem size:       6136 KB
        Mean Object Size:       18.78 KB
        Requests given to unlinkd:      0
Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):   0.61549  0.52331
        Cache Misses:          1.05672  0.80651
        Cache Hits:            0.10857  0.13498
        Near Hits:             0.64968  0.52331
        Not-Modified Replies:  0.17711  0.05951
        DNS Lookups:           0.04854  0.04433
        ICP Queries:           0.00000  0.00000
Resource usage for squid:
        UP Time:        174534.204 seconds
        CPU Time:       3182.603 seconds
        CPU Usage:      1.82%
        CPU Usage, 5 minute avg:        5.86%
        CPU Usage, 60 minute avg:       3.71%
        Process Data Segment Size via sbrk(): 176960 KB
        Maximum Resident Size: 693520 KB
        Page faults with physical i/o: 920117
Memory usage for squid via mallinfo():
        Total space in arena:  176960 KB
        Ordinary blocks:       165139 KB  80926 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:         10020 KB      7 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:   11820 KB
        Total in use:          175159 KB 94%
        Total free:             11820 KB 6%
        Total size:            186980 KB
Memory accounted for:
        Total accounted:       102900 KB
        memPoolAlloc calls: 224927337
        memPoolFree calls: 221979688
File descriptor usage for squid:
        Maximum number of file descriptors:   1024
        Largest file desc currently in use:    638
        Number of file desc currently in use:  477
        Files queued for open:                   0
        Available number of file descriptors:  547
        Reserved number of file descriptors:   100
        Store Disk files open:                   1
        IO loop method:                     epoll
Internal Data Structures:
        1456421 StoreEntries
           520 StoreEntries with MemObjects
           449 Hot Object Cache Items
        1456302 on-disk objects
Perintah kedua
tail -f /var/log/squid/access.log
Sesuaikan /var/log/squid/access.log dengan direktori log squid Anda.
Hasilnya:
default
Perintah ketiga
tail -f /var/log/squid/access.log |ccze
perintah ini adalah modifikasi "perintah ketiga" untuk melihat file access.log dengan warna-warni,, terlebih dahulu kita harus menginstal paket ccze
apt-get install ccze
hasilny:
ccze


Perintah keempat
squidclient -h localhost -p 8080 mgr:info | grep Hit
Sama seperti perintah pertama, sesuaikan -p 8080 dengan port squid Anda.
Hasilnya:
Request Hit Ratios:     5min: 32.1%, 60min: 35.4%
        Byte Hit Ratios:        5min: 14.9%, 60min: 17.4%
        Request Memory Hit Ratios:      5min: 3.0%, 60min: 1.0%
        Request Disk Hit Ratios:        5min: 84.6%, 60min: 77.2%
        Cache Hits:            0.15888  0.19742
        Near Hits:             1.24267  0.72387

0 komentar:

Post a Comment

 
Toggle Footer