Score:1

Units hidden from systemctl 20.04

cn flag

During some troubleshooting of journal errors, I have run into a situation with systemctl and the unit tracker-miner-fs. I have tried several forms of the command and cannot get systemctl to find the unit.

systemctl status does show the service listed and system status is running (no failed units)

systemctl status tracker-miner-fs : Not Found
systemctl list-units tracker-miner-fs : Not Found
systemctl list-unit-files tracker-miner-fs : Not Found
systemctl list-unit-files tracker-miner-fs -all : Not Found
systemctl -all : Not listed
systemctl stop tracker-miner-fs : Not found
systemctl unmask tracker-miner-fs :Not found

All forms have been tried with sudo and without. It's not that this particular unit is causing trouble, but it does beg the question why? And is there some peculiar setting that may be hiding other units and causing unknown errors?

Can any one shed some light on this behavior?

Score:1
jp flag
Dan

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.

DoImagine avatar
cn flag
Thank you, I figured I was missing something obvious.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.