The tracker miner is set up as a user unit, not a system unit (all it does is index some folders in a user's home directory). In order to find it, you need to explicitly tell systemd
to look in the user units (To be more precise, you're telling systemd
which service manager it should use).
You can retry all the above commands by including the --user
option and should be able to manage the service. Note that sudo
will not be required with systemctl --user
commands.
For example in my case:
Note I'm on Ubuntu 21.10 which ships with Tracker 3, so the service name is different
$ systemctl --user restart tracker-miner-fs-3.service
$ systemctl status tracker-miner-fs-3.service
Unit tracker-miner-fs-3.service could not be found.
$ systemctl --user status tracker-miner-fs-3.service
● tracker-miner-fs-3.service - Tracker file system data miner
Loaded: loaded (/usr/lib/systemd/user/tracker-miner-fs-3.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-02-04 12:50:14 CET; 5min ago
Main PID: 13141 (tracker-miner-f)
Tasks: 6 (limit: 14089)
Memory: 8.2M
CPU: 183ms
CGroup: /user.slice/user-1000.slice/[email protected]/background.slice/tracker-miner-fs-3.service
└─13141 /usr/libexec/tracker-miner-fs-3
Feb 04 12:50:14 danny systemd[1624]: Starting Tracker file system data miner...
Feb 04 12:50:14 danny systemd[1624]: Started Tracker file system data miner.
You can also find this out from the systemctl status
command as the unit will be listed under user.slice
instead of system.slice
.