临时占用cpu计算资源

#!/bin/bash function while_test() { while ((1)); do i=2; done } function run_cpu() { for ((i=0; i<$1; i++)); do while_test & done } run_cpu $1 启动脚本,后面的数字代表核心 start.sh 1  

Linux部署阿里云解析ddns

yum install -y bind-dig curl openssl-util   修改main函数,在里面调用describe_record,如: main() { describe_record #update_record } 然后执行这个脚本。如果没问题的话,就能获取到域名的所有解析记录的列表了: {\"PageNumber\":1,\"TotalCount\":1,\"PageSiz

Linux自动化部署OPS

通过脚本实现OPS #!/bin/bash source /etc/profile ws=/opt/source/shopai cd /opt/source/shopai git pull mvn clean package -Dmaven.test.skip=true echo \"scp jar\" cd $ws/perass-api/target jar=$(ls perass-api-*.ja

Linux运行java程序,程序守护

每分钟执行一次 */1 * * * * /opt/bin/spider_start.sh > /dev/null 执行脚本: 判断: 如果已经有名为“perass-spider”的程序在运行,则不执行 如果没有正在运行的程序,则在“/opt/deploy”目录下找到最新修改的jar包,运行 #!/bin/bash source /etc/profile PIDS=`ps -ef | grep