摘要: #!/bin/bash ssh root@192.168.1.99 "find /mnt/yfnbk/test/JenkinsDailyPack/ -type d -mtime +6 | xargs rm -rf" today=$(date +%F)sub_dir=test/JenkinsDaily 阅读全文
posted @ 2025-05-15 14:23 joechenyao 阅读(7) 评论(0) 推荐(0)
摘要: 【windows】C:\Program Files\Zabbix Agent\zabbix_agentd.conf # 被动模式(多个服务器用逗号分隔)Server=192.168.1.161,192.168.2.55 修改保存后,重启服务【Zabbix Agent】 【linux】vi /etc/ 阅读全文
posted @ 2025-05-15 14:10 joechenyao 阅读(48) 评论(0) 推荐(0)
摘要: # windowsfor host in 15 18 20do ip=192.168.1.$host echo -e "\n check link to $ip (windows) " ping -c 3 $ipdone # pvefor host in 11 12do ip=192.168.1.$ 阅读全文
posted @ 2025-05-15 14:08 joechenyao 阅读(14) 评论(0) 推荐(0)
摘要: <!DOCTYPE html><html><head><meta charset="utf-8"><title>时钟</title></head><body><p>页面显示时间</p><p id="time"></p><button onclick="stopTiming()">停止计时</butt 阅读全文
posted @ 2025-05-08 20:45 joechenyao 阅读(8) 评论(0) 推荐(0)
摘要: #!/bin/bashyum install -y curl policycoreutils-python openssh-server perlsystemctl enable sshdsystemctl start sshdfirewall-cmd --permanent --add-servi 阅读全文
posted @ 2022-10-15 00:06 joechenyao 阅读(31) 评论(0) 推荐(0)
摘要: #cat /etc/yum.repos.d/CentOS-Base.repo [base]name=CentOS-$releasever - Base - mirrors.aliyun.comfailovermethod=prioritybaseurl=https://mirrors.aliyun. 阅读全文
posted @ 2022-10-14 23:39 joechenyao 阅读(149) 评论(0) 推荐(0)
摘要: export GITLAB_HOME=/srv/gitlab sudo docker run --detach \ --hostname gitlab.example.com \ --publish 443:443 --publish 80:80 --publish 2222:22 \ --name 阅读全文
posted @ 2022-10-14 21:41 joechenyao 阅读(199) 评论(0) 推荐(0)
摘要: #!/bin/bash #docker_ce_version='-20.10.10-3.el7' yum install -y yum-utils #rm -rf /etc/yum.repos.d/*bakdir=`date +%F`mkdir -p /etc/yum.repos.d/$bakdir 阅读全文
posted @ 2022-10-14 21:27 joechenyao 阅读(64) 评论(2) 推荐(0)
摘要: 使用python编写一个监控脚本,放在Linux系统运行。监控要求如下:1.显示当前时间2.脚本运行之后监控10s,每隔一秒钟输出一次信息3.显示当前系统CPU逻辑核数、平均使用率4.显示总内存大小(单位G),内存使用率5.显示根目录大小(单位G),根目录使用率6.本机IP地址是多少,网络使用情况, 阅读全文
posted @ 2022-08-14 21:47 joechenyao 阅读(421) 评论(0) 推荐(1)
摘要: 1、列举当前目录以及所有子目录下的文件,并打印出绝对路径 #!/usr/bin/env python3 import os for root,dirs,files in os.walk(os.getcwd()): for name in files: print(os.path.join(root, 阅读全文
posted @ 2022-08-12 22:58 joechenyao 阅读(196) 评论(0) 推荐(0)