monitoring squid with squidclient

iwan adi cahyono | 3:29 AM | 2 comments

Yesterday got confused how to see the hit ratio of byts new squid I install, will install mrtg cachti or males for a little kompnya jadul fitted with barely enough memory, especially if you install mrtg and cacti have to install a webserver and cgi.

But the results of the streets and searching on google I finally know there is a small and lightweight tools to see permformance squid. Without the hassle to install mrtg and cachti.

In squid that I use ubuntu machine running on the server. And the solution to see the performance and saw squid byts hit ratio was fairly easy. With SQUIDCLIENT, so the solution is to install the machine squidclient that we use.

apt-get install squidclient

wait until the installation is complete

and how to use it fairly easily in my squid as I type below, although there are many comments and orders of this squidclient I do not know

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

the result as below

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: 13,795 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: 6310 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 (): 57,604 KB
Maximum Resident Size: 0 KB
Page faults with physical i / O: 2
Memory usage for squid via mallinfo ():
Total space in arena: 57,604 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: 58,199 KB 100%
Total free: 76 KB 0%
Total size: 58,276 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:
578,152 StoreEntries
43 StoreEntries with MemObjects



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

Result:


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


---------------------
Other commands:

squidclient mgr: info | grep 'files descri'
squidclient mgr: info | grep 'files descri'
squidclient-h host-p 80 mgr: utilization
squidclient-h host-p 80 mgr: 5min
squidclient-h host-p 80 mgr: 60min





Category:

About Iwan Adi C: My name is Iwan Adi Cahyono . Known as Iwan .I'm administrator of coidz media blog.

2 comments

  1. Anonymous says:

    Fantastic beat ! I would like to apprentice while you amend your web site, how could i subscribe for a blog web site?
    The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear concept

    Here is my site - bmi calculator for men

  2. QiQe says:

    There is a bug that breaks our graph (munin graph) when the variable (integer) used as counter of requests reaches maximum value.
    Already reported here:
    http://bugs.squid-cache.org/show_bug.cgi?id=3680
    ..but not resolved yet.

    Do you know how to monitor request in any other way?