Diposting oleh

Monitoring Squid with squidclient

Diposting oleh
MandailingNatal.com - Monitoring Squid with squidclient - cara Monitoring Squid with squidclient - Kemarin sempat bingung bagaimana melihat byts hit ratio dari squid yang baru ku install, mau install cachti atau mrtg males karena kompnya agak jadul dengan memori yang pas pasan, apalagi bila install mrtg dan cacti harus install webserver dan cgi.




Namun hasil dari jalan jalan dan searching di google akhirnya saya tau ada tools kecil dan ringan untuk melihat permformance squid. Tanpa harus repot untuk install mrtg dan cachti.

Dalam squid yang saya gunakan berjalan pada mesin ubuntu server. Dan solusi untuk melihat performance squid dan melihat byts hit ratio pun cukup mudah. Dengan SQUIDCLIENT, jadi solusinya adalah install squidclient di mesin yang kita gunakan.

apt-get install squidclient

tunggu sampai instalasi selesai

dan cara penggunaannya cukup mudah di squid saya saya ketikkan seperti di bawah ini, meskipun masih banyak comment dan perintah dari squidclient ini yang saya tidak tahu

root@ubuntu:~# squidclient 192.168.88.1 -p 9988 mgr:info

maka hasilnya seperti di bawah ini

HTTP/1.0 200 OK
Date: Wed, 01 Jul 2009 12:59:49 GMT
Content-Type: text/plain
Expires: Wed, 01 Jul 2009 12:59:49 GMT
X-Cache: MISS from ProxyIP.net
X-Cache-Lookup: MISS from ProxyIP.net:9988
Connection: close

Squid Object Cache: Version 2.7.STABLE3
Start Time: Wed, 01 Jul 2009 12:56:40 GMT
Current Time: Wed, 01 Jul 2009 12:59:49 GMT
Connection information for squid:
Number of clients accessing cache: 9
Number of HTTP requests received: 61
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: 19.4
Average ICP messages per minute since start: 0.0
Select loop called: 13795 times, 13.697 ms avg
Cache information for squid:
Request Hit Ratios: 5min: 38.5%, 60min: 38.5%
Byte Hit Ratios: 5min: 55.1%, 60min: 55.1%
Request Memory Hit Ratios: 5min: 0.0%, 60min: 0.0%
Request Disk Hit Ratios: 5min: 40.0%, 60min: 40.0%
Storage Swap size: 9215996 KB
Storage Mem size: 612 KB
Mean Object Size: 15.94 KB
Requests given to unlinkd: 19
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.80651 0.80651
Cache Misses: 0.80651 0.80651
Cache Hits: 0.03241 0.03241
Near Hits: 1.00114 1.00114
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.00203 0.00203
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 188.953 seconds
CPU Time: 6.310 seconds
CPU Usage: 3.34%
CPU Usage, 5 minute avg: 3.49%
CPU Usage, 60 minute avg: 3.49%
Process Data Segment Size via sbrk(): 57604 KB
Maximum Resident Size: 0 KB
Page faults with physical i/o: 2
Memory usage for squid via mallinfo():
Total space in arena: 57604 KB
Ordinary blocks: 57527 KB 5 blks
Small blocks: 0 KB 0 blks
Holding blocks: 672 KB 3 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 76 KB
Total in use: 58199 KB 100%
Total free: 76 KB 0%
Total size: 58276 KB
Memory accounted for:
Total accounted: 43775 KB
memPoolAlloc calls: 2914245
memPoolFree calls: 1178428
File descriptor usage for squid:
Maximum number of file descriptors: 1024
Largest file desc currently in use: 55
Number of file desc currently in use: 52
Files queued for open: 0
Available number of file descriptors: 972
Reserved number of file descriptors: 100
Store Disk files open: 1
IO loop method: epoll
Internal Data Structures:
578152 StoreEntries
43 StoreEntries with MemObjects


root@ubuntu:~# squidclient -p 9988 -u USERNAME -w 'secretePassword' mgr:info | grep 'file descri'

Hasilnya :
Maximum number of file descriptors: 1024
Available number of file descriptors: 858
Reserved number of file descriptors: 100

---------------------
perintah lainnya :

squidclient mgr:info | grep 'file descri'
squidclient mgr:info | grep 'file descri'

squidclient -h host -p 80 mgr:utilization
squidclient -h host -p 80 mgr:5min
squidclient -h host -p 80 mgr:60min

4 komentar:

  1. bagaimana ingin besarkan maximum number of file descriptor
    squid version 3.0

    BalasHapus
  2. mantaf.. kalau dari luar jaringan bisa gak ya? misal dari warnet sebelah

    BalasHapus
  3. bisa asalkan sudah di NAT

    BalasHapus