2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Memcached】 stats早見表

Last updated at Posted at 2023-10-19
項目 内容
pid プロセスID 18622
uptime Memcachedの稼働時間(秒) 10699178
time 現在時刻のタイムスタンプ(unixtime) 1324433164
version memcachedのバージョン version 1.4.5
pointer_size ホストOSのポインタサイズ(32bit or 64bit) 64
rusage_user プロセスがユーザモードで動作した累積時間(秒.マイクロ秒) 1463.871486
rusage_system プロセスがカーネルモードで動作した累積時間(秒.マイクロ秒) 4130.430135
curr_connections 現在開いているコネクション数 219
total_connections memcachedの起動から現在までに開いた累積コネクション数 49976
connection_structures memcachedが確保したコネクション構造体の数 491
cmd_get GETコマンドの累積発行数 10981050700
cmd_set SETコマンドの累積発行数 396173398
cmd_flush FLUSH_ALLコマンドの累積発行数 0
get_hits GETコマンドがキーにhitした回数 10472095896
get_misses GETコマンドがキーにhitしなかった回数 508954804
delete_misses DELETEコマンドがキーにhitした回数 289095120
delete_hits DELETEコマンドがキーにhitした回数 221893296
incr_misses INCRコマンドがキーにhitしなかった回数 0
incr_hits INCRコマンドがキーにhitした回数 0
decr_misses DECRコマンドがキーにhitしなかった回数 0
decr_hits DECRコマンドがキーにhitした回数 0
cas_misses CASコマンドが失敗した回数 0
cas_hits CASコマンドが成功した回数 0
cas_badval CAS値が正しくないため、CASコマンドが失敗した回数 0
auth_cmds 現在実行中の認証コマンドの数 0
auth_errors クライアントが認証に失敗した回数 0
bytes_read ネットワークから受信したバイト数 1462324829248
bytes_written ネットワークへ送信したバイト数 11540854811513
limit_maxbytes 使用可能な最大メモリ容量(バイト) 3006267392
listen_disabled_num コネクション数の不足によりmemcachedから切断されたコネクション数 0
threads リクエスト当たりに動作するワーカースレッドの数 4
conn_yields クライアントがイベント当たりの最大リクエスト回数に達した回数 0
bytes 現在使用中のメモリ容量(バイト) 2178132166
curr_items 現在格納中のアイテム数 13427957
total_items memcachedの起動から現在までに格納した累積アイテム数 396173398
evictions メモリ容量の不足によりmemcachedから追い出されたアイテム数 0
reclaimed 期限切れになったアイテムの領域を再利用した回数 60654276

stats表示例

$ telnet [ホスト名]
Trying XXX.XXX.XXX.XXX...
Connected to localhost.localdomain (XX.XXX.XXX.XXX).
Escape character is '^]'.
stats
STAT pid 18622
STAT uptime 10699178
STAT time 1324433164
STAT version 1.4.5
STAT pointer_size 64
STAT rusage_user 1463.871486
STAT rusage_system 4130.430135
STAT curr_connections 219
STAT total_connections 49976
STAT connection_structures 491
STAT cmd_get 10981050700
STAT cmd_set 396173398
STAT cmd_flush 0
STAT get_hits 10472095896
STAT get_misses 508954804
STAT delete_misses 289095120
STAT delete_hits 221893296
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 1462324829248
STAT bytes_written 11540854811513
STAT limit_maxbytes 3006267392
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT bytes 2178132166
STAT curr_items 13427957
STAT total_items 396173398
STAT evictions 0
STAT reclaimed 60654276
END

stats settings表示例

stats settings
STAT maxbytes 3006267392
STAT maxconns 1024
STAT tcpport 11211
STAT udpport 11211
STAT inter NULL
STAT verbosity 0
STAT oldest 0
STAT evictions on
STAT domain_socket NULL
STAT umask 700
STAT growth_factor 1.25
STAT chunk_size 48
STAT num_threads 4
STAT stat_key_prefix :
STAT detail_enabled no
STAT reqs_per_event 20
STAT cas_enabled yes
STAT tcp_backlog 1024
STAT binding_protocol auto-negotiate
STAT auth_enabled_sasl no
STAT item_size_max 1048576
END

<応用>
ローカル環境からリモートホストに対してncコマンドでTCP接続してstatsを送信する例

$ echo "stats" | nc [ホスト名] [ポート番号] | grep curr_items

返ってきたレスポンスの中からcurr_items(現在格納中のアイテム数)を含む行を抽出

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?