查看mysqld 打开的最大连接数

  使用lsof命令查看 

[michael@localhost ~]$ sudo lsof |grep mysqld|tail
[sudo] password for michael: 
mysqld     2715     mysql   22u      REG              253,0     4096    2362380 /var/lib/mysql/mysql/tables_priv.MYI
mysqld     2715     mysql   23u      REG              253,0        0    2362381 /var/lib/mysql/mysql/tables_priv.MYD
mysqld     2715     mysql   24u      REG              253,0     4096    2362383 /var/lib/mysql/mysql/columns_priv.MYI
mysqld     2715     mysql   25u      REG              253,0        0    2362384 /var/lib/mysql/mysql/columns_priv.MYD
mysqld     2715     mysql   26u      REG              253,0     4096    2362420 /var/lib/mysql/mysql/procs_priv.MYI
mysqld     2715     mysql   27u      REG              253,0        0    2362421 /var/lib/mysql/mysql/procs_priv.MYD
mysqld     2715     mysql   28u      REG              253,0     1024    2362375 /var/lib/mysql/mysql/servers.MYI
mysqld     2715     mysql   29u      REG              253,0        0    2362376 /var/lib/mysql/mysql/servers.MYD
mysqld     2715     mysql   30u      REG              253,0     2048    2362431 /var/lib/mysql/mysql/event.MYI
mysqld     2715     mysql   31u      REG              253,0        0    2362432 /var/lib/mysql/mysql/event.MYD

 

可以看到 mysqld 服务的 ID 是 2715

使用 cat 命令查看 连接

[michael@localhost ~]$ sudo cat /proc/2715/limits |grep files
Max open files            1185                 1185                 files   

 

 

你可能感兴趣的:(mysqld)