linux学习lesson36

微信4.1.5.16升级后,你的自动化脚本失灵了?手把手教你用C#让UI树“复活” 微信4.1.5.16版本更新导致自动化脚本失效?本文深入解析微信UI树隐藏的原因,并提供C#实战解决方案,通过UIAutomation技术恢复UI树结构,帮助开发者重新实现自动化操作。涵盖技术原理、代码实现及优化策略,适合RPA开发者和自动化脚本编写者参考。 阅读详情

目录

1 linux任务计划cron

2 chkconfig工具

3 systemd管理服务

4 unit介绍


1 linux任务计划cron

Linux任务计划功能的操作都是通过crontab命令来完成的,常用的参数有:

-u:表示指定某个用户,不加-u选项则为当前用户

-e:表示制定计划任务

-l:表示列出计划任务

-r:表示删除计划任务

  • 编写任务计划的格式
[root@linux01 ~]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed

格式:分 时 日 月 周 user command

分范围0-59,时范围0-23,日范围1-31,月范围1-12,周1-7

可用格式1-5表示一个范围1到5

可用格式1,2,3表示1或者2或者3

可用格式*/2表示被2整除的数字,比如小时,那就是每隔2小时

  • 命令crontab -e打开任务计划编写的配置文件
[root@linux01 ~]# crontab -e
59 16 * * * echo "hello world!" > /tmp/testcron.log
[root@linux01 ~]# date
Sun Oct 28 16:58:41 CST 2018
[root@linux01 ~]# ll /tmp/
total 8
-rwx------. 1 root root 836 Oct 25 08:52 ks-script-wgZ0hw
-rw-r--r--  1 root root  13 Oct 28 16:59 testcron.log
-rw-------. 1 root root   0 Oct 25 08:45 yum.log
[root@linux01 ~]# cat /tmp/testcron.log
hello world!

命令crontab -e实际上是打开了/var/spool/cron/username文件(如果用户是root,则打开的是/var/spool/cron/root)。打开这个文件使用了vim编辑器,所以保存时在命令行模式下输入:wq即可。但是请千万不要直接去编辑那个文件,否则会出错,所以一定要使用命令crontab -e来编辑文件/var/spool/cron/username

  • 命令crontab -e -u user,指定user用户打开任务计划编写的配置文件
[root@linux01 ~]# useradd user
[root@linux01 ~]# crontab -e -u user
添加以下命令
10 17 * * * echo "hello world!" > /tmp/usercron.log
[root@linux01 ~]# ll /tmp/
total 12
-rwx------. 1 root root 836 Oct 25 08:52 ks-script-wgZ0hw
-rw-r--r--  1 root root  13 Oct 28 16:59 testcron.log
-rw-r--r--  1 user user  13 Oct 28 17:10 usercron.log
-rw-------. 1 root root   0 Oct 25 08:45 yum.log
[root@linux01 ~]# cat /tmp/usercron.log
hello world!
  • 命令crontab -l,查看任务计划列表(默认是当前用户)
[root@linux01 ~]# crontab -l
59 16 * * * echo "hello world!" > /tmp/testcron.log
  • 命令crontab -l -u user,查看user用户任务计划列表
[root@linux01 ~]# crontab -l -u user
10 17 * * * echo "hello world!" > /tmp/usercron.log
  • 命令crontab -r,清空任务计划列表(默认是当前用户)
[root@linux01 ~]# crontab -l
59 16 * * * echo "hello world!" > /tmp/testcron.log
[root@linux01 ~]# crontab -r
[root@linux01 ~]# crontab -l
no crontab for root
  • 命令crontab -r -u user,清空user用户任务计划列表
[root@linux01 ~]# crontab -l -u user
10 17 * * * echo "hello world!" > /tmp/usercron.log
[root@linux01 ~]# crontab -r -u user
[root@linux01 ~]# crontab -l -u user
no crontab for user
  • crond服务启动:systemctl start crond.service
[root@linux01 ~]# systemctl start crond.service
  • 查看crond服务是否启动:systemctl status crond.service 
[root@linux01 ~]# systemctl status crond.service

 

 

2 chkconfig工具

CentOS 6上的服务管理工具为chkconfig,Linux系统所有的预设服务都可以通过查看/etc/init.d/目录得到

[root@linux01 ~]# ls /etc/init.d/
functions  netconsole  network  README

