[MDEV-9760] mariadb 10.1 Could add OS Process ID Column In Show Processlist ? Created: 2016-03-18 Updated: 2017-01-12 Resolved: 2017-01-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Admin statements |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | sysdljr | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Hi, |
| Comments |
| Comment by Sergei Golubchik [ 2016-03-18 ] |
|
Unfortunately, we cannot do it in 10.1. 10.1 is already GA and as a rule we don't add new features to GA versions. And 5.7 does not have PID in the show processlist, I've just checked. It does show client's PID in the performance schema, though that value cannot be truly trusted. |
| Comment by sysdljr [ 2016-03-18 ] |
|
Thank you |
| Comment by Daniel Black [ 2016-10-24 ] |
|
in |
| Comment by sysdljr [ 2017-01-11 ] |
|
Thank you. on 172.28.14.111 execute , os pid is : 92868 on 172.28.14.115 , show processlist show 172.28.14.111 tid = 1597 execute: ps -eL -o tid,pid,command | grep "1597", show pid 17011, 1597 17011 /usr/sbin/mysqld --basedir=/usr --user=mysql --log-error=/log/log.err --port=3306 |
| Comment by Daniel Black [ 2017-01-11 ] |
|
The information as to what the pid is of the client process isn't available on the server as a) it's not transported over the protocol and b) its not accessible to any system or library function call. On b) there is no way a computer can determine anything about a remote tcp connection beyond what is required to maintain the connection. I.e. it cannot determine the OS, the users on that system or anything about the connecting process including the processid. To provide the PID of the client it would require a protocol change for every client library to include this when communicating to the server. This extends far beyond the scope of what MariaDB server aims to provide and introduces potential compatibility problems with MySQL. I suggest to meet this requirement, you alter the SQL queries you send to the server to be of the form "SELECT /* pid=92968 */ .... ". By placing this information in the SQL, a SHOW PROCESS list will be able to determine the client process id. If you are using the query cache I recommend enabling query_cache_strip_comments. |
| Comment by sysdljr [ 2017-01-11 ] |
|
Thank you for your patience and kind support.. I understand. |
| Comment by Daniel Black [ 2017-01-11 ] |
|
You're welcome. Are you happy for this task to be closed? |
| Comment by sysdljr [ 2017-01-12 ] |
|
ok, it can closed. |
| Comment by Daniel Black [ 2017-01-12 ] |
|
Thanks - closing. Ideas are welcome. Sorry implementing this one wasn't really practical and I hope the alternative is acceptable to you. |
| Comment by sysdljr [ 2017-01-12 ] |
|
Never mind, can acceptable. |