This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 获取总内存大小 | |
total_mem=$(free -m | awk 'NR==2{print $2}') | |
# 获取buff/cache大小 | |
buff_cache=$(free -m | awk 'NR==2{print $6}') | |
# 计算buff/cache占总内存的百分比 | |
usage_percentage=$((buff_cache * 100 / total_mem)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
#************************************************** | |
# Author: AGou-ops * | |
# E-mail: [email protected] * | |
# Date: 2023-08-30 * | |
# Description: * | |
# Copyright 2023 by AGou-ops.All Rights Reserved * | |
#************************************************** | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
#************************************************** | |
# Author: AGou-ops * | |
# E-mail: [email protected] * | |
# Date: 2023-07-17 * | |
# Description: * | |
# Copyright 2023 by AGou-ops.All Rights Reserved * | |
#************************************************** | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pages | |
on: | |
push: | |
branches: | |
- main # default branch | |
jobs: | |
pages: | |
runs-on: ubuntu-latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- hexo \\ hexo init test | |
#!/usr/bin/bash | |
hexo g | |
cd public | |
git init | |
git add -A | |
git commit -m "rebuilding site $(date)" | |
git remote add origin [email protected]:xxx | |
git push --set-upstream origin main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "All - by: AGou-ops.cn", | |
"rules": [ | |
{ | |
"description": "Change left_shift to command+spacebar if pressed alone for all app", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
链接两个独立的系统或者软件,即使他们有着不同的接口,但是通过中间件都仍能实现信息交换. | |
常见的中间件有:Tomcat/JBoss(web服务器)/Kfaka/Redis/influxdb/zookeeper/RabbitMQ | |
lvs的三种工作模式,dr直接路由模式,tun隧道模式,nat模式 | |
- nat: 客户端发送数据包到lvs负载均衡器,在负载均衡器上将数据包的目的ip换为后端rs的ip,rs接受数据包并作出相应将返回的数据包发送给负载均衡器,负载均衡器将SIP替换成自己的ip,最后将响应的数据包发送给客户端 | |
优点是:集群中的物理服务器可以使用任何支持TCP/IP操作系统,只有负载均衡器需要一个合法的IP地址。 | |
缺点:扩展性有限。当服务器节点(普通PC服务器)增长过多时,负载均衡器将成为整个系统的瓶颈。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# | |
#************************************************** | |
# Author: AGou-ops * | |
# E-mail: [email protected] * | |
# Date: 2021-12-02 * | |
# Description: * | |
# Copyright 2021 by AGou-ops.All Rights Reserved * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
#************************************************** | |
# Author: AGou-ops * | |
# E-mail: [email protected] * | |
# Date: 2021-08-10 * | |
# Description: Re-sort picture file * | |
# Copyright 2021 by AGou-ops.All Rights Reserved * | |
#************************************************** | |
set -euo pipefail |