因为CentOS 7已经不再延续CentOS 6版本的服务管理方案了。但是我们依然可以继续使用chkconfig这个命令,系统的预设服务都可以通过这样的命令实现:service 服务名 start|stop|restart;可以使用命令/etc/init.d/服务名 start

  • 命令chkconfig --list列出所有的服务及其每个级别的开启状态
[root@linux01 ~]# chkconfig --list

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

netconsole         0:off    1:off    2:off    3:off    4:off    5:off    6:off
network            0:off    1:off    2:on    3:on    4:on    5:on    6:off
  • 因为chkconfig命令是centos6以前的命令,其中以上的数字0-6代表系统运行级别:

0 - halt (Do NOT set initdefault to this)

运行级别0:系统停机状态,系统默认运行级别不能设为0,否则不能正常启动

1 - Single user mode

运行级别1:单用户工作状态,root权限,用于系统维护,禁止远程登陆

2 - Multiuser, without NFS (The same as 3, if you do not have networking)

运行级别2:多用户状态(没有NFS)

3 - Full multiuser mode

运行级别3:完全的多用户状态(有NFS),登陆后进入控制台命令行模式

4 - unused

运行级别4:系统未使用,保留

5 - X11

运行级别5:X11控制台,登陆后进入图形GUI模式

6 - reboot (Do NOT set initdefault to this)

运行级别6:系统正常关闭并重启,默认运行级别不能设为6,否则不能正常启动

  • 关闭运行级别3的network服务
[root@linux01 ~]# chkconfig --level 3 network off
[root@linux01 ~]# chkconfig --list

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

netconsole         0:off    1:off    2:off    3:off    4:off    5:off    6:off
network            0:off    1:off    2:on    3:off    4:on    5:on    6:off
  • 关闭运行级别345的network服务
[root@linux01 ~]# chkconfig --level 345 network off
[root@linux01 ~]# chkconfig --list

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

netconsole         0:off    1:off    2:off    3:off    4:off    5:off    6:off
network            0:off    1:off    2:on    3:off    4:off    5:off    6:off
  • 把network服务从系统服务删除
[root@linux01 ~]# chkconfig --del network
[root@linux01 ~]# chkconfig --list

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

netconsole         0:off    1:off    2:off    3:off    4:off    5:off    6:off
  • 将network服务加到系统服务
[root@linux01 ~]# chkconfig --add network
[root@linux01 ~]# chkconfig --list

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

netconsole         0:off    1:off    2:off    3:off    4:off    5:off    6:off
network            0:off    1:off    2:on    3:on    4:on    5:on    6:off
  • /etc/init.d下自定义一个启动脚本
[root@linux01 init.d]# cp network test
[root@linux01 init.d]# chkconfig --add test
[root@linux01 init.d]# chkconfig --list

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

      If you want to list systemd services use 'systemctl list-unit-files'.
      To see services enabled on particular target use
      'systemctl list-dependencies [target]'.

netconsole         0:off    1:off    2:off    3:off    4:off    5:off    6:off
network            0:off    1:off    2:on    3:on    4:on    5:on    6:off
test               0:off    1:off    2:on    3:on    4:on    5:on    6:off

 

 

3 systemd管理服务

CentOS 7不使用SysV而改为systemd了,这是因为systemd支持多个服务并发启动,而SysV只能一个一个地启动,这样最终导致的结果是systemd方式启动会快很多

  • systemctl list-units --all --type=service列出系统服务
[root@linux01 ~]# systemctl list-units --all --type=service
  UNIT                                LOAD      ACTIVE   SUB     DESCRIPTION
  auditd.service                      loaded    active   running Security Auditing Service
  cpupower.service                    loaded    inactive dead    Configure CPU power related setti
  crond.service                       loaded    active   running Command Scheduler
  dbus.service                        loaded    active   running D-Bus System Message Bus
● display-manager.service             not-found inactive dead    display-manager.service
  dracut-shutdown.service             loaded    inactive dead    Restore /run/initramfs
  ebtables.service                    loaded    inactive dead    Ethernet Bridge Filtering tables
  emergency.service                   loaded    inactive dead    Emergency Shell
● exim.service                        not-found inactive dead    exim.service
  firewalld.service                   loaded    active   running firewalld - dynamic firewall daem
