自动化运维-检测Linux服务器CPU、内存、负载、IO读写、机房带宽和服务器类型等信息脚本

前言:以上脚本为今年8月1号发布的,当时是没有任何问题,但现在脚本里网络速度测试py文件获取不了了,测速这块功能目前无法实现,后面我会抽时间来研究,大家如果有建议也可以分享下。在这里插入图片描述

脚本内容:

#!/usr/bin/env bash
#
#
#
#RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
SKYBLUE='\033[0;36m'
PLAIN='\033[0m'about() {echo ""echo " ========================================================= "echo " \                 Superbench.sh  Script                 / "echo " \       Basic system info, I/O test and speedtest       / "echo " \                   v1.1.7 (7 Apr 2024)                 / "echo " \                   Created by Oldking                  / "echo " ========================================================= "echo ""echo " Intro: https://www.oldking.net/350.html"echo " Copyright (C) 2024 Oldking oooldking@gmail.com"echo ""
}cancel() {echo ""next;echo " Abort ..."echo " Cleanup ..."cleanup;echo " Done"exit
}trap cancel SIGINTbenchinit() {if [ -f /etc/redhat-release ]; thenrelease="centos"elif cat /etc/issue | grep -Eqi "debian"; thenrelease="debian"elif cat /etc/issue | grep -Eqi "ubuntu"; thenrelease="ubuntu"elif cat /etc/issue | grep -Eqi "centos|red hat|redhat"; thenrelease="centos"elif cat /proc/version | grep -Eqi "debian"; thenrelease="debian"elif cat /proc/version | grep -Eqi "ubuntu"; thenrelease="ubuntu"elif cat /proc/version | grep -Eqi "centos|red hat|redhat"; thenrelease="centos"fi[[ $EUID -ne 0 ]] && echo -e "${RED}Error:${PLAIN} This script must be run as root!" && exit 1if  [ ! -e '/usr/bin/python' ]; thenecho " Installing Python ..."if [ "${release}" == "centos" ]; thenyum update > /dev/null 2>&1yum -y install python > /dev/null 2>&1elseapt-get update > /dev/null 2>&1apt-get -y install python > /dev/null 2>&1fifiif  [ ! -e '/usr/bin/curl' ]; thenecho " Installing Curl ..."if [ "${release}" == "centos" ]; thenyum update > /dev/null 2>&1yum -y install curl > /dev/null 2>&1elseapt-get update > /dev/null 2>&1apt-get -y install curl > /dev/null 2>&1fifiif  [ ! -e '/usr/bin/wget' ]; thenecho " Installing Wget ..."if [ "${release}" == "centos" ]; thenyum update > /dev/null 2>&1yum -y install wget > /dev/null 2>&1elseapt-get update > /dev/null 2>&1apt-get -y install wget > /dev/null 2>&1fifiif  [ ! -e './speedtest-cli/speedtest' ]; thenecho " Installing Speedtest-cli ..."wget --no-check-certificate -qO speedtest.tgz https://cdn.jsdelivr.net/gh/oooldking/script@1.1.7/speedtest_cli/ookla-speedtest-1.0.0-$(uname -m)-linux.tgz > /dev/null 2>&1fimkdir -p speedtest-cli && tar zxvf speedtest.tgz -C ./speedtest-cli/ > /dev/null 2>&1 && chmod a+rx ./speedtest-cli/speedtestif  [ ! -e 'tools.py' ]; thenecho " Installing tools.py ..."wget --no-check-certificate https://cdn.jsdelivr.net/gh/oooldking/script@1.1.7/tools.py > /dev/null 2>&1fichmod a+rx tools.pyif  [ ! -e 'fast_com.py' ]; thenecho " Installing Fast.com-cli ..."wget --no-check-certificate https://cdn.jsdelivr.net/gh/sanderjo/fast.com@master/fast_com.py > /dev/null 2>&1wget --no-check-certificate https://cdn.jsdelivr.net/gh/sanderjo/fast.com@master/fast_com_example_usage.py > /dev/null 2>&1fichmod a+rx fast_com.pychmod a+rx fast_com_example_usage.pysleep 5start=$(date +%s) 
}get_opsy() {[ -f /etc/redhat-release ] && awk '{print ($1,$3~/^[0-9]/?$3:$4)}' /etc/redhat-release && return[ -f /etc/os-release ] && awk -F'[= "]' '/PRETTY_NAME/{print $3,$4,$5}' /etc/os-release && return[ -f /etc/lsb-release ] && awk -F'[="]+' '/DESCRIPTION/{print $2}' /etc/lsb-release && return
}next() {printf "%-70s\n" "-" | sed 's/\s/-/g' | tee -a $log
}speed_test(){if [[ $1 == '' ]]; thenspeedtest-cli/speedtest -p no --accept-license > $speedLog 2>&1is_upload=$(cat $speedLog | grep 'Upload')result_speed=$(cat $speedLog | awk -F ' ' '/Result/{print $3}')if [[ ${is_upload} ]]; thenlocal REDownload=$(cat $speedLog | awk -F ' ' '/Download/{print $3}')local reupload=$(cat $speedLog | awk -F ' ' '/Upload/{print $3}')local relatency=$(cat $speedLog | awk -F ' ' '/Latency/{print $2}')temp=$(echo "$relatency" | awk -F '.' '{print $1}')if [[ ${temp} -gt 50 ]]; thenrelatency="(*)"${relatency}filocal nodeName=$2temp=$(echo "${REDownload}" | awk -F ' ' '{print $1}')if [[ $(awk -v num1=${temp} -v num2=0 'BEGIN{print(num1>num2)?"1":"0"}') -eq 1 ]]; thenprintf "${YELLOW}%-18s${GREEN}%-18s${RED}%-20s${SKYBLUE}%-12s${PLAIN}\n" " ${nodeName}" "${reupload} Mbit/s" "${REDownload} Mbit/s" "${relatency} ms" | tee -a $logfielselocal cerror="ERROR"fielsespeedtest-cli/speedtest -p no -s $1 --accept-license > $speedLog 2>&1is_upload=$(cat $speedLog | grep 'Upload')if [[ ${is_upload} ]]; thenlocal REDownload=$(cat $speedLog | awk -F ' ' '/Download/{print $3}')local reupload=$(cat $speedLog | awk -F ' ' '/Upload/{print $3}')local relatency=$(cat $speedLog | awk -F ' ' '/Latency/{print $2}')local nodeName=$2temp=$(echo "${REDownload}" | awk -F ' ' '{print $1}')if [[ $(awk -v num1=${temp} -v num2=0 'BEGIN{print(num1>num2)?"1":"0"}') -eq 1 ]]; thenprintf "${YELLOW}%-18s${GREEN}%-18s${RED}%-20s${SKYBLUE}%-12s${PLAIN}\n" " ${nodeName}" "${reupload} Mbit/s" "${REDownload} Mbit/s" "${relatency} ms" | tee -a $logfielselocal cerror="ERROR"fifi
}print_speedtest() {printf "%-18s%-18s%-20s%-12s\n" " Node Name" "Upload Speed" "Download Speed" "Latency" | tee -a $logspeed_test '' 'Speedtest.net'speed_fast_comspeed_test '27377' 'Beijing 5G   CT'speed_test '26352' 'Nanjing 5G   CT'speed_test '17145' 'Hefei 5G     CT'speed_test '27594' 'Guangzhou 5G CT'speed_test '27154' 'TianJin 5G   CU'speed_test '24447' 'Shanghai 5G  CU'speed_test '26678' 'Guangzhou 5G CU'speed_test '17184' 'Tianjin 5G   CM'speed_test '26850' 'Wuxi 5G      CM'speed_test '27249' 'Nanjing 5G   CM'speed_test '26404' 'Hefei 5G     CM'speed_test '28491' 'Changsha 5G  CM'rm -rf speedtest*
}print_speedtest_fast() {printf "%-18s%-18s%-20s%-12s\n" " Node Name" "Upload Speed" "Download Speed" "Latency" | tee -a $logspeed_test '' 'Speedtest.net'speed_fast_comspeed_test '27377' 'Beijing 5G   CT'speed_test '24447' 'ShangHai 5G  CU'speed_test '27249' 'Nanjing 5G   CM'rm -rf speedtest*
}speed_fast_com() {temp=$(python fast_com_example_usage.py 2>&1)is_down=$(echo "$temp" | grep 'Result') if [[ ${is_down} ]]; thentemp1=$(echo "$temp" | awk -F ':' '/Result/{print $2}')temp2=$(echo "$temp1" | awk -F ' ' '/Mbps/{print $1}')local REDownload="$temp2 Mbit/s"local reupload="0.00 Mbit/s"local relatency="-"local nodeName="Fast.com"printf "${YELLOW}%-18s${GREEN}%-18s${RED}%-20s${SKYBLUE}%-12s${PLAIN}\n" " ${nodeName}" "${reupload}" "${REDownload}" "${relatency}" | tee -a $logelselocal cerror="ERROR"firm -rf fast_com_example_usage.pyrm -rf fast_com.py}io_test() {(LANG=C dd if=/dev/zero of=test_file_$$ bs=512K count=$1 conv=fdatasync && rm -f test_file_$$ ) 2>&1 | awk -F, '{io=$NF} END { print io}' | sed 's/^[ \t]*//;s/[ \t]*$//'
}calc_disk() {local total_size=0local array=$@for size in ${array[@]}do[ "${size}" == "0" ] && size_t=0 || size_t=`echo ${size:0:${#size}-1}`[ "`echo ${size:(-1)}`" == "K" ] && size=0[ "`echo ${size:(-1)}`" == "M" ] && size=$( awk 'BEGIN{printf "%.1f", '$size_t' / 1024}' )[ "`echo ${size:(-1)}`" == "T" ] && size=$( awk 'BEGIN{printf "%.1f", '$size_t' * 1024}' )[ "`echo ${size:(-1)}`" == "G" ] && size=${size_t}total_size=$( awk 'BEGIN{printf "%.1f", '$total_size' + '$size'}' )doneecho ${total_size}
}power_time() {result=$(smartctl -a $(result=$(cat /proc/mounts) && echo $(echo "$result" | awk '/data=ordered/{print $1}') | awk '{print $1}') 2>&1) && power_time=$(echo "$result" | awk '/Power_On/{print $10}') && echo "$power_time"
}install_smart() {if  [ ! -e '/usr/sbin/smartctl' ]; thenecho "Installing Smartctl ..."if [ "${release}" == "centos" ]; thenyum update > /dev/null 2>&1yum -y install smartmontools > /dev/null 2>&1elseapt-get update > /dev/null 2>&1apt-get -y install smartmontools > /dev/null 2>&1fi      fi
}ip_info4(){ip_date=$(curl -4 -s http://api.ip.la/en?json)echo $ip_date > ip_json.jsonisp=$(python tools.py geoip isp)as_tmp=$(python tools.py geoip as)asn=$(echo $as_tmp | awk -F ' ' '{print $1}')org=$(python tools.py geoip org)if [ -z "ip_date" ]; thenecho $ip_dateecho "hala"country=$(python tools.py ipip country_name)city=$(python tools.py ipip city)countryCode=$(python tools.py ipip country_code)region=$(python tools.py ipip province)elsecountry=$(python tools.py geoip country)city=$(python tools.py geoip city)countryCode=$(python tools.py geoip countryCode)region=$(python tools.py geoip regionName)	fiif [ -z "$city" ]; thencity=${region}fiecho -e " ASN & ISP            : ${SKYBLUE}$asn, $isp${PLAIN}" | tee -a $logecho -e " Organization         : ${YELLOW}$org${PLAIN}" | tee -a $logecho -e " Location             : ${SKYBLUE}$city, ${YELLOW}$country / $countryCode${PLAIN}" | tee -a $logecho -e " Region               : ${SKYBLUE}$region${PLAIN}" | tee -a $logrm -rf tools.pyrm -rf ip_json.json
}virt_check(){if hash ifconfig 2>/dev/null; theneth=$(ifconfig)fivirtualx=$(dmesg) 2>/dev/nullif  [ $(which dmidecode) ]; thensys_manu=$(dmidecode -s system-manufacturer) 2>/dev/nullsys_product=$(dmidecode -s system-product-name) 2>/dev/nullsys_ver=$(dmidecode -s system-version) 2>/dev/nullelsesys_manu=""sys_product=""sys_ver=""fiif grep docker /proc/1/cgroup -qa; thenvirtual="Docker"elif grep lxc /proc/1/cgroup -qa; thenvirtual="Lxc"elif grep -qa container=lxc /proc/1/environ; thenvirtual="Lxc"elif [[ -f /proc/user_beancounters ]]; thenvirtual="OpenVZ"elif [[ "$virtualx" == *kvm-clock* ]]; thenvirtual="KVM"elif [[ "$cname" == *KVM* ]]; thenvirtual="KVM"elif [[ "$cname" == *QEMU* ]]; thenvirtual="KVM"elif [[ "$virtualx" == *"VMware Virtual Platform"* ]]; thenvirtual="VMware"elif [[ "$virtualx" == *"Parallels Software International"* ]]; thenvirtual="Parallels"elif [[ "$virtualx" == *VirtualBox* ]]; thenvirtual="VirtualBox"elif [[ -e /proc/xen ]]; thenvirtual="Xen"elif [[ "$sys_manu" == *"Microsoft Corporation"* ]]; thenif [[ "$sys_product" == *"Virtual Machine"* ]]; thenif [[ "$sys_ver" == *"7.0"* || "$sys_ver" == *"Hyper-V" ]]; thenvirtual="Hyper-V"elsevirtual="Microsoft Virtual Machine"fifielsevirtual="Dedicated"fi
}power_time_check(){echo -ne " Power time of disk   : "install_smartptime=$(power_time)echo -e "${SKYBLUE}$ptime Hours${PLAIN}"
}freedisk() {freespace=$( df -m . | awk 'NR==2 {print $4}' )if [[ $freespace == "" ]]; then$freespace=$( df -m . | awk 'NR==3 {print $3}' )fiif [[ $freespace -gt 1024 ]]; thenprintf "%s" $((1024*2))elif [[ $freespace -gt 512 ]]; thenprintf "%s" $((512*2))elif [[ $freespace -gt 256 ]]; thenprintf "%s" $((256*2))elif [[ $freespace -gt 128 ]]; thenprintf "%s" $((128*2))elseprintf "1"fi
}print_io() {if [[ $1 == "fast" ]]; thenwritemb=$((128*2))elsewritemb=$(freedisk)fiwritemb_size="$(( writemb / 2 ))MB"if [[ $writemb_size == "1024MB" ]]; thenwritemb_size="1.0GB"fiif [[ $writemb != "1" ]]; thenecho -n " I/O Speed( $writemb_size )   : " | tee -a $logio1=$( io_test $writemb )echo -e "${YELLOW}$io1${PLAIN}" | tee -a $logecho -n " I/O Speed( $writemb_size )   : " | tee -a $logio2=$( io_test $writemb )echo -e "${YELLOW}$io2${PLAIN}" | tee -a $logecho -n " I/O Speed( $writemb_size )   : " | tee -a $logio3=$( io_test $writemb )echo -e "${YELLOW}$io3${PLAIN}" | tee -a $logioraw1=$( echo $io1 | awk 'NR==1 {print $1}' )[ "`echo $io1 | awk 'NR==1 {print $2}'`" == "GB/s" ] && ioraw1=$( awk 'BEGIN{print '$ioraw1' * 1024}' )ioraw2=$( echo $io2 | awk 'NR==1 {print $1}' )[ "`echo $io2 | awk 'NR==1 {print $2}'`" == "GB/s" ] && ioraw2=$( awk 'BEGIN{print '$ioraw2' * 1024}' )ioraw3=$( echo $io3 | awk 'NR==1 {print $1}' )[ "`echo $io3 | awk 'NR==1 {print $2}'`" == "GB/s" ] && ioraw3=$( awk 'BEGIN{print '$ioraw3' * 1024}' )ioall=$( awk 'BEGIN{print '$ioraw1' + '$ioraw2' + '$ioraw3'}' )ioavg=$( awk 'BEGIN{printf "%.1f", '$ioall' / 3}' )echo -e " Average I/O Speed    : ${YELLOW}$ioavg MB/s${PLAIN}" | tee -a $logelseecho -e " ${RED}Not enough space!${PLAIN}"fi
}print_system_info() {echo -e " CPU Model            : ${SKYBLUE}$cname${PLAIN}" | tee -a $logecho -e " CPU Cores            : ${YELLOW}$cores Cores ${SKYBLUE}$freq MHz $arch${PLAIN}" | tee -a $logecho -e " CPU Cache            : ${SKYBLUE}$corescache ${PLAIN}" | tee -a $logecho -e " OS                   : ${SKYBLUE}$opsy ($lbit Bit) ${YELLOW}$virtual${PLAIN}" | tee -a $logecho -e " Kernel               : ${SKYBLUE}$kern${PLAIN}" | tee -a $logecho -e " Total Space          : ${SKYBLUE}$disk_used_size GB / ${YELLOW}$disk_total_size GB ${PLAIN}" | tee -a $logecho -e " Total RAM            : ${SKYBLUE}$uram MB / ${YELLOW}$tram MB ${SKYBLUE}($bram MB Buff)${PLAIN}" | tee -a $logecho -e " Total SWAP           : ${SKYBLUE}$uswap MB / $swap MB${PLAIN}" | tee -a $logecho -e " Uptime               : ${SKYBLUE}$up${PLAIN}" | tee -a $logecho -e " Load Average         : ${SKYBLUE}$load${PLAIN}" | tee -a $logecho -e " TCP CC               : ${YELLOW}$tcpctrl${PLAIN}" | tee -a $log
}print_end_time() {end=$(date +%s) time=$(( $end - $start ))if [[ $time -gt 60 ]]; thenmin=$(expr $time / 60)sec=$(expr $time % 60)echo -ne " Finished in  : ${min} min ${sec} sec" | tee -a $logelseecho -ne " Finished in  : ${time} sec" | tee -a $logfiprintf '\n' | tee -a $logbj_time=$(curl -s http://cgi.im.qq.com/cgi-bin/cgi_svrtime)if [[ $(echo $bj_time | grep "html") ]]; thenbj_time=$(date -u +%Y-%m-%d" "%H:%M:%S -d '+8 hours')fiecho " Timestamp    : $bj_time GMT+8" | tee -a $logecho " Results      : $log"
}get_system_info() {cname=$( awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//' )cores=$( awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo )freq=$( awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//' )corescache=$( awk -F: '/cache size/ {cache=$2} END {print cache}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//' )tram=$( free -m | awk '/Mem/ {print $2}' )uram=$( free -m | awk '/Mem/ {print $3}' )bram=$( free -m | awk '/Mem/ {print $6}' )swap=$( free -m | awk '/Swap/ {print $2}' )uswap=$( free -m | awk '/Swap/ {print $3}' )up=$( awk '{a=$1/86400;b=($1%86400)/3600;c=($1%3600)/60} {printf("%d days %d hour %d min\n",a,b,c)}' /proc/uptime )load=$( w | head -1 | awk -F'load average:' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//' )opsy=$( get_opsy )arch=$( uname -m )lbit=$( getconf LONG_BIT )kern=$( uname -r )disk_size1=$( LANG=C df -hPl | grep -wvE '\-|none|tmpfs|overlay|shm|udev|devtmpfs|by-uuid|chroot|Filesystem' | awk '{print $2}' )disk_size2=$( LANG=C df -hPl | grep -wvE '\-|none|tmpfs|overlay|shm|udev|devtmpfs|by-uuid|chroot|Filesystem' | awk '{print $3}' )disk_total_size=$( calc_disk ${disk_size1[@]} )disk_used_size=$( calc_disk ${disk_size2[@]} )tcpctrl=$( sysctl net.ipv4.tcp_congestion_control | awk -F ' ' '{print $3}' )virt_check
}print_intro() {printf ' Superbench.sh -- https://www.oldking.net/350.html\n' | tee -a $logprintf " Mode  : \e${GREEN}%s\e${PLAIN}    Version : \e${GREEN}%s${PLAIN}\n" $mode_name 1.1.7 | tee -a $logprintf ' Usage : wget -qO- sb.oldking.net | bash\n' | tee -a $log
}sharetest() {echo " Share result:" | tee -a $logecho " · $result_speed" | tee -a $loglog_preuploadcase $1 in'ubuntu')share_link="https://paste.ubuntu.com"$( curl -v --data-urlencode "content@$log_up" -d "poster=superbench.sh" -d "syntax=text" "https://paste.ubuntu.com" 2>&1 | \grep "Location" | awk '{print $3}' );;'haste' )share_link=$( curl -X POST -s -d "$(cat $log)" https://hastebin.com/documents | awk -F '"' '{print "https://hastebin.com/"$4}' );;'clbin' )share_link=$( curl -sF 'clbin=<-' https://clbin.com < $log );;'ptpb' )share_link=$( curl -sF c=@- https://ptpb.pw/?u=1 < $log );;esacecho " · $share_link" | tee -a $lognextecho ""rm -f $log_up}log_preupload() {log_up="$HOME/superbench_upload.log"true > $log_up$(cat superbench.log 2>&1 | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" > $log_up)
}cleanup() {rm -f test_file_*rm -rf speedtest*rm -f fast_com*rm -f tools.pyrm -f ip_json.json
}bench_all(){mode_name="Standard"about;benchinit;clearnext;print_intro;next;get_system_info;print_system_info;ip_info4;next;print_io;next;print_speedtest;next;print_end_time;next;cleanup;sharetest ubuntu;
}fast_bench(){mode_name="Fast"about;benchinit;clearnext;print_intro;next;get_system_info;print_system_info;ip_info4;next;print_io fast;next;print_speedtest_fast;next;print_end_time;next;cleanup;
}log="./superbench.log"
true > $log
speedLog="./speedtest.log"
true > $speedLogcase $1 in'info'|'-i'|'--i'|'-info'|'--info' )about;sleep 3;next;get_system_info;print_system_info;next;;'version'|'-v'|'--v'|'-version'|'--version')next;about;next;;'io'|'-io'|'--io'|'-drivespeed'|'--drivespeed' )next;print_io;next;;'speed'|'-speed'|'--speed'|'-speedtest'|'--speedtest'|'-speedcheck'|'--speedcheck' )about;benchinit;next;print_speedtest;next;cleanup;;'ip'|'-ip'|'--ip'|'geoip'|'-geoip'|'--geoip' )about;benchinit;next;ip_info4;next;cleanup;;'bench'|'-a'|'--a'|'-all'|'--all'|'-bench'|'--bench' )bench_all;;'about'|'-about'|'--about' )about;;'fast'|'-f'|'--f'|'-fast'|'--fast' )fast_bench;;'share'|'-s'|'--s'|'-share'|'--share' )bench_all;is_share="share"if [[ $2 == "" ]]; thensharetest ubuntu;elsesharetest $2;fi;;'debug'|'-d'|'--d'|'-debug'|'--debug' )get_ip_whois_org_name;;
*)bench_all;;
esacif [[  ! $is_share == "share" ]]; thencase $2 in'share'|'-s'|'--s'|'-share'|'--share' )if [[ $3 == '' ]]; thensharetest ubuntu;elsesharetest $3;fi;;esac
fi

