Home >Database >Mysql Tutorial >mysql查看最大打开进程数_MySQL

mysql查看最大打开进程数_MySQL

WBOY
WBOYOriginal
2016-06-01 13:43:53963browse

bitsCN.com 今天在群里刚刚知道这个mysql查看打开最大进程数的命令,下面来看一下吧~
 
cat /proc/27095/limits | grep "Max open files"
 
查看mysql最大打开进程数的命令
 
我们应该如何知道那个标黄的进程呢,想起来前几天刚刚学过的命令了吗,对的,就是lsof,这个命令可以查看打开的文件。
 
[root@sor-sys ~]# lsof |grep mysql|tail
mysqld    16089    mysql   38u      REG                8,1     1024    3997735 /var/lib/mysql/mysql/time_zone.MYI
mysqld    16089    mysql   39u      REG                8,1        0    3997736 /var/lib/mysql/mysql/time_zone.MYD
mysqld    16089    mysql   40u      REG                8,1     1024    3997744 /var/lib/mysql/mysql/time_zone_leap_second.MYI
mysqld    16089     mysql   41u      REG                8,1        0    3997745 /var/lib/mysql/mysql/time_zone_leap_second.MYD
mysqld    16089     mysql   42u      REG                8,1     1024    3997732 /var/lib/mysql/mysql/time_zone_name.MYI
mysqld    16089     mysql   43u      REG                8,1        0    3997733 /var/lib/mysql/mysql/time_zone_name.MYD
mysqld    16089     mysql   44u      REG                8,1     1024    3997738 /var/lib/mysql/mysql/time_zone_transition.MYI
mysqld    16089     mysql   45u      REG                8,1        0    3997739 /var/lib/mysql/mysql/time_zone_transition.MYD
mysqld    16089     mysql   46u      REG                8,1     1024    3997741 /var/lib/mysql/mysql/time_zone_transition_type.MYI
mysqld    16089     mysql   47u      REG                8,1        0    3997742 /var/lib/mysql/mysql/time_zone_transition_type.MYD
 
 
看到标绿的了吧,这个就是那个存在的进程~
 
或者是利用ps -ef|grep mysql命令~
 
[root@sor-sys ~]# cat /proc/16089/limits |grep files
Max open files            2048                 65536                files
 
  bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn