systemctl如何根据pid寻找具体哪个服务

家里折腾我家云omv系统, 

一直有个进程 2105 aria2c --conf-path=/opt/etc/aria2.conf

在写emmc文件...一会就写满了...

 

需要利用systemctl disable 该项服务, 以解决该问题...

root@omv:/opt# systemctl --help | grep -i pid
  status [PATTERN...|PID...]      Show runtime status of one or more units
  help PATTERN...|PID...          Show manual for one or more units
root@omv:/opt# systemctl status 2105
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
  Drop-In: /lib/systemd/system/rc-local.service.d
           └─debian.conf
   Active: active (running) since Tue 2020-03-24 22:56:36 CST; 8min ago
  Process: 1450 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
    Tasks: 48 (limit: 4915)
   Memory: 110.3M
      CPU: 13.582s
   CGroup: /system.slice/rc-local.service
           ├─1765 redis-server 127.0.0.1:6379
           ├─1788 snmpd -c /opt/etc/snmp/snmpd.conf
           ├─2105 aria2c --conf-path=/opt/etc/aria2.conf
           ├─2110 shellinaboxd -t -u root --css /opt/lib/shellinabox/white-on-black.css -b
           ├─2111 shellinaboxd -t -u root --css /opt/lib/shellinabox/white-on-black.css -b
           ├─2118 transmission-daemon -g /opt/etc/transmission
           ├─2177 nginx: master process nginx
           ├─2178 nginx: worker process
           ├─2179 nginx: worker process
           ├─2180 nginx: worker process
           ├─2182 nginx: worker process
           ├─2184 php-fpm: master process (/opt/etc/php7-fpm.conf)
           ├─2185 php-fpm: pool www
           ├─2186 php-fpm: pool www
           ├─2217 /opt/bin/filebrowser -d /opt/etc/filebrowser/filebrowser.db
           ├─2221 /opt/bin/baidupan
           └─2223 /opt/easyexplorer/easy-explorer-arm

Mar 24 23:03:11 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Mar 24 23:03:21 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Mar 24 23:03:31 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Mar 24 23:03:41 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Mar 24 23:03:51 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Mar 24 23:04:01 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Mar 24 23:04:11 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Mar 24 23:04:21 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Mar 24 23:04:31 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Mar 24 23:04:41 omv transmission-daemon[2118]: watchdir Failed to open directory "/srv/dev-disk-by-label-data/media/watchdir" (2): No such file or directory (watchdir.c:354)
Warning: rc-local.service changed on disk. Run 'systemctl daemon-reload' to reload units.

ok, 可以看到是rc-local.service...

root@omv:/opt/bin# systemctl stop rc-local.service
Warning: rc-local.service changed on disk. Run 'systemctl daemon-reload' to reload units.
root@omv:/opt/bin# systemctl disable rc-local.service

 

你可能感兴趣的:(w3c,Linux)