脚本执行结果:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/61239.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

网络安全:我们的安全防线

在数字化时代&#xff0c;网络安全已成为国家安全、经济发展和社会稳定的重要组成部分。网络安全不仅仅是技术问题&#xff0c;更是一个涉及政治、经济、文化、社会等多个层面的综合性问题。从宏观到微观&#xff0c;网络安全的重要性不言而喻。 宏观层面&#xff1a;国家安全与…

通威传媒:移动AI数字人OLED透明屏应用案例

在科技与创新不断交融的今天&#xff0c;尼伽OLED品牌与通威传媒携手合作&#xff0c;共同推出了移动AI数字人OLED透明屏显示设备。这款设备不仅融合了尼伽OLED品牌的卓越显示技术与通威传媒的深厚积累&#xff0c;更在定点介绍、手动讲解模式、中控控制以及数字人联动等方面实…

Proteus 8.17的详细安装教程

通过百度网盘分享的文件&#xff1a;Proteus8.17(64bit&#xff09;.zip 链接&#xff1a;https://pan.baidu.com/s/1zu8ts1Idhgg9DGUHpAve7Q 提取码&#xff1a;8q8v 1.右击【Proteus8.17(64bit&#xff09;.zip】&#xff0c;选择【全部解压缩......】。 &#xff0c; 2.…

