Service question

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Service question

Postby Spinnifex » Apr 11th, '20, 16:59

Hello
I have some quesiton about linux service unit.

For example mysql.service.

Here is the ouput of
Code: Select all
systemctl status mysql.service


Code: Select all
● mysqld.service - MySQL database server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2020-04-11 17:41:59 CEST; 1h 12min left
 Main PID: 4551 (mysqld)
   Status: "Taking your SQL requests now..."
   Memory: 66.7M
   CGroup: /system.slice/mysqld.service
           └─4551 /usr/sbin/mysqld

Apr 11 17:41:59 localhost.localdomain mysqld[4551]: 2020-04-11 17:41:59 0 [Note] InnoDB: Waiting for purge to start
Apr 11 17:41:59 localhost.localdomain mysqld[4551]: 2020-04-11 17:41:59 0 [Note] InnoDB: 10.3.22 started; log sequence number 1625716; transaction id 21
Apr 11 17:41:59 localhost.localdomain mysqld[4551]: 2020-04-11 17:41:59 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 11 17:41:59 localhost.localdomain mysqld[4551]: 200411 17:41:59 server_audit: MariaDB Audit Plugin version 1.4.8 STARTED.
Apr 11 17:41:59 localhost.localdomain mysqld[4551]: 200411 17:41:59 server_audit: Query cache is enabled with the TABLE events. Some table reads can be veiled.2020-04-11 17:41:59 0 [Note] InnoDB: Buffer pool(s) load completed at 200411 17:41:59
Apr 11 17:41:59 localhost.localdomain mysqld[4551]: 2020-04-11 17:41:59 0 [Note] Reading of all Master_info entries succeeded
Apr 11 17:41:59 localhost.localdomain mysqld[4551]: 2020-04-11 17:41:59 0 [Note] Added new Master_info '' to hash table
Apr 11 17:41:59 localhost.localdomain mysqld[4551]: 2020-04-11 17:41:59 0 [Note] /usr/sbin/mysqld: ready for connections.
Apr 11 17:41:59 localhost.localdomain mysqld[4551]: Version: '10.3.22-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 0  Mageia MariaDB Server
Apr 11 17:41:59 localhost.localdomain systemd[1]: Started MySQL database server.


My questions
    1. What means disabled/enabled
    2. What means CGroup
    3. localhost.localdomain systemd[1]: Started MySQL database server
    So do I need to start this service by hand each time I want to use mysql?
    4. I had a shutdown error because the mysql service did not stop. I waited over 5 min and this service did not stop. So I disable the service again. How can I avoid this?

Regards

Spinnifex
Spinnifex
 
Posts: 141
Joined: Nov 25th, '19, 12:38
Location: Europe / Potsdam

Re: Service question

Postby doktor5000 » Apr 11th, '20, 19:14

Spinnifex wrote:1. What means disabled/enabled

In what context? For the whole service or the vendor preset? enabled/disabled for the service defines whether it should start at boot-time.
See https://www.freedesktop.org/software/systemd/man/systemctl.html#enable%20UNIT%E2%80%A6 / https://www.freedesktop.org/software/systemd/man/systemctl.html#disable%20UNIT%E2%80%A6

Spinnifex wrote:2. What means CGroup

cgroups are control groups, this a kernel mechanism for controlling ressources.
See https://www.kernel.org/doc/Documentatio ... groups.txt / https://www.kernel.org/doc/Documentation/cgroup-v2.txt or maybe http://0pointer.de/blog/projects/resources.html

Spinnifex wrote:3. localhost.localdomain systemd[1]: Started MySQL database server
So do I need to start this service by hand each time I want to use mysql?

No, as it's already starting at boot time, as far as I can tell. But if it would not be enabled, then yes you would have to start it once per each boot where you want to use it - as with every other service.

Spinnifex wrote:4. I had a shutdown error because the mysql service did not stop. I waited over 5 min and this service did not stop. So I disable the service again. How can I avoid this?

Well better check why it will not shutdown. What did you do after the 5 minutes ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron