【Laravel】artisanのdb:monitorコマンドを解説

チートシート

Laravel 10.x以降のartisanの「db:monitor」コマンドを解説します。

Description

指定したデータベースの接続数を監視します。

Usage

php artisan db:monitor [--databases [DATABASES]] [--max [MAX]]

Options

オプション省略形必須説明
databases監視するデータベース接続
maxイベントがディスパッチされるまでに開くことができる最大接続数

Example

no options

php artisan db:monitor
  Database name ........................................................................................................................ Connections
  mysql ..................................................................................................................................... [1] OK

with database and max

php artisan db:monitor --database=mysql --max=50
   INFO  Monitoring database connections for [mysql]...  

  Current connection count: 5

Source

コメント

タイトルとURLをコピーしました