人工智能:塑造未来的工作与生活

目录 人工智能技术的应用前景与影响 人工智能的历史与现状 人工智能的应用领域 人工智能的前景与挑战 个人视角&#xff1a;人工智能的应用前景与未来 人工智能在生活中的潜力 面对人工智能带来的挑战 我的观点与建议 结语 人工智能技术的应用前景与影响 随着人工智能…

VSCode自定义插件创建教程

文章目录 一、前言二、插件维护三、调试插件四、使用 vsce 生成 vsix 插件五、问题&#xff1a;打开调试窗口后&#xff0c;输入helloworld并没有指令提示六、插件创建实战七、拓展阅读 一、前言 对于前端程序猿来讲&#xff0c;最常用的开发利器中VSCode首当其冲&#xff0c;…

vue功能基础元素使用

4.:inline"true"元素&#xff0c;能够左右元素保持在同一行 这个好处非常直观&#xff0c;但要注意和el-col同时使用时&#xff0c;就会出现el-input换行&#xff0c;即便调整好&#xff0c;放大缩小也会出现换行问题。 5.filterable 下拉框带搜索功能 6.clearable下…

uniapp 购物弹窗组件 (微信小程序)

效果图&#xff0c;暂时只适应单规格&#xff0c;居中弹出和下方弹出&#xff0c;如需求不满足&#xff0c;请自行修改代码 &#xff08;更新于24/11/15) 居中显示效果 下方弹出效果 html <template><view class"" v-if"show":class"mod…