getty@tty1.service                  loaded    active   running Getty on tty1
● ip6tables.service                   not-found inactive dead    ip6tables.service
● ipset.service                       not-found inactive dead    ipset.service
● iptables.service                    not-found inactive dead    iptables.service
  irqbalance.service                  loaded    active   running irqbalance daemon
  kdump.service                       loaded    active   exited  Crash recovery kernel arming
  kmod-static-nodes.service           loaded    active   exited  Create list of required static de
  microcode.service                   loaded    inactive dead    Load CPU microcode update
  network.service                     loaded    active   exited  LSB: Bring up/down networking
  NetworkManager-wait-online.service  loaded    active   exited  Network Manager Wait Online

几个常用的服务相关的命令

  • systemctl enable crond.service //让服务开机启动
[root@linux01 ~]# systemctl enable crond.service
  • systemctl disable crond //禁止开机启动
[root@linux01 ~]# systemctl disabledcrond.service
  • systemctl status crond //查看状态
[root@linux01 ~]# systemctl status crond.service

  • systemctl stop crond //停止服务
[root@linux01 ~]# systemctl stop crond.service

  • systemctl start crond与 //启动服务
[root@linux01 ~]# systemctl startcrond.service

  • systemctl restart crond //重启服务
[root@linux01 ~]# systemctl restart crond.service
  • systemctl is-enabled crond //检查服务是否开机启动
[root@linux01 ~]# systemctl is-enabled crond.service
enabled

 

 

4 unit介绍

  • ls /usr/lib/systemd/system //系统所有unit,分为以下类型
[root@linux01 ~]# ls /usr/lib/systemd/system

  • ls -l runlevel*  列出0-6的级别
[root@linux01 ~]# ls -l /usr/lib/systemd/system/runlevel*

每种类型的文件都为一个unit,正是这些unit才组成了系统的各个资源(各个服务、各个设备等)

service 系统服务

target 多个unit组成的组

device 硬件设备

mount 文件系统挂载点

automount 自动挂载点

path 文件或路径

scope 不是由systemd启动的外部进程

slice 进程组

snapshot systemd快照

socket 进程间通信套接字

swap  swap文件

timer 定时器

unit相关的命令

  • systemctl list-units //列出正在运行的unit
[root@linux01 ~]# systemctl list-units
UNIT                              LOAD   ACTIVE SUB       DESCRIPTION
proc-sys-fs-binfmt_misc.automount loaded active waiting   Arbitrary Executable File Formats
sys-devices-pci0000:00-0000:00:07.1-ata2-host2-target2:0:0-2:0:0:0-block-sr0.device loaded a
sys-devices-pci0000:00-0000:00:10.0-host0-target0:0:0-0:0:0:0-block-sda-sda1.device loaded a
sys-devices-pci0000:00-0000:00:10.0-host0-target0:0:0-0:0:0:0-block-sda-sda2.device loaded a
sys-devices-pci0000:00-0000:00:10.0-host0-target0:0:0-0:0:0:0-block-sda-sda3.device loaded a
sys-devices-pci0000:00-0000:00:10.0-host0-target0:0:0-0:0:0:0-block-sda.device loaded active
sys-devices-pci0000:00-0000:00:11.0-0000:02:01.0-net-ens33.device loaded active plugged   82
sys-devices-pci0000:00-0000:00:11.0-0000:02:02.0-sound-card0.device loaded active plugged   
sys-devices-platform-floppy.0-block-fd0.device loaded active plugged   /sys/devices/platform
sys-devices-platform-serial8250-tty-ttyS2.device loaded active plugged   /sys/devices/platfo
sys-devices-platform-serial8250-tty-ttyS3.device loaded active plugged   /sys/devices/platfo
sys-devices-pnp0-00:06-tty-ttyS0.device loaded active plugged   /sys/devices/pnp0/00:06/tty/
sys-devices-pnp0-00:07-tty-ttyS1.device loaded active plugged   /sys/devices/pnp0/00:07/tty/
sys-module-configfs.device        loaded active plugged   /sys/module/configfs
sys-subsystem-net-devices-ens33.device loaded active plugged   82545EM Gigabit Ethernet Cont
-.mount                           loaded active mounted   /
  • systemctl list-units --all //列出所有,包括失败的或者inactive的
