IGH开源主站+内核时钟补丁preempt_rt

USAGE: /etc/init.d/ethercat {start|stop|restart|status}

安装主站成功显示:

fgs@fgs:~/ecat/etherlab-stable1.5$ ethercat
Please specify a command!

Usage: ethercat <COMMAND> [OPTIONS] [ARGUMENTS]

Commands (can be abbreviated):
  alias      Write alias addresses.
  config     Show slave configurations.
  crc        CRC error register diagnosis.
  cstruct    Generate slave PDO information in C language.
  data       Output binary domain process data.
  debug      Set the master's debug level.
  domains    Show configured domains.
  download   Write an SDO entry to a slave.
  eoe        Display Ethernet over EtherCAT statictics.
  foe_read   Read a file from a slave via FoE.
  foe_write  Store a file on a slave via FoE.
  graph      Output the bus topology as a graph.
  master     Show master and Ethernet device information.
  pdos       List Sync managers, PDO assignment and mapping.
  reg_read   Output a slave's register contents.
  reg_write  Write data to a slave's registers.
  rescan     Rescan the bus.
  sdos       List SDO dictionaries.
  sii_read   Output a slave's SII contents.
  sii_write  Write SII contents to a slave.
  slaves     Display slaves on the bus.
  soe_read   Read an SoE IDN from a slave.
  soe_write  Write an SoE IDN to a slave.
  states     Request application-layer states.
  upload     Read an SDO entry from a slave.
  version    Show version information.
  xml        Generate slave information XML.

Global options:
  --master  -m <master>  Comma separated list of masters
                         to select, ranges are allowed.
                         Examples: '1,3', '5-7,9', '-3'.
                         Default: '-' (all).
  --force   -f           Force a command.
  --quiet   -q           Output less information.
  --verbose -v           Output more information.
  --help    -h           Show this help.

Numerical values can be specified either with decimal (no
prefix), octal (prefix '0') or hexadecimal (prefix '0x') base.

Call 'ethercat <COMMAND> --help' for command-specific help.

Send bug reports to fp@igh-essen.com.
fgs@fgs:~/ecat/etherlab-stable1.5$ 

测试未加入实施补丁时Linux4.15的实时性:

fgs@fgs:~$ uname -a
Linux fgs 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
fgs@fgs:~$ sudo cyclictest -t 5 -p 80 -n
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.39 0.17 0.09 1/519 23864          

T: 0 (23838) P:80 I:1000 C:  13367 Min:      2 Act:    3 Avg:    3 Max:      78
T: 1 (23839) P:80 I:1500 C:   8911 Min:      2 Act:    3 Avg:    3 Max:      24
T: 2 (23840) P:80 I:2000 C:   6683 Min:      2 Act:    3 Avg:    3 Max:      42
T: 3 (23841) P:80 I:2500 C:   5346 Min:      2 Act:    3 Avg:    3 Max:      44
T: 4 (23842) P:80 I:3000 C:   4455 Min:      2 Act:    3 Avg:    3 Max:     139
^Cfgs@fgs:~$ 

sudo make menuconfig 出现问题:
make: *** No rule to make target 'menuconfig'. Stop.
原因是没有在内核源码目录下进行。例如,要编译或升级的内核解压后的目录为/usr/src/linux-2.4.24,一定要进入到该目录后使用make menuconfig命令,这样就不会提示上面的错误了。
解压:tar zxvf pythontab.tar.gz
tar -zxvf httpd-2.4.4.tar.bz2
解压文件到指定文件夹: tar -zxvf fenci.py.tar.gz -C pythontab/

加入preempt_rt时钟后Linux4.16.18的实时性:
fgs@fgs:~$ uname -a
Linux fgs 4.16.18-rt12 #1 SMP PREEMPT RT Tue Jul 6 13:51:26 CST 2021 x86_64 x86_64 x86_64 GNU/Linux
fgs@fgs:~$ sudo cyclictest -t 5 -p 80 -n
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 4.64 3.31 1.44 1/525 4611          

T: 0 ( 4588) P:80 I:1000 C:  10062 Min:      3 Act:    4 Avg:    4 Max:      17
T: 1 ( 4589) P:80 I:1500 C:   6708 Min:      3 Act:    6 Avg:    4 Max:      13
T: 2 ( 4590) P:80 I:2000 C:   5030 Min:      3 Act:    3 Avg:    4 Max:      11
T: 3 ( 4591) P:80 I:2500 C:   4024 Min:      3 Act:    4 Avg:    4 Max:      13
T: 4 ( 4592) P:80 I:3000 C:   3353 Min:      3 Act:    3 Avg:    4 Max:      14
fgs@fgs:~$ 
上一篇:每天一个小漏洞——struts2 系列漏洞


下一篇:mysql 按表达式或函数分组、多个字段分组、排序