单片机学习笔记 5. 数码管静态显示

更多单片机学习笔记&#xff1a;单片机学习笔记 1. 点亮一个LED灯单片机学习笔记 2. LED灯闪烁单片机学习笔记 3. LED灯流水灯单片机学习笔记 4. 蜂鸣器滴~滴~滴~ 目录 0、实现的功能 1、Keil工程 1-1 数码管显示原理 1-2 静态与动态显示 1-3 74HC573锁存器的工作原理 1-…

内容占位符:Kinetic Loader HTML+CSS 使用CSS制作三角形原理

内容占位符 前言 随着我们对HTML和CSS3的学习逐渐深入&#xff0c;相信大家都已经掌握了网页制作的基础知识&#xff0c;包括如何使用HTML标记构建网页结构&#xff0c;以及如何运用CSS样式美化页面。为了进一步巩固和熟练这些技能&#xff0c;今天我们一起来完成一个有趣且实…

【YOLOv8】安卓端部署-1-项目介绍

【YOLOv8】安卓端部署-1-项目介绍 1 什么是YOLOv81.1 YOLOv8 的主要特性1.2 YOLOv8分割模型1.2.1 YOLACT实例分割算法之计算掩码1.2.1.1 YOLACT 的掩码原型与最终的掩码的关系1.2.1.2 插值时的目标检测中提取的物体特征1.2.1.3 coefficients&#xff08;系数&#xff09;作用1.…