[root@linux01 ~]# systemctl list-units --all
  UNIT                            LOAD      ACTIVE   SUB       DESCRIPTION
  proc-sys-fs-binfmt_misc.automount loaded    active   waiting   Arbitrary Executable File F
  dev-cdrom.device                loaded    active   plugged   VMware_Virtual_IDE_CDROM_Driv
  dev-disk-by\x2did-ata\x2dVMware_Virtual_IDE_CDROM_Drive_10000000000000000001.device loaded
  dev-disk-by\x2dlabel-CentOS\x5cx207\x5cx20x86_64.device loaded    active   plugged   VMwar
  dev-disk-by\x2dpath-pci\x2d0000:00:07.1\x2data\x2d2.0.device loaded    active   plugged   
  dev-disk-by\x2dpath-pci\x2d0000:00:10.0\x2dscsi\x2d0:0:0:0.device loaded    active   plugg
  dev-disk-by\x2dpath-pci\x2d0000:00:10.0\x2dscsi\x2d0:0:0:0\x2dpart1.device loaded    activ
  dev-disk-by\x2dpath-pci\x2d0000:00:10.0\x2dscsi\x2d0:0:0:0\x2dpart2.device loaded    activ
  dev-disk-by\x2dpath-pci\x2d0000:00:10.0\x2dscsi\x2d0:0:0:0\x2dpart3.device loaded    activ
  dev-disk-by\x2duuid-2018\x2d05\x2d03\x2d21\x2d07\x2d04\x2d00.device loaded    active   plu
  dev-disk-by\x2duuid-36a0e938\x2d9ce7\x2d4057\x2dbe14\x2d67b1a1901480.device loaded    acti
  dev-disk-by\x2duuid-6acf1896\x2d1b81\x2d471a\x2db278\x2d828cab45c8ed.device loaded    acti
  dev-disk-by\x2duuid-df1a0773\x2d646a\x2d4743\x2dbede\x2d08f050362dc4.device loaded    acti
  dev-fd0.device                  loaded    active   plugged   /dev/fd0
  dev-sda.device                  loaded    active   plugged   VMware_Virtual_S
  dev-sda1.device                 loaded    active   plugged   VMware_Virtual_S 1
  dev-sda2.device                 loaded    active   plugged   VMware_Virtual_S 2
  dev-sda3.device                 loaded    active   plugged   VMware_Virtual_S 3
  dev-sr0.device                  loaded    active   plugged   VMware_Virtual_IDE_CDROM_Driv
  dev-ttyS0.device                loaded    active   plugged   /dev/ttyS0
  dev-ttyS1.device                loaded    active   plugged   /dev/ttyS1
  dev-ttyS2.device                loaded    active   plugged   /dev/ttyS2
  dev-ttyS3.device                loaded    active   plugged   /dev/ttyS3
  • systemctl list-units --all --state=inactive //列出inactive的unit
[root@linux01 ~]# systemctl list-units --all --state=inactive
  UNIT                               LOAD      ACTIVE   SUB  DESCRIPTION
  proc-sys-fs-binfmt_misc.mount      loaded    inactive dead Arbitrary Executable File Forma
  sys-fs-fuse-connections.mount      loaded    inactive dead FUSE Control File System
  systemd-ask-password-console.path  loaded    inactive dead Dispatch Password Requests to C
  cpupower.service                   loaded    inactive dead Configure CPU power related set
● display-manager.service            not-found inactive dead display-manager.service
  dracut-shutdown.service            loaded    inactive dead Restore /run/initramfs
  ebtables.service                   loaded    inactive dead Ethernet Bridge Filtering table
  emergency.service                  loaded    inactive dead Emergency Shell
● exim.service                       not-found inactive dead exim.service
● ip6tables.service                  not-found inactive dead ip6tables.service
● ipset.service                      not-found inactive dead ipset.service
● iptables.service                   not-found inactive dead iptables.service
  microcode.service                  loaded    inactive dead Load CPU microcode update
  plymouth-quit-wait.service         loaded    inactive dead Wait for Plymouth Boot Screen t
  plymouth-quit.service              loaded    inactive dead Terminate Plymouth Boot Screen
  plymouth-read-write.service        loaded    inactive dead Tell Plymouth To Write Out Runt
  plymouth-start.service             loaded    inactive dead Show Plymouth Boot Screen
  rc-local.service                   loaded    inactive dead /etc/rc.d/rc.local Compatibilit
  rescue.service                     loaded    inactive dead Rescue Shell
  rhel-autorelabel.service           loaded    inactive dead Relabel all filesystems, if nec
  rhel-configure.service             loaded    inactive dead Reconfigure the system on admin
  rhel-loadmodules.service           loaded    inactive dead Load legacy module configuratio
