■Squid3/squidclientの統計情報を確認する。
Squidのボトルネックを探す
http://d.hatena.ne.jp/labunix/20120831
$ lsb_release -d
Description: Debian GNU/Linux 9.8 (stretch)
$ squidclient -h 2>&1 | head -1
Version: 3.5.23
$ /usr/sbin/squid3 -v | head -1
Squid Cache: Version 3.5.23
■Squid3のversion詳細
$ /usr/sbin/squid3 -v | awk '{gsub(" \047","\n&",$0);print}'
Squid Cache: Version 3.5.23
Service Name: squid
Debian linux
configure options:
'--build=x86_64-linux-gnu'
'--prefix=/usr'
'--includedir=${prefix}/include'
'--mandir=${prefix}/share/man'
'--infodir=${prefix}/share/info'
'--sysconfdir=/etc'
'--localstatedir=/var'
'--libexecdir=${prefix}/lib/squid3'
'--srcdir=.'
'--disable-maintainer-mode'
'--disable-dependency-tracking'
'--disable-silent-rules'
'BUILDCXXFLAGS=-g -O2 -fdebug-prefix-map=/build/squid3-4PillG/squid3-3.5.23=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -Wl,--as-needed'
'--datadir=/usr/share/squid'
'--sysconfdir=/etc/squid'
'--libexecdir=/usr/lib/squid'
'--mandir=/usr/share/man'
'--enable-inline'
'--disable-arch-native'
'--enable-async-io=8'
'--enable-storeio=ufs,aufs,diskd,rock'
'--enable-removal-policies=lru,heap'
'--enable-delay-pools'
'--enable-cache-digests'
'--enable-icap-client'
'--enable-follow-x-forwarded-for'
'--enable-auth-basic=DB,fake,getpwnam,LDAP,NCSA,NIS,PAM,POP3,RADIUS,SASL,SMB'
'--enable-auth-digest=file,LDAP'
'--enable-auth-negotiate=kerberos,wrapper'
'--enable-auth-ntlm=fake,smb_lm'
'--enable-external-acl-helpers=file_userip,kerberos_ldap_group,LDAP_group,session,SQL_session,time_quota,unix_group,wbinfo_group'
'--enable-url-rewrite-helpers=fake'
'--enable-eui'
'--enable-esi'
'--enable-icmp'
'--enable-zph-qos'
'--enable-ecap'
'--disable-translation'
'--with-swapdir=/var/spool/squid'
'--with-logdir=/var/log/squid'
'--with-pidfile=/var/run/squid.pid'
'--with-filedescriptors=65536'
'--with-large-files'
'--with-default-user=proxy'
'--enable-build-info=Debian linux'
'--enable-linux-netfilter'
'build_alias=x86_64-linux-gnu'
'CFLAGS=-g -O2 -fdebug-prefix-map=/build/squid3-4PillG/squid3-3.5.23=. -fstack-protector-strong -Wformat -Werror=format-security -Wall'
'LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed'
'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
'CXXFLAGS=-g -O2 -fdebug-prefix-map=/build/squid3-4PillG/squid3-3.5.23=. -fstack-protector-strong -Wformat -Werror=format-security'
■パブリック属性の統計コマンドを使う。
$ squidclient -h 127.0.0.1 -p 8080 mgr: | awk '/public/{gsub("[\t ]*public","",$0);print $0}'
index Cache Manager Interface
menu Cache Manager Menu
pconn Persistent Connection Utilization Histograms
mem Memory Utilization
diskd DISKD Stats
squidaio_counts Async IO Function Counters
client_list Cache Client List
comm_epoll_incoming comm_incoming() stats
ipcache IP Cache Stats and Contents
fqdncache FQDN Cache Stats and Contents
idns Internal DNS Statistics
redirector URL Redirector Stats
store_id StoreId helper Stats
external_acl External ACL stats
http_headers HTTP Header Statistics
info General Runtime Information
service_times Service Times (Percentiles)
filedescriptors Process Filedescriptor Allocation
objects All Cache Objects
vm_objects In-Memory and In-Transit Objects
io Server-side network read() size histograms
counters Traffic and Resource Counters
peer_select Peer Selection Algorithms
digest_stats Cache Digest and ICP blob
5min 5 Minute Average of Counters
60min 60 Minute Average of Counters
utilization Cache Utilization
histograms Full Histogram Counts
active_requests Client-side Active Requests
username_cache Active Cached Usernames
openfd_objects Objects with Swapout files open
store_digest Store Digest
store_log_tags Histogram of store.log tags
storedir Store Directory Stats
store_io Store IO Interface Stats
store_check_cachable_stats storeCheckCachable() Stats
refresh Refresh Algorithm Statistics
delay Delay Pool Levels
forward Request Forwarding Statistics
cbdata Callback Data Registry Contents
sbuf String-Buffer statistics
events Event Queue
netdb Network Measurement Database
asndb AS Number Database
carp CARP information
userhash peer userhash information
sourcehash peer sourcehash information
server_list Peer Cache Statistics
■面倒なのでいっぺんに。
$ squidclient -h 127.0.0.1 -p 8080 mgr: | \
awk '/public/{gsub(" *public","",$0);print $1}' | \
awk -v date=$(date '+%Y%m%d_%H%M%S') '{print "squidclient -h 127.0.0.1 -p 8080 mgr:"$1" > "date"_"$1".log"}' | sh
■sh に渡す直前の生成したコマンドのリスト
$ squidclient -h 127.0.0.1 -p 8080 mgr: | \
awk '/public/{gsub(" *public","",$0);print $1}' | \
awk -v date=$(date '+%Y%m%d_%H%M%S') '{print "squidclient -h 127.0.0.1 -p 8080 mgr:"$1" > "date"_"$1".log"}'
squidclient -h 127.0.0.1 -p 8080 mgr:index > 20190401_233210_index.log
squidclient -h 127.0.0.1 -p 8080 mgr:menu > 20190401_233210_menu.log
squidclient -h 127.0.0.1 -p 8080 mgr:pconn > 20190401_233210_pconn.log
squidclient -h 127.0.0.1 -p 8080 mgr:mem > 20190401_233210_mem.log
squidclient -h 127.0.0.1 -p 8080 mgr:diskd > 20190401_233210_diskd.log
squidclient -h 127.0.0.1 -p 8080 mgr:squidaio_counts > 20190401_233210_squidaio_counts.log
squidclient -h 127.0.0.1 -p 8080 mgr:client_list > 20190401_233210_client_list.log
squidclient -h 127.0.0.1 -p 8080 mgr:comm_epoll_incoming > 20190401_233210_comm_epoll_incoming.log
squidclient -h 127.0.0.1 -p 8080 mgr:ipcache > 20190401_233210_ipcache.log
squidclient -h 127.0.0.1 -p 8080 mgr:fqdncache > 20190401_233210_fqdncache.log
squidclient -h 127.0.0.1 -p 8080 mgr:idns > 20190401_233210_idns.log
squidclient -h 127.0.0.1 -p 8080 mgr:redirector > 20190401_233210_redirector.log
squidclient -h 127.0.0.1 -p 8080 mgr:store_id > 20190401_233210_store_id.log
squidclient -h 127.0.0.1 -p 8080 mgr:external_acl > 20190401_233210_external_acl.log
squidclient -h 127.0.0.1 -p 8080 mgr:http_headers > 20190401_233210_http_headers.log
squidclient -h 127.0.0.1 -p 8080 mgr:info > 20190401_233210_info.log
squidclient -h 127.0.0.1 -p 8080 mgr:service_times > 20190401_233210_service_times.log
squidclient -h 127.0.0.1 -p 8080 mgr:filedescriptors > 20190401_233210_filedescriptors.log
squidclient -h 127.0.0.1 -p 8080 mgr:objects > 20190401_233210_objects.log
squidclient -h 127.0.0.1 -p 8080 mgr:vm_objects > 20190401_233210_vm_objects.log
squidclient -h 127.0.0.1 -p 8080 mgr:io > 20190401_233210_io.log
squidclient -h 127.0.0.1 -p 8080 mgr:counters > 20190401_233210_counters.log
squidclient -h 127.0.0.1 -p 8080 mgr:peer_select > 20190401_233210_peer_select.log
squidclient -h 127.0.0.1 -p 8080 mgr:digest_stats > 20190401_233210_digest_stats.log
squidclient -h 127.0.0.1 -p 8080 mgr:5min > 20190401_233210_5min.log
squidclient -h 127.0.0.1 -p 8080 mgr:60min > 20190401_233210_60min.log
squidclient -h 127.0.0.1 -p 8080 mgr:utilization > 20190401_233210_utilization.log
squidclient -h 127.0.0.1 -p 8080 mgr:histograms > 20190401_233210_histograms.log
squidclient -h 127.0.0.1 -p 8080 mgr:active_requests > 20190401_233210_active_requests.log
squidclient -h 127.0.0.1 -p 8080 mgr:username_cache > 20190401_233210_username_cache.log
squidclient -h 127.0.0.1 -p 8080 mgr:openfd_objects > 20190401_233210_openfd_objects.log
squidclient -h 127.0.0.1 -p 8080 mgr:store_digest > 20190401_233210_store_digest.log
squidclient -h 127.0.0.1 -p 8080 mgr:store_log_tags > 20190401_233210_store_log_tags.log
squidclient -h 127.0.0.1 -p 8080 mgr:storedir > 20190401_233210_storedir.log
squidclient -h 127.0.0.1 -p 8080 mgr:store_io > 20190401_233210_store_io.log
squidclient -h 127.0.0.1 -p 8080 mgr:store_check_cachable_stats > 20190401_233210_store_check_cachable_stats.log
squidclient -h 127.0.0.1 -p 8080 mgr:refresh > 20190401_233210_refresh.log
squidclient -h 127.0.0.1 -p 8080 mgr:delay > 20190401_233210_delay.log
squidclient -h 127.0.0.1 -p 8080 mgr:forward > 20190401_233210_forward.log
squidclient -h 127.0.0.1 -p 8080 mgr:cbdata > 20190401_233210_cbdata.log
squidclient -h 127.0.0.1 -p 8080 mgr:sbuf > 20190401_233210_sbuf.log
squidclient -h 127.0.0.1 -p 8080 mgr:events > 20190401_233210_events.log
squidclient -h 127.0.0.1 -p 8080 mgr:netdb > 20190401_233210_netdb.log
squidclient -h 127.0.0.1 -p 8080 mgr:asndb > 20190401_233210_asndb.log
squidclient -h 127.0.0.1 -p 8080 mgr:carp > 20190401_233210_carp.log
squidclient -h 127.0.0.1 -p 8080 mgr:userhash > 20190401_233210_userhash.log
squidclient -h 127.0.0.1 -p 8080 mgr:sourcehash > 20190401_233210_sourcehash.log
squidclient -h 127.0.0.1 -p 8080 mgr:server_list > 20190401_233210_server_list.log
■ログの一覧
$ find -type f -name "20190401_23*" -exec du -h {} \; | sort -k 2 -uV
4.0K ./20190401_233324_5min.log
4.0K ./20190401_233324_60min.log
16K ./20190401_233324_active_requests.log
4.0K ./20190401_233324_asndb.log
4.0K ./20190401_233324_carp.log
4.0K ./20190401_233324_cbdata.log
4.0K ./20190401_233324_client_list.log
4.0K ./20190401_233324_comm_epoll_incoming.log
4.0K ./20190401_233324_counters.log
4.0K ./20190401_233324_delay.log
28K ./20190401_233324_digest_stats.log
4.0K ./20190401_233324_diskd.log
4.0K ./20190401_233324_events.log
4.0K ./20190401_233324_external_acl.log
8.0K ./20190401_233324_filedescriptors.log
4.0K ./20190401_233324_forward.log
4.0K ./20190401_233324_fqdncache.log
24K ./20190401_233324_histograms.log
16K ./20190401_233324_http_headers.log
4.0K ./20190401_233324_idns.log
4.0K ./20190401_233324_index.log
4.0K ./20190401_233324_info.log
4.0K ./20190401_233324_io.log
236K ./20190401_233324_ipcache.log
12K ./20190401_233324_mem.log
4.0K ./20190401_233324_menu.log
36K ./20190401_233324_netdb.log
2.0M ./20190401_233324_objects.log
4.0K ./20190401_233324_openfd_objects.log
4.0K ./20190401_233324_pconn.log
4.0K ./20190401_233324_peer_select.log
4.0K ./20190401_233324_redirector.log
4.0K ./20190401_233324_refresh.log
4.0K ./20190401_233324_sbuf.log
4.0K ./20190401_233324_server_list.log
8.0K ./20190401_233324_service_times.log
4.0K ./20190401_233324_sourcehash.log
4.0K ./20190401_233324_squidaio_counts.log
4.0K ./20190401_233324_storedir.log
4.0K ./20190401_233324_store_check_cachable_stats.log
4.0K ./20190401_233324_store_digest.log
4.0K ./20190401_233324_store_id.log
4.0K ./20190401_233324_store_io.log
4.0K ./20190401_233324_store_log_tags.log
4.0K ./20190401_233324_userhash.log
4.0K ./20190401_233324_username_cache.log
20K ./20190401_233324_utilization.log
2.0M ./20190401_233324_vm_objects.log
■結構な行数になるので。
$ find -type f -name "20190401_23*" | awk '{print "echo \042["$1"]\042;cat "$1}'| sh | wc -l
139902
■以下の要領で見出しを付けておくと「sh | less」に渡した際に「^\[」で次の見出しにジャンプできる。
$ find -type f -name "20190401_23*" | awk '{print "echo \042["$1"]\042;cat "$1}'
echo "[./20190401_233324_info.log]";cat ./20190401_233324_info.log
echo "[./20190401_233324_index.log]";cat ./20190401_233324_index.log
echo "[./20190401_233324_external_acl.log]";cat ./20190401_233324_external_acl.log
echo "[./20190401_233324_histograms.log]";cat ./20190401_233324_histograms.log
echo "[./20190401_233324_squidaio_counts.log]";cat ./20190401_233324_squidaio_counts.log
echo "[./20190401_233324_service_times.log]";cat ./20190401_233324_service_times.log
echo "[./20190401_233324_netdb.log]";cat ./20190401_233324_netdb.log
echo "[./20190401_233324_openfd_objects.log]";cat ./20190401_233324_openfd_objects.log
echo "[./20190401_233324_storedir.log]";cat ./20190401_233324_storedir.log
echo "[./20190401_233324_ipcache.log]";cat ./20190401_233324_ipcache.log
echo "[./20190401_233324_forward.log]";cat ./20190401_233324_forward.log
echo "[./20190401_233324_fqdncache.log]";cat ./20190401_233324_fqdncache.log
echo "[./20190401_233324_store_id.log]";cat ./20190401_233324_store_id.log
echo "[./20190401_233324_cbdata.log]";cat ./20190401_233324_cbdata.log
echo "[./20190401_233324_sourcehash.log]";cat ./20190401_233324_sourcehash.log
echo "[./20190401_233324_5min.log]";cat ./20190401_233324_5min.log
echo "[./20190401_233324_refresh.log]";cat ./20190401_233324_refresh.log
echo "[./20190401_233324_objects.log]";cat ./20190401_233324_objects.log
echo "[./20190401_233324_pconn.log]";cat ./20190401_233324_pconn.log
echo "[./20190401_233324_vm_objects.log]";cat ./20190401_233324_vm_objects.log
echo "[./20190401_233324_diskd.log]";cat ./20190401_233324_diskd.log
echo "[./20190401_233324_filedescriptors.log]";cat ./20190401_233324_filedescriptors.log
echo "[./20190401_233324_io.log]";cat ./20190401_233324_io.log
echo "[./20190401_233324_peer_select.log]";cat ./20190401_233324_peer_select.log
echo "[./20190401_233324_server_list.log]";cat ./20190401_233324_server_list.log
echo "[./20190401_233324_counters.log]";cat ./20190401_233324_counters.log
echo "[./20190401_233324_sbuf.log]";cat ./20190401_233324_sbuf.log
echo "[./20190401_233324_menu.log]";cat ./20190401_233324_menu.log
echo "[./20190401_233324_digest_stats.log]";cat ./20190401_233324_digest_stats.log
echo "[./20190401_233324_store_io.log]";cat ./20190401_233324_store_io.log
echo "[./20190401_233324_idns.log]";cat ./20190401_233324_idns.log
echo "[./20190401_233324_userhash.log]";cat ./20190401_233324_userhash.log
echo "[./20190401_233324_carp.log]";cat ./20190401_233324_carp.log
echo "[./20190401_233324_mem.log]";cat ./20190401_233324_mem.log
echo "[./20190401_233324_delay.log]";cat ./20190401_233324_delay.log
echo "[./20190401_233324_redirector.log]";cat ./20190401_233324_redirector.log
echo "[./20190401_233324_active_requests.log]";cat ./20190401_233324_active_requests.log
echo "[./20190401_233324_comm_epoll_incoming.log]";cat ./20190401_233324_comm_epoll_incoming.log
echo "[./20190401_233324_utilization.log]";cat ./20190401_233324_utilization.log
echo "[./20190401_233324_store_check_cachable_stats.log]";cat ./20190401_233324_store_check_cachable_stats.log
echo "[./20190401_233324_60min.log]";cat ./20190401_233324_60min.log
echo "[./20190401_233324_client_list.log]";cat ./20190401_233324_client_list.log
echo "[./20190401_233324_http_headers.log]";cat ./20190401_233324_http_headers.log
echo "[./20190401_233324_asndb.log]";cat ./20190401_233324_asndb.log
echo "[./20190401_233324_store_log_tags.log]";cat ./20190401_233324_store_log_tags.log
echo "[./20190401_233324_store_digest.log]";cat ./20190401_233324_store_digest.log
echo "[./20190401_233324_events.log]";cat ./20190401_233324_events.log
echo "[./20190401_233324_username_cache.log]";cat ./20190401_233324_username_cache.log
■調査対象を絞る例
最後の単語が「sec」で、「=」がどこかにあり、除外文字以外。
「/」は「 」に置き換えたので、「[0-9]* sec」形式で100秒を超える行を抽出して
値の大きい順に表示
$ find -type f -name "20190401_23*" | \
awk '{print "echo \042["$1"]\042;cat "$1}' | sh | \
awk '$NF ~ /sec/ && $0 ~ /=/ && $0 !~ /kbytes|.deb|cpu_time|reads|writes/{gsub("/"," ",$NF);print $0}' | \
awk '$(NF-1)>100' | sort -uVr -k 3
wall_time = 261243.503148 seconds
wall_time = 92041.501831 seconds
wall_time = 34440.545909 seconds
wall_time = 3600.030746 seconds
select_loops = 3569.919699 sec
select_loops = 2830.343541 sec
select_fds = 2490.682503 sec
select_loops = 2357.118480 sec
select_fds = 1970.098783 sec
select_fds = 1636.620467 sec
wall_time = 900.006647 seconds
select_loops = 857.631001 sec
select_fds = 609.127056 sec
select_loops = 332.030974 sec
wall_time = 300.001706 seconds
select_fds = 230.573233 sec
select_loops = 125.743678 sec
■ファイル名と見出しを想定した大文字で始まる行を抽出。
$ grep "^[A-Z]\|261243.503148" 20190401_* | grep -v ":KEY" | grep -B 1 261243.503148
20190401_233324_utilization.log:Last 3 days:
20190401_233324_utilization.log:wall_time = 261243.503148 seconds
■過去3日のセクションを抽出。
$ awk '($NF!=0 && $0 !~/ = 0.000000./)' 20190401_233324_utilization.log | \
awk 'BEGIN{a=0}{if($0 ~ /Last 3 days/){a=1}else{if($1 ~ /^[A-Z]/){a=0}}}{if(a==1){print $0}}'
Last 3 days:
sample_start_time = 1553867924.821028 (Fri, 29 Mar 2019 13:58:44 GMT)
sample_end_time = 1554129168.324176 (Mon, 01 Apr 2019 14:32:48 GMT)
client_http.requests = 0.186010/sec
client_http.hits = 0.007993/sec
client_http.errors = 0.051106/sec
client_http.kbytes_in = 0.302725/sec
client_http.kbytes_out = 656.656590/sec
client_http.all_median_svc_time = 0.245243 seconds
client_http.miss_median_svc_time = 0.167753 seconds
client_http.nh_median_svc_time = 0.134979 seconds
server.all.requests = 0.130966/sec
server.all.kbytes_in = 656.464796/sec
server.all.kbytes_out = 0.269603/sec
server.http.requests = 0.040946/sec
server.http.kbytes_in = 47.791298/sec
server.http.kbytes_out = 0.029061/sec
server.other.requests = 0.090019/sec
server.other.kbytes_in = 608.673498/sec
server.other.kbytes_out = 0.240542/sec
dns.median_svc_time = 0.155927 seconds
select_loops = 857.631001/sec
select_fds = 609.127056/sec
aborted_requests = 0.003403/sec
syscalls.disk.opens = 0.005527/sec
syscalls.disk.closes = 0.005527/sec
syscalls.sock.accepts = 0.146090/sec
syscalls.sock.sockets = 0.145033/sec
syscalls.sock.connects = 0.145033/sec
syscalls.sock.closes = 0.290874/sec
syscalls.sock.reads = 303.680597/sec
syscalls.sock.writes = 304.914098/sec
syscalls.sock.recvfroms = 0.184617/sec
syscalls.sock.sendtos = 0.096741/sec
cpu_time = 8959.340000 seconds
wall_time = 261243.503148 seconds
cpu_usage = 3.429498%
■起動してからのセクションを抽出。
$ awk '($NF!=0 && $0 !~/ = 0.000000./)' 20190401_233324_utilization.log | \
awk 'BEGIN{a=0}{if($0 ~ /Totals since cache startup:/){a=1}else{if($1 ~ /^[A-Z]/){a=0}}}{if(a==1){print $0}}'
Totals since cache startup:
sample_time = 1554129168.324176 (Mon, 01 Apr 2019 14:32:48 GMT)
client_http.requests = 97261
client_http.hits = 2146
client_http.errors = 23767
client_http.kbytes_in = 234448
client_http.kbytes_out = 292818936
client_http.hit_kbytes_out = 14582
server.all.requests = 72370
server.all.kbytes_in = 292759529
server.all.kbytes_out = 215744
server.http.requests = 14411
server.http.kbytes_in = 12570607
server.http.kbytes_out = 9997
server.other.requests = 57959
server.other.kbytes_in = 280188922
server.other.kbytes_out = 205746
page_faults = 5
select_loops = 403419820
cpu_time = 15701.012000
wall_time = 54.817995
aborted_requests = 1020
■スワップの使用も無し。
$ grep "^[A-Z]\|swap.*=" 20190401_* | grep -v ":KEY" | grep -B 1 "swap"
20190401_233324_5min.log:Connection: close
20190401_233324_5min.log:swap.outs = 0.000000/sec
20190401_233324_5min.log:swap.ins = 0.000000/sec
20190401_233324_5min.log:swap.files_cleaned = 0.000000/sec
--
20190401_233324_60min.log:Connection: close
20190401_233324_60min.log:swap.outs = 0.000000/sec
20190401_233324_60min.log:swap.ins = 0.000000/sec
20190401_233324_60min.log:swap.files_cleaned = 0.000000/sec
--
20190401_233324_counters.log:Connection: close
20190401_233324_counters.log:swap.outs = 0
20190401_233324_counters.log:swap.ins = 0
20190401_233324_counters.log:swap.files_cleaned = 0
--
20190401_233324_digest_stats.log:Counters:
20190401_233324_digest_stats.log:swap.outs = 0
20190401_233324_digest_stats.log:swap.ins = 0
20190401_233324_digest_stats.log:swap.files_cleaned = 0
20190401_233324_digest_stats.log:swap.outs = 0.000000/sec
20190401_233324_digest_stats.log:swap.ins = 0.000000/sec
20190401_233324_digest_stats.log:swap.files_cleaned = 0.000000/sec
--
20190401_233324_utilization.log:Last 5 minutes:
20190401_233324_utilization.log:swap.outs = 0.000000/sec
20190401_233324_utilization.log:swap.ins = 0.000000/sec
20190401_233324_utilization.log:swap.files_cleaned = 0.000000/sec
20190401_233324_utilization.log:Last 15 minutes:
20190401_233324_utilization.log:swap.outs = 0.000000/sec
20190401_233324_utilization.log:swap.ins = 0.000000/sec
20190401_233324_utilization.log:swap.files_cleaned = 0.000000/sec
20190401_233324_utilization.log:Last hour:
20190401_233324_utilization.log:swap.outs = 0.000000/sec
20190401_233324_utilization.log:swap.ins = 0.000000/sec
20190401_233324_utilization.log:swap.files_cleaned = 0.000000/sec
20190401_233324_utilization.log:Last 8 hours:
20190401_233324_utilization.log:swap.outs = 0.000000/sec
20190401_233324_utilization.log:swap.ins = 0.000000/sec
20190401_233324_utilization.log:swap.files_cleaned = 0.000000/sec
20190401_233324_utilization.log:Last day:
20190401_233324_utilization.log:swap.outs = 0.000000/sec
20190401_233324_utilization.log:swap.ins = 0.000000/sec
20190401_233324_utilization.log:swap.files_cleaned = 0.000000/sec
20190401_233324_utilization.log:Last 3 days:
20190401_233324_utilization.log:swap.outs = 0.000000/sec
20190401_233324_utilization.log:swap.ins = 0.000000/sec
20190401_233324_utilization.log:swap.files_cleaned = 0.000000/sec
20190401_233324_utilization.log:Totals since cache startup:
20190401_233324_utilization.log:swap.outs = 0
20190401_233324_utilization.log:swap.ins = 0
20190401_233324_utilization.log:swap.files_cleaned = 0
■FDを増やそうかと思ったが、そう言えばulimitなので今回はスルー。
$ squidclient -h 127.0.0.1 -p 8080 mgr:info | grep "file desc"
Maximum number of file descriptors: 65535
Largest file desc currently in use: 77
Number of file desc currently in use: 67
Available number of file descriptors: 65468
Reserved number of file descriptors: 100
$ ps -ef | grep [s]quid | awk '{print "echo \042"$0"\042;sudo grep \042Max open files\134|^Limit\042 /proc/"$2"/limits"}' | sh
root 541 1 0 3月24 ? 00:00:00 /usr/sbin/squid -YC -f /etc/squid/squid.conf
Limit Soft Limit Hard Limit Units
Max open files 65535 65535 files
proxy 553 541 2 3月24 ? 04:27:01 (squid-1) -YC -f /etc/squid/squid.conf
Limit Soft Limit Hard Limit Units
Max open files 65535 65535 files
proxy 657 553 0 3月24 ? 00:00:07 (logfile-daemon) /var/log/squid3/access.log
Limit Soft Limit Hard Limit Units
Max open files 65535 65535 files
$ awk 'BEGIN{a=0}{if($0 ~ /TAG/&&/filedesc/){a=1}else{if($0 ~ /TAG/){a=0}}}{if(a==1){print $0}}' /etc/squid/squid.conf