Hadoop 学习心得

一、引言 &#xff08;一&#xff09;学习 Hadoop 的背景和目的 随着信息技术的飞速发展&#xff0c;数据量呈爆炸式增长&#xff0c;传统的数据处理方式已难以满足需求。在这样的背景下&#xff0c;为了能够在大数据领域有所发展&#xff0c;我开始学习 Hadoop。Hadoop 作为处…

【全面解读】Apache SeaTunnel常见问题全攻略

使用SeaTunnel需要安装Spark或者Flink这样的引擎么&#xff1f; 不需要&#xff0c;SeaTunnel 支持 Zeta、Spark 和 Flink 作为同步引擎的选择&#xff0c;您可以选择之一就行&#xff0c;社区尤其推荐使用 Zeta 这种专为同步场景打造的新一代超高性能同步引擎。Zeta 被社区用…

STM32完全学习——系统时钟设置

一、时钟框图的解读 首先我们知道STM32在上电初始化之后使用的是内部的HSI未经过分频直接通过SW供给给系统时钟&#xff0c;由于内部HSI存在较大的误差&#xff0c;因此我们在系统完成上电初始化&#xff0c;之后需要将STM32的时钟切换到外部HSE作为系统时钟&#xff0c;那么我…

分布式系统稳定性建设-性能优化篇