selinux-policy-migrate-local-changes@targeted.service loaded    inactive dead Migrate loca
● sendmail.service                   not-found inactive dead sendmail.service
  sshd-keygen.service                loaded    inactive dead OpenSSH Server Key Generation
● syslog.service                     not-found inactive dead syslog.service
  • systemctl list-units --type=service//列出状态为active的service
[root@linux01 ~]# systemctl list-units --type=service
UNIT                               LOAD   ACTIVE SUB     DESCRIPTION
auditd.service                     loaded active running Security Auditing Service
crond.service                      loaded active running Command Scheduler
dbus.service                       loaded active running D-Bus System Message Bus
firewalld.service                  loaded active running firewalld - dynamic firewall daemon
getty@tty1.service                 loaded active running Getty on tty1
irqbalance.service                 loaded active running irqbalance daemon
kdump.service                      loaded active exited  Crash recovery kernel arming
kmod-static-nodes.service          loaded active exited  Create list of required static devi
network.service                    loaded active exited  LSB: Bring up/down networking
NetworkManager-wait-online.service loaded active exited  Network Manager Wait Online
NetworkManager.service             loaded active running Network Manager
polkit.service                     loaded active running Authorization Manager
postfix.service                    loaded active running Postfix Mail Transport Agent
rhel-dmesg.service                 loaded active exited  Dump dmesg to /var/log/dmesg
rhel-domainname.service            loaded active exited  Read and set NIS domainname from /e
rhel-import-state.service          loaded active exited  Import network configuration from i
rhel-readonly.service              loaded active exited  Configure read-only root support
rsyslog.service                    loaded active running System Logging Service
sshd.service                       loaded active running OpenSSH server daemon
systemd-journal-flush.service      loaded active exited  Flush Journal to Persistent Storage
systemd-journald.service           loaded active running Journal Service
  • systemctl is-active crond.service //查看某个服务是否为active
[root@linux01 ~]# systemctl is-active crond.service
active
  • systemctl is-enable crond.service //查看某个服务是否为enable
[root@linux01 ~]# systemctl is-enabled crond.service
enabled

 

 

5 target介绍

系统为了方便管理用target来管理unit

  • systemctl list-unit-files --type=target 查看当前系统的所有 target
[root@linux01 ~]# systemctl list-unit-files --type=target

  • systemctl list-dependencies multi-user.target //查看指定target下面有哪些unit
[root@linux01 ~]# systemctl list-dependencies multi-user.target

  • systemctl get-default 查看系统默认的target
[root@linux01 ~]# systemctl get-default
multi-user.target
  • systemctl set-default multi-user.target 设置默认的target
[root@linux01 ~]# systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.

上面提到的multi-user.target等同于CentOS 6的运行级别3,其实还有其他几个target对应0~6运行级别

一个service属于一种类型的unit

多个unit组成了一个target

一个target里面包含了多个service,可以查看文件/usr/lib/systemd/system/sshd.service里面[install]部分的内容,它就定义了该service属于哪一个target

cat /usr/lib/systemd/system/sshd.service //看[install]部分

[root@linux01 ~]# systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
[root@linux01 ~]# cat /usr/lib/systemd/system/sshd.service

[Unit]

Description=OpenSSH server daemon

Documentation=man:sshd(8) man:sshd_config(5)

After=network.target sshd-keygen.service

Wants=sshd-keygen.service



[Service]

Type=notify

EnvironmentFile=/etc/sysconfig/sshd

ExecStart=/usr/sbin/sshd -D $OPTIONS

ExecReload=/bin/kill -HUP $MAINPID

KillMode=process

Restart=on-failure

RestartSec=42s



[Install]

WantedBy=multi-user.target

 

扩展
1. anacron http://blog.youkuaiyun.com/strikers1982/article/details/4787226
2. xinetd服(默认机器没有安装这个服务,需要yum install xinetd安装)http://blog.sina.com.cn/s/blog_465bbe6b010000vi.html
3. systemd自定义启动脚本 http://www.jb51.net/article/100457.htm

 

 

