1      Scope of Document

systemd 是一个 Linux 系统基础组件的集合,提供了一个系统和服务管理器,运行为 PID 1 并负责启动其它程序。功能包括:支持并行化任务;同时采用 socket 式与 D-Bus 总线式激活服务;按需启动守护进程(daemon);利用 Linux 的 cgroups 监视进程;支持快照和系统恢复;维护挂载点和自动挂载点;各服务间基于依赖关系进行精密控制。systemd 支持 SysV 和 LSB 初始脚本,可以替代 sysvinit。除此之外,功能还包括日志进程、控制基础系统配置,维护登陆用户列表以及系统账户、运行时目录和设置,可以运行容器和虚拟机,可以简单的管理网络配置、网络时间同步、日志转发和名称解析等。

与多数发行版使用的System V风格init相比,systemd采用了以下新技术: (1) 采用Socket激活式与总线激活式服务,以提高相互依赖的各服务的并行运行性能; (2) 用Cgroups代替PID来追踪进程,以此即使是两次fork之后生成的守护进程也不会脱离systemd的控制。

1.1     Function Requirement

Learning systemd script, and write related systemd scirpt , example gps.service/4g.service.

2      Hardware Overview

NA

3      Functional Description

3.1     Functional Block Diagram

NA

4      Demo

4.1     4g script using systemd

[Unit]

Description=IoTP 4G Service (one-shot 4g mode)

Before=ntpd.service

[Service]

Type=oneshot

ExecStart=

ExecStart=/bin/4g-lunch

RemainAfterExit=yes

[Install]

WantedBy=multi-user.target

4.2     Gps script using systemd

[Unit]

Description=IoTP GPS Service (one-shot mode)

Before=ntpd.service

[Service]

Type=oneshot

ExecStart=

ExecStart=/bin/gps-lunch

RemainAfterExit=yes

[Install]

WantedBy=multi-user.target

5      Boot log

Starting IoTP 4G Service (one-shot 4g mode)...

[  OK  ] Started IoTP 4G Service (one-shot 4g mode).

Starting IoTP GPS Service (one-shot mode)...

[  OK  ] Started IoTP GPS Service (one-shot mode).

Basic command:

systemctl enable 4g.service

systemctl disable 4g.service

systemctl status 4g.service

am335x system upgrade rootfs custom service using systemd script(十七)的更多相关文章

  1. am335x system upgrade rootfs using yocto make rootfs(十二)

    1      Scope of Document This document describes how to make am335x arago rootfs using ycoto project ...

  2. am335x system upgrade rootfs for bridge-utils cross compile (十四)

    bridge-utils移植 [目的] 移植bridge-utils的目是在AM335X开发板上使用bridge功能. [环境] 1.  Ubuntu 16.04发行版 2.  MC183平台 3.  ...

  3. am335x system upgrade rootfs for dhcpcd cross compile(十三)

    dhcpcd移植 [目的] 移植dhcpcd的目是在AM335X开发板上使用dhcp功能,获取WAN口设备的IP,并且可以通过参数指定其matric,matric值越小,其优先级越高.如设备可以以太网 ...

  4. am335x system upgrade set/get current cpufreq(二十一)

    1      Scope of Document This document describes am335x cpufreq technology insider. 2      Requireme ...

  5. am335x system upgrade kernel tf(五)

    1      Scope of Document This document describes TF hardware design 2      Requiremen 2.1     Functi ...

  6. am335x system upgrade uboot nand boot(三)

    在uboot 下初始化nand,一般需要做如下工作: 第一: 配置默认从NAND boot Index: include/configs/am335x_evm.h=================== ...

  7. am335x system upgrade uboot ethernet(二)

    系统可以通过SD卡引道之后,为了之后了调试方便 通过查看网卡的硬件设计 正常来说需要注意的有如下几点: 1) 网口 的接线方式: RMII 2) 网口的PHY地址两张网口,这里我们只需先初始化一张网卡 ...

  8. am335x system upgrade kernel ethernet(四)

    1      Scope of Document This document describes ethernet hardware design and porting KZS8081 to ubo ...

  9. am335x system upgrade kernel gpio(九)

    1      Hardware Overview gpio interface,pin map: AM335X_I2C0_W_C----------------------MCASP0_AXR1 /* ...

随机推荐

  1. 11 模块、模块的搜索顺序、__file__内置属性、__name__属性

    模块的概念 一个python文件就是一个模块. 模块名同时也是一个标识符,需要符合标识符的命名规则. 在模块中定义的全局变量.函数.类 都是个外界提供的直接使用的工具. 模块就好比工具包,要想使用一个 ...

  2. 嵌入式Linux学习笔记之第二阶段---文件I/O

    1.文件IO的四个函数 一些术语: 不带缓冲的I/O: 每个read和write都调用内核中的一个系统调用. 文件描述符: 一个非负整数,对内核而言,所以打开的文件都通过文件描述符引用. ①打开或创建 ...

  3. Linux文件和目录相关的命令

    当前目录 .     上一层目录 ..     tab键 自动补全             查看目录内容 ls 以.开头的都是隐藏文件需要用-a才能显示出来 ls通配符的使用 * 代表任意个数个字符 ...

  4. 交流绕组 & 感应电机

    交流绕组 1. 为什么整距线圈产生的电动势最大? 整距时, 一个线圈的两根有效导体边之间相差180电角度, 线圈的节距因数为1, 线圈产生的电动势为单根导体边产生电动势的2倍, 为最大 2. 三相交流 ...

  5. 使用代码浏览WPF控件模版

    纯代码创建,不需要创建界面,创建WPF工程后,直接复制代码就可以使用. 当你手头没有Blend,又不记得以下这段代码,但是又想浏览控件模版的时候,就可以直接复制拿来用了. public partial ...

  6. 日常hive遇到的问题

    1 hive中的复杂数据类型数据如何导入(array) 创建hive表 create table temp.dws_search_by_program_set_count_his( program_s ...

  7. gradle上传jar包到maven公共仓库

    首先这里说的中央仓库 是指的 https://issues.sonatype.org/ 而不是maven私服. 其次是使用gradle上传jar包,maven上传,网上有很多教程,这里不做赘述. 首选 ...

  8. html5细线表格制作

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  9. IO模型之AIO代码及其实践详解

    一.AIO简介 AIO是java中IO模型的一种,作为NIO的改进和增强随JDK1.7版本更新被集成在JDK的nio包中,因此AIO也被称作是NIO2.0.区别于传统的BIO(Blocking IO, ...

  10. 解决 React Native:The development server returned response error code: 404

    解决方法: 打开android/app/build.gradle compile 'com.facebook.react:react-native:+' 修改为: compile ("com ...