{"id":3718,"date":"2020-02-25T16:14:03","date_gmt":"2020-02-25T16:14:03","guid":{"rendered":"https:\/\/lamp.ciscoar.com\/?page_id=3718"},"modified":"2020-02-25T20:37:43","modified_gmt":"2020-02-25T20:37:43","slug":"mariadb-process-id","status":"publish","type":"page","link":"https:\/\/lamp.ciscoar.com\/?page_id=3718","title":{"rendered":"MariaDB Process ID"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is a PID?<\/h2>\n\n\n\n<p>Computer&#8217;s Operating Systems always assign a PID (Process Identifier) number to each process running on the system, this number is important because you need it to modify\/alter priorities or kill the process.<\/p>\n\n\n\n<p>PIDs are used by the kernel to track processes, and also used by many utilities, such as &#8220;<strong>ps<\/strong>&#8220;, &#8220;<strong>top<\/strong>&#8220;, and &#8220;<strong>kill<\/strong>&#8220;, running system-program processes are known as, services, subsystems, or &#8220;<strong><span style=\"text-decoration: underline;\">d<\/span><\/strong>aemons&#8221;, and that&#8217;s the meaning of the letter &#8220;d&#8221; you will find on the names, let&#8217;s say mysql<strong><span style=\"text-decoration: underline;\">d<\/span><\/strong>, http<span style=\"text-decoration: underline;\">d<\/span>, firewall<strong><span style=\"text-decoration: underline;\">d<\/span><\/strong>, etc.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Windows PID<\/h2>\n\n\n\n<p>Processes to be useful must be active, I mean running on memory and that make use of the computer resources, mainly CPU and Memory and that&#8217;s something you also have on windows machines, you can use the Windows &#8220;Task Manager&#8221; and go to the TAB &#8220;Details&#8221; (as shown in the follow screenshot) to see all the processes currently running on the system.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/Windows_task-manager-process-id-pid-number_v2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/Windows_task-manager-process-id-pid-number_v2.jpg\" alt=\"\" class=\"wp-image-3733\" width=\"833\" height=\"516\" srcset=\"https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/Windows_task-manager-process-id-pid-number_v2.jpg 833w, https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/Windows_task-manager-process-id-pid-number_v2-300x186.jpg 300w, https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/Windows_task-manager-process-id-pid-number_v2-768x476.jpg 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption>Windows Task Manager &#8211; Details &#8211; PID<\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">MariaDB PID and more<\/h2>\n\n\n\n<p>Now that you know a little bit more about PIDs you can execute the following CLI command to see information about the MariaDB Process ID.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"vim\" class=\"language-vim\">ps aux | grep mysql<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/linux-centos7-mariadb-pid-1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/linux-centos7-mariadb-pid-1-1024x227.jpg\" alt=\"\" class=\"wp-image-3740\" width=\"768\" height=\"170\" srcset=\"https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/linux-centos7-mariadb-pid-1-1024x227.jpg 1024w, https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/linux-centos7-mariadb-pid-1-300x66.jpg 300w, https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/linux-centos7-mariadb-pid-1-768x170.jpg 768w, https:\/\/lamp.ciscoar.com\/wp-content\/uploads\/2020\/02\/linux-centos7-mariadb-pid-1.jpg 1188w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption>MariaDB process ID &#8211; PID<\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">How to manually terminate (kill) a process<\/h2>\n\n\n\n<p>If for some reason, a process becomes errant or unresponsive, aka &#8220;zombie&#8221; you might want to terminate it, in these cases, the &#8220;kill&#8221; command is the tool to be used, see below the syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"rest\" class=\"language-rest\">kill -s PID<\/code><\/pre>\n\n\n\n<p>The &#8220;-s&#8221; parameter refer to the type of &#8220;signal&#8221; to be send to the process, this signal is usually sent by the kernel, the user, or a given program wanting to terminate the process, see below the most commonly used signals:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>1 (SIGHUP) &#8211; causes server programs to reread their configuration files<\/li><li>9(SIGKILL) &#8211; causes the process to exit without performing routine shutdown tasks<\/li><li>15(SIGTERM) &#8211; causes the process to exit but allows it to close open files<\/li><\/ul>\n\n\n\n<p>If you don&#8217;t specify a signal, the default value is 15 (SIGTERM).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is a PID? Computer&#8217;s Operating Systems always assign a PID (Process Identifier) number to each process running on the system, this number is important because you need it to modify\/alter priorities or kill the process. PIDs are used by the kernel to track processes, and also used by many utilities, such as &#8220;ps&#8220;, &#8220;top&#8220;, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/lamp.ciscoar.com\/?page_id=3718\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;MariaDB Process ID&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3718","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/pages\/3718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3718"}],"version-history":[{"count":17,"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/pages\/3718\/revisions"}],"predecessor-version":[{"id":3757,"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=\/wp\/v2\/pages\/3718\/revisions\/3757"}],"wp:attachment":[{"href":"https:\/\/lamp.ciscoar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}