Python 爬虫进阶技巧:新手必学的反爬突破与效率优化 本文系统总结了爬虫进阶的核心技巧,针对新手常见的反爬拦截、效率低下、动态页面解析等痛点问题,提出了可落地的解决方案。主要内容包括:通过随机UA池、代理IP池和Cookie池突破常见反爬机制;利用多线程/异步请求提升爬取效率;使用Selenium解析动态渲染页面;以及数据清洗方法提升数据质量。文中提供了完整的代码示例和实战对比数据,并强调爬虫开发应遵守合规性要求。这些技巧能帮助开发者快速提升爬虫实战能力,应对80%以上的常见爬取需求。 阅读详情

相关推荐

STM32G0——USB虚拟串口

STM32G0用cubeMX配置实现USB虚拟串口

阿昌 2320

Failed to restart **: Unit **.service not found错误,

执行命令提示, 知道systemctl这个命令是启动服务, 现在提示没有找到此服务,看启动的服务名像自己定义的,然后就大致了解了一下如何使用systemd注册服务, 需要到指定目录下配置注册服务文件。

z917185537的专栏 9343

26 硬件工程师笔面试高频考点真题解析——CAN总线

CAN总线是一种差分多主串行半双工总线,采用非破坏性位仲裁机制和五层硬件错误检测(位错误、填充错误、CRC校验、格式错误、应答错误),具有高可靠性和故障容错能力。关键设计包括两端120Ω终端电阻匹配阻抗、手拉手总线拓扑、显性/隐性电平优先级仲裁。常见故障分析指出多节点异常多因终端电阻错配/漏装、星型布线违规或总线过载;高速通讯失败常由阻抗失配或线缆过长导致信号反射。相比RS485,CAN支持多主架构、硬件自动仲裁和节点故障隔离,更适用于汽车、工业等高可靠场景。

XU157303764的博客 547

报错:Unit network.service could not be found.[已解决]

报错:Unit network.service could not be found.和Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.【已解决】

weixin_56114243的博客 4万+

【医学影像】Deep Learning for Automatic Pneumonia Detection

写在前面的话: 这篇论文是北美放射学会(RSNA)在Kaggle平台上托管的肺炎区域检测挑战赛取得第二名成绩的解决方案。因为笔者需要用到其中的图像增强方案,因此本篇博客只介绍了数据集和图像增强,关于模型的改进和其它改进点没有涉及。 论文地址:https://arxiv.org/abs/2005.13899 代码地址:https://github.com/tatigabru/kaggle-rsna 比赛地址:https://www.kaggle.com/c/rsna-pneumonia-detection-c

chenzhoujian_的博客 1567

告别GitHub!手把手教你用Gitblit在Windows 10上搭建私人局域网Git服务器(附SourceTree配置)

本文详细介绍了如何在Windows 10环境下使用Gitblit搭建私有Git服务器,实现局域网内高效代码协作。通过轻量级的Gitblit解决方案,开发者可以享受数据完全自主、离线可用性和局域网高速访问等优势。文章包含从环境准备、安装部署到SourceTree配置的全流程指南,特别适合金融、医疗等敏感行业团队使用。

weixin_30430169的博客 281

ubuntu 找不到 syslog.service

文章目录前言一、syslog.service 名字找不到二、探究 前言 关于使用命令 systemctl disable syslog.service 之后, systemctl enable syslog.service 命令失败的问题: root@backvm-virtual-machine:~# systemctl enable syslog.service Failed to execute operation: No such file or directory 一、syslog

weixin_42109053的博客 1504

LLM大模型-vLLM本地部署全流程:Windows WSL2环境安装、HuggingFace与Modelscope模型加载与本地运行、Docker化部署与镜像分发

vLLM本地部署大模型方案 vLLM是一款高性能大模型推理引擎,通过PagedAttention技术显著提升吞吐量和内存效率,支持低成本、高并发的本地部署。 核心优势: 性能卓越:吞吐量远超同类方案,支持连续批处理等高级功能 成本优化:减少GPU服务器需求 兼容性强:提供类OpenAI的简洁API 部署步骤: 硬件准备:需NVIDIA GPU(如A100/3090),显存≥模型参数量×2(7B模型需14GB) 软件环境: Linux系统或Windows WSL2 安装CUDA 12.1+和Python 3.

2202_75674969的博客 4566

Unit sshd.service could not be found

Linux查看ssh服务状态时提示Unit sshd.service could not be found。1、查看ssh、sshd是否都已安装:ps -e|grep ssh2、这里显示未安装sshd,即服务端,安装:sudo apt-get install openssh-server如果ssh客户端也未安装,则安装:sudo apt-get install openssh-client注:如果执行sudo命令提示“xxx 不在 sudoers 文件中。此事将被报告。”,切换为root用户一般能解决,如果

