![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux运维
文章平均质量分 61
linux运维涉及的一下脚本整理
进化吧皮卡丘
今天进步了么
展开
-
ssh到其他机器执行命令
#!/bin/bash #svrNum=(echo95,1..36,97..100)svrNum=(echo {95,{1..36},{97..100}}) svrNum=(echo95,1..36,97..100)svrNum=(echo {9…50}) for i in svrNum;dosshxx.xxx.xxx.svrNum; do ssh xx.xxx.xxx.svrNum;dosshxx.xxx.xxx.i exec /bin/bash -s <<‘EOF’ #杀进程 kill -9原创 2022-02-15 16:05:43 · 740 阅读 · 0 评论 -
linux机器上创建一个对外访问用户
创建一个用户和密码给其他系统访问,只能访问特定路径下文件原创 2022-02-15 15:53:54 · 479 阅读 · 0 评论 -
linux运维-拉起cpu的python脚本
#!/usr/bin/python3 -- coding: utf-8 -- --说明:使用python版本默认为系统自带的python2根据目标cpu使用率跑满一定比例的cpu,比如主机cpu核数24核,目标使用率50%,则跑满12核cpu。-- import multiprocessing import time import os import sys def highcpu(): i = 1 while True: i += 1 i -= 1 def add_process(func): p = m原创 2022-02-15 15:21:23 · 1033 阅读 · 0 评论