分布式系统稳定性建设-性能优化篇 系统稳定性建设是系统工程的核心内容之一。以下是一些重要的方面: 架构设计: 采用模块化、松耦合的架构设计,以提高系统的可扩展性和可维护性。合理划分系统功能模块,降低单个模块的复杂度。定义清晰的接口和数据交换标准,确保各模块之间协调…

网络学习第四篇

引言&#xff1a; 我们在第三篇的时候出现了错误&#xff0c;我们要就行排错&#xff0c;那么我们要知道一下怎么配置静态路由实现ping通&#xff0c;这样子我们才知道下一跳到底是什么&#xff0c;为什么这样子做。 实验目的 理解和掌握静态路由的基本概念和配置方法。 实…

[控制理论]—位置式PID与增量式PID

位置式PID与增量式PID 1.位置式PID 按模拟PID控制算法&#xff0c;以一系列的采样时刻点kT代表连续时间t&#xff0c;以矩形法数值积分近似代替积分&#xff0c;以一阶后向差分近似代替微分&#xff0c;即&#xff1a; t ≈ k T &#xff08; k 0 , 1 , 2... &#xff09; …

【c++丨STL】list的使用

&#x1f31f;&#x1f31f;作者主页&#xff1a;ephemerals__ &#x1f31f;&#x1f31f;所属专栏&#xff1a;C、STL 目录 前言 list简介 一、list的默认成员函数 构造函数(constructor) 析构函数 赋值重载 二、list的迭代器接口 迭代器的功能分类 三、list的容量…