qq_43490217的博客 1万+

大学生数学建模赛题解析及优秀论文-2021电工杯A题高铁牵引供电系统运行数据分析及等值建模(附Python代码)

我国是世界上电气化铁路运营里程最长、服役电力机车型号最多、运营最 繁忙的国家。截至 2020年底,我国铁路年消耗电量约800亿千瓦时,约占三峡 年总发电量的 80%。图1为高速铁路牵引供电系统示意图,主要包括牵引变电所、牵引网和动车 组。牵引变电所将 220kV三相电压转换为满足电力机车运行的27.5kV单相电压, 其核心元件是牵引变压器。牵引网由馈线、接触网、钢轨、回流线等组成,完成 对电力机车的送电任务。...

wenyusuran的专栏 3169

从零开始学习AI人工智能本体论:概念与实战

本文旨在为初学者提供一个全面而易于理解的人工智能本体论入门指南。我们将覆盖从基本概念到实际应用的全过程,帮助读者理解本体论在AI系统中的核心作用。核心概念与联系:介绍本体论的基本概念和原理核心算法与操作步骤:详细讲解本体构建和推理方法项目实战:通过实际案例展示本体论的应用实际应用场景:探讨本体论在不同领域的应用未来发展趋势:展望本体论在AI领域的前景本体论(Ontology): 在AI中,指对特定领域概念及其关系的明确形式化描述。

AI智能探索者的博客 867

rsyslog启动失败分析

# systemctl status rsyslog.service ● rsyslog.service - System Logging Service Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled) Active: failed (Result: signal) since 三 2021-04-21 10:45:22 CST; 15s ago Do...

It's a long road 的专栏 8017

【HALCON工业视觉应用探索】02. C# + Halcon铸件毛刺机器人打磨引导:点云处理从实验室到工业现场的全流程落地

摘要:铸件毛刺的自动化打磨是机械制造领域的重要难题,其随机性(高度0.1-3mm)和复杂工况导致人工打磨效率低(3分钟/件)、工伤率高。本文基于Halcon 24.11与.NET 6,构建了一套点云处理方案:通过线激光扫描仪获取三维点云,经预处理、毛刺检测、路径规划三大模块,引导机器人完成打磨。虚拟实验测试显示,对高度>1mm的毛刺检出率达100%,定位误差±0.08mm,但工业现场受油污、粉尘影响,性能降至检出率68-75%、处理时间>45秒。

专注于人工智能、软件开发、工控自动化、工厂数字化及智能化等领域,希望和大家共同进步! 1128

linux学习lesson21

目录 1 安装软件包的三种方法 2 rpm包介绍 3 rpm工具用法 4 yum工具用法 5 yum搭建本地仓库 1 安装软件包的三种方法 rpm工具 RPM包是预先在Linux机器上编译并打包的文件,安装非常快捷。但它也有一些缺点,比如安装环境必须与编译时的环境一致或者相当,包与包之间存在着相互依赖的情况,卸载包时需要先把依赖的包卸载。如果依赖的包是系统所必需的,就不能卸载这个包,...

InfiniteIdea_Go的博客 442

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

linux学习lesson24

目录 1 管道符作业控制 2 shell变量 3 环境变量配置文件 1 管道符作业控制 "|"作用是将前面命令的输出作为后面命令的输入 [root@worker1 ~]# cat 4.txt | wc -l 28 [root@worker1 ~]# cat 4.txt | grep 'root' root:x:0:0:root:/root:/bin/bash operator:x...

InfiniteIdea_Go的博客 239

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

linux学习lesson31

目录 1 使用w查看系统负载 2 vmstat命令 3 top命令 4 sar命令 5 nload命令 1 使用w查看系统负载 w/uptime 查看系统负载 [root@worker1 ~]# w 15:49:55 up 6:26, 1 user, load average: 0.00, 0.01, 0.05 USER TTY FROM ...

InfiniteIdea_Go的博客 368

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

linux学习 lesson17FTP

ftp 服务 ftp是早期的传送文字文件的服务,到90年网页图片视频开始兴起才开始用httpd。 一、开启ftp服务: 下载ftp 配置好yum源 yum search ftp ##搜索安装包 vs是安全传输,现如今大部分都使用的是vsftpd yum install vsftpd.x86_64 ##安装ftp systemctl start vsftpd ##...

