Add support for mariadbd binary

Starting with MariaDB 10.5.2 the binary is named mariadbd
Reference: https://jira.mariadb.org/browse/MDEV-21303
pull/89/head
Andrea Mennillo 2020-09-22 20:06:21 +02:00 committed by handymenny
parent 3df258e7f5
commit 30ede25863
2 changed files with 3 additions and 3 deletions

View File

@ -174,7 +174,7 @@ class MySQLManager(ExtObjectManager):
# break processing returning a fault-tolerant empty list
return []
if not any('mysqld' in line for line in ps):
if not any('mysqld' or 'mariadbd' in line for line in ps):
context.log.info('no mysqld processes found')
# break processing returning a fault-tolerant empty list
@ -193,7 +193,7 @@ class MySQLManager(ExtObjectManager):
pid, ppid, cmd = parsed # unpack values
# match master process
if cmd.split(' ', 1)[0].endswith('mysqld'):
if cmd.split(' ', 1)[0].endswith('d'):
if not launch_method_supported("mysql", ppid):
continue

View File

@ -12,7 +12,7 @@ __maintainer__ = "Mike Belov"
__email__ = "dedm@nginx.com"
PS_CMD = "ps xao pid,ppid,command | grep -E 'mysqld( |$)'" # grep -P doesn't work on BSD systems
PS_CMD = "ps xao pid,ppid,command | grep -E '(mariadb|mysql)d( |$)'" # grep -P doesn't work on BSD systems
PS_REGEX = re.compile(r'\s*(?P<pid>\d+)\s+(?P<ppid>\d+)\s+(?P<cmd>.+)\s*')
LS_CMD = "ls -la /proc/%s/exe"