squid性能指标查看

squid性能分析
获得squid执行中的信息状况
1、当不知道有什么信息可以查询时
 ./squidclient -h 127.0.0.1 -p 80 mgr:
 
2、General Runtime Information,察看一般的状态
 ./squidclient -h 127.0.0.1 -p 80 mgr:info
 
 [root@bbs bin]# ./squidclient -h 127.0.0.1 -p 80 mgr:info
  HTTP/1.0 200 OK
  Date: Wed, 14 Sep 2011 01:14:00 GMT
  Content-Type: text/plain
  Expires: Wed, 14 Sep 2011 01:14:00 GMT
  Last-Modified: Wed, 14 Sep 2011 01:14:00 GMT
  Connection: close
  Squid Object Cache: Version 2.6.STABLE23
  Start Time:     Mon, 15 Aug 2011 07:29:43 GMT
  Current Time:   Wed, 14 Sep 2011 01:14:00 GMT
  Connection information for squid:
    Number of clients accessing cache:      7035    //使用 proxy的客户端的数量
    Number of HTTP requests received:       102208621   //客户端http请求数量
    Number of ICP messages received:        0     //接受到的icp query数量
    Number of ICP messages sent:    0       //发出icp query数量
    Number of queued ICP replies:   0
    Request failure ratio:   0.00
    Average HTTP requests per minute since start:   2386.7  //每分钟http request的数量
    Average ICP messages per minute since start:    0.0   //每分钟处理的icp数量
    Select loop called: 1078256179 times, 2.383 ms avg
  Cache information for squid:
    Request Hit Ratios:     5min: 72.9%, 60min: 71.3%   //Cache Request命中率
    Byte Hit Ratios:        5min: 86.2%, 60min: 85.7%   //Cache Byte命中率
    Request Memory Hit Ratios:      5min: 16.9%, 60min: 18.3%
    Request Disk Hit Ratios:        5min: 36.6%, 60min: 41.2%
    Storage Swap size:      36863864 KB       //存放 cache的磁盘使用量
    Storage Mem size:       602600 KB       //存放cache的内存使用量
    Mean Object Size:       72.02 KB
    Requests given to unlinkd:      822436
  Median Service Times (seconds)  5 min    60 min:     //平均回应时间
    HTTP Requests (All):   0.00865  0.01955
    Cache Misses:          0.13498  0.14252
    Cache Hits:            0.00463  0.00678
    Near Hits:             0.10281  0.11465
    Not-Modified Replies:  0.00091  0.00179
    DNS Lookups:           0.00000  0.00000
    ICP Queries:           0.00000  0.00000
  Resource usage for squid:          
    UP Time:        2569457.334 seconds
    CPU Time:       36073.998 seconds
    CPU Usage:      1.40%          //自squid启动起计算,CPU使用率
    CPU Usage, 5 minute avg:        2.15%      //最近5分钟CPU使用率
    CPU Usage, 60 minute avg:       1.73%      //最近60分钟CPU使用率
    Process Data Segment Size via sbrk(): 813452 KB
    Maximum Resident Size: 0 KB
    Page faults with physical i/o: 3
  Memory usage for squid via mallinfo():
    Total space in arena:  813452 KB
    Ordinary blocks:       811350 KB   2289 blks
    Small blocks:               0 KB      0 blks
    Holding blocks:          2976 KB      3 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:    2101 KB
    Total in use:          814326 KB 100%
    Total free:              2101 KB 0%
    Total size:            816428 KB
  Memory accounted for:            //内存使用状态
    Total accounted:       756036 KB
    memPoolAlloc calls: 3191693493
    memPoolFree calls: 3187306562
  File descriptor usage for squid:        
    Maximum number of file descriptors:   1024     //系统最大file descriptor数
    Largest file desc currently in use:    838     //目前使用file descriptor最大值
    Number of file desc currently in use:  738     //目前正在使用的file descriptor数
    Files queued for open:                   0
    Available number of file descriptors:  286     //剩余有效的使用量
    Reserved number of file descriptors:   100     //保留的使用量
    Store Disk files open:                  22
    IO loop method:                     epoll
  Internal Data Structures: 
    539827 StoreEntries           //Cache中存放的 缓存档案数量
    137907 StoreEntries with MemObjects       //内存中的缓存档案数量
    137873 Hot Object Cache Items
    511853 on-disk objects          //磁盘中存放的快取档案数量
   
   
3、查看5分钟的状态
 ./squidclient -h 127.0.0.1 -p 80 mgr:5min
 
  [root@bbs bin]# ./squidclient -h 127.0.0.1 -p 80 mgr:5min
  HTTP/1.0 200 OK
  Date: Wed, 14 Sep 2011 06:25:00 GMT
  Content-Type: text/plain
  Expires: Wed, 14 Sep 2011 06:25:00 GMT
  Last-Modified: Wed, 14 Sep 2011 06:25:00 GMT
  Connection: close
  sample_s tart_time = 1315981166.699347 (Wed, 14 Sep 2011 06:19:26 GMT)
  sample_
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值