飞翔的罗老汉 163

linux学习lesson41

php

InfiniteIdea_Go的博客 309

RASPBERRY PI LINUX LESSON: From 29th to Final Project

LESSON 29: Using GPIO pins as Inputs and Reading them in Python here we dont have any pull-up resistor. If you are facing some noise, then return to this step. LESS...

weixin_30551963的博客 133

Johannes 《Linux内核模块与设备驱动开发:编写Linux驱动程序》 (14-19)设备树相关

这样内核打开相关驱动文件之后,驱动读取设备树文件dtsi就知道SPI总线用的是40Mhz的时钟晶振,spi 的sclk 20MHZ,中断,读是哪个IO口。总而言之,PCB 软件用画原理图来表明这个设备的情况,设备树是通过语言的方式描叙硬件的状态。具体设备树怎么写一般下载内核后在DOCUMENT下面查找各个内核的设备树,照说明写。这个系列没有说中断,DMA,SPI,UART,IIC等,也没说网络设备和块设备。要自己写驱动,写好设备树之后让自己的驱动读取它来工作,可以看看视频了解。视频里面的代码那些都不放了。

dok12的博客 243

Linux 基础指令与内核思维构建系列(五):从文件查找到系统管理

which、whereis、find、grep、top、rz、sz、zip、tar、file、scp、bc、uname、shutdown,history

2502_91499791的博客 220

新手必须掌握的Linux命令

1. 常用系统命令 1.echo命令 echo命令用于在终端输出字符串或变量提取后的值,格式为“echo [字符串 | $变量]”。 [hadoop@hadoopmaster ~]$ echo $JAVA_HOME /usr/local/jdk [hado...

a2225791的博客 271

Lesson_6 作业_2 ---- 银行账户模拟

一、作业描述   Account.java文件中定义了一个银行帐户类Account,其中包括了帐户名属性accountName、存款余额属性amount、存款方法deposit(doublemoney)。阅读并理解这个类,并为其增加一个“取款”方法withdraw():当存款余额大于取款金额时,执行取款修改余额;当存款余额小于取款金额时,不执行取款;以返回值0表示取款成功,返回值1表示取款...

weixin_30737363的博客 135

《从零入门Linux系统篇(二十二):进程篇·六——环境变量揭秘:从命令行参数到进程环境继承》

本文作为Linux进程篇的重要延伸,将深入探讨程序启动过程中的命令行参数与环境变量机制。文章首先从 main 函数重新认识程序入口,分析argc、argv参数传递方式,理解用户输入如何进入程序内部。随后深入环境变量的概念、组织形式以及底层存储结构,揭示Linux程序运行时依赖的配置来源。在此基础上通过main函数第三参数getenv接口以及environ指针等方式,掌握环境变量的获取方法。最后结合子进程继承机制和实际应用场景,理解环境变量如何影响程序行为,为后续学习进程创建程序替换以及Shell原理打下基础

沫漓的博客 505

Python入门第一课:环境配置、VSCode与turtle绘图完整指南

编程学习的第一步往往不是语法,而是搭建可运行的开发环境。理解解释器与环境变量的关系,是解决Python安装报错的关键。本文将带你从零开始完成Python环境配置,掌握VSCode编辑器的核心操作,并通过turtle标准库实现可视化绘图。无论是计算机基础薄弱的学生、转行数据处理的职场人,还是少儿编程老师,都能从中找到一条清晰可行的学习路径。通过实践项目快速验证代码效果,先跑通最小闭环,再逐步深入数据采集、自动化办公等进阶方向,是高效入门编程的通用方法论。

weixin_34006965的博客 412

5分钟掌握N_m3u8DL-RE:跨平台流媒体下载终极指南

你是否曾经遇到过想要保存在线视频课程却无法下载的困扰?或者想要录制直播内容却找不到合适的工具?N_m3u8DL-RE正是为解决这些痛点而生的跨平台流媒体下载神器。这个免费开源工具能够轻松处理M3U8、DASH、MSS等多种流媒体协议,支持点播和直播视频的完整下载方案。 ## 流媒体下载的三大痛点与解决方案 ### 痛点一:加密视频无法保存 🔒 在线教育平台、付费课程网站常常使用加密技术保护

gitblog_00618的博客 369
上一篇: linux学习lesson35
下一篇: linux学习lesson37
InfiniteIdea_Go
博客等级 码龄8年 3粉丝 77原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值