Unity 编辑器下 Android 平台 Addressable 加载模型粉红色,类似材质丢失

Unity 编辑器下 Android 平台 Addressable 加载模型粉红色&#xff0c;类似材质丢失 Addressable Play Mode Script加载模式 选择 Use Existiing Build 1.Unity 切换到 PC 平台&#xff0c;执行 Addressable Build 运行&#xff0c;加载 bundle 内的预制体 显示正常 2.Unit…

单片机学习笔记 6. 数码管动态显示

更多单片机学习笔记&#xff1a;单片机学习笔记 1. 点亮一个LED灯单片机学习笔记 2. LED灯闪烁单片机学习笔记 3. LED灯流水灯单片机学习笔记 4. 蜂鸣器滴~滴~滴~单片机学习笔记 5. 数码管静态显示 目录 0、实现的功能 1、Keil工程 1-1 数码管动态显示 1-2 数组的定义与引用…

车企如何实现安全图纸外发管理

车企面临着日益增长的数据交换需求&#xff0c;尤其是设计图纸等敏感数据的外发管理。如何确保这些数据在传输过程中的安全性和效率&#xff0c;是车企急需解决的问题。我们将从几个关键性的因素上来分析一下怎么实现安全图纸外发管理。 统一管理与授权 采用专业的文件交换系统…