This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM62A7:在 systemd 中,如何使我添加的服务更快地启动

Guru**** 2484615 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1554061/am62a7-in-systemd-how-can-i-make-the-service-i-add-start-up-more-quickly

器件型号:AM62A7


工具/软件:

TI 团队大家好

我在 systemd 中添加了一个 hd260_init.service“来启动我的应用程序以显示相机图像。

但是、hd260_init.service 几乎是最后一个开始。

我想知道如何更快速地启动这项服务。

以下是 hd260_init.service 的详细内容及其启动序列。

/etc/systemd/system/hd260_init.service

[Unit]
Description=BootStart Script Service

[Service]
Type=forking
ExecStart=/root/bootstart.sh
Restart=on-failure
User=root
WorkingDirectory=/root
StandardOutput=tty
TTYPath=/dev/ttyS2

[Install]
WantedBy=sysinit.target

root@am62axx-evm:~# systemd-analyze 
Startup finished in 1.232s (kernel) + 3.586s (userspace) = 4.818s 
multi-user.target reached after 3.520s in userspace.
root@am62axx-evm:~# 
root@am62axx-evm:~# 
root@am62axx-evm:~# 
root@am62axx-evm:~# systemd-analyze blame
1.670s dev-mmcblk0p1.device
1.231s systemd-networkd.service
 884ms systemd-timesyncd.service
 868ms systemd-resolved.service
 607ms systemd-udev-trigger.service
 534ms user@0.service
 327ms systemd-userdbd.service
 286ms kmod-static-nodes.service
 285ms modprobe@configfs.service
 285ms modprobe@drm.service
 281ms modprobe@fuse.service
 275ms dev-mqueue.mount
 273ms sys-kernel-debug.mount
 273ms dev-hugepages.mount
 267ms tmp.mount
 248ms systemd-network-generator.service
 241ms systemd-remount-fs.service
 237ms systemd-sysctl.service
 229ms systemd-logind.service
 182ms systemd-vconsole-setup.service
 180ms systemd-journald.service
 156ms systemd-udevd.service
 135ms systemd-update-utmp.service
 110ms systemd-tmpfiles-setup.service
  89ms sys-kernel-config.mount
  87ms sys-fs-fuse-connections.mount
  87ms systemd-journal-flush.service
  80ms systemd-tmpfiles-setup-dev-early.service
  64ms dbus.service
  60ms var-volatile.mount
  49ms systemd-random-seed.service
  47ms hd260_init.service
  46ms systemd-user-sessions.service
  41ms user-runtime-dir@0.service
  34ms systemd-update-utmp-runlevel.service
  28ms systemd-tmpfiles-setup-dev.service
  22ms sync-clocks.service
root@am62axx-evm:~# 

此致、

Gao

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、高先生、

    您希望以多早的速度运行  hd260_init.service? 在运行此服务之前、您需要探测摄像机并准备好显示屏。

    此致、

    建中