上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 69 下一页

2024年4月4日

tcp gso和gro

摘要: 开关 查看是否开启gsoethtool -k ens33 | grep generic-segmentation-offload 查看是否开启groethtool -k ens33 | grep generic-receive-offload 作用 mss含义是,最大分段大小,即tcp data字节 阅读全文

posted @ 2024-04-04 09:14 王景迁 阅读(378) 评论(0) 推荐(0)

2024年4月2日

expect scp传输文件

摘要: set user "root" set password "root" set host "192.168.0.112" set timeout 10 spawn scp a $user@$host:/root expect { "*(yes/no)?" { send "yes\r" exp_con 阅读全文

posted @ 2024-04-02 22:43 王景迁 阅读(35) 评论(0) 推荐(0)

expect远程登录节点执行命令

摘要: set user "root" set password "root" set host "192.168.0.112" set timeout 10 spawn ssh $user@$host expect { "*(yes/no)?" { send "yes\r" exp_continue } 阅读全文

posted @ 2024-04-02 22:07 王景迁 阅读(46) 评论(0) 推荐(0)

2024年4月1日

ip头dscp字段

摘要: 字段 ip头dscp字段,一般值是0,占用6位bit,表示服务质量。dscp+cu构成tos服务类型。 参考资料 https://www.rfc-editor.org/rfc/rfc2474 阅读全文

posted @ 2024-04-01 21:56 王景迁 阅读(213) 评论(0) 推荐(0)

2024年3月31日

增量式修改报文校验和

摘要: 计算方法 HC:旧检验和HC':新检验和m:16位修改前值m':16位修改后值 RFC1624修改某个16位域校验和 HC' = HC - ~m - m' 测试验证 #include <stdio.h> #define data_len 26 unsigned short get_checksum( 阅读全文

posted @ 2024-03-31 14:48 王景迁 阅读(174) 评论(0) 推荐(0)

2024年3月29日

prometheus类型

摘要: Counter:只增。 # 查找过去1分钟增长量 sum(increase(prometheus_http_request_count{}[1m])) Gauge:可增可减。 # 查找瞬时值 sum(prometheus_http_request_gauge{}) Histograms:样本落在桶中 阅读全文

posted @ 2024-03-29 19:58 王景迁 阅读(38) 评论(0) 推荐(0)

prometheus自定义注册表

摘要: // 在自定义注册表中只有需要的变量,没有默认的Go运行时指标和prometheus指标 registry := prometheus.NewRegistry() test:= prometheus.NewCounter(prometheus.CounterOpts{ Name: "test", H 阅读全文

posted @ 2024-03-29 19:44 王景迁 阅读(37) 评论(0) 推荐(0)

2024年3月28日

go实现LRU

摘要: package main import "fmt" type LRUCache struct { length int cap int cache map[interface{}]*DoubleLinkNode head *DoubleLinkNode tail *DoubleLinkNode } 阅读全文

posted @ 2024-03-28 21:06 王景迁 阅读(24) 评论(0) 推荐(0)

prometheus增加和删除labels

摘要: 在Prometheus中,一个metric可以有多个label,label由key和value组成。 import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prom 阅读全文

posted @ 2024-03-28 20:04 王景迁 阅读(399) 评论(0) 推荐(0)

2024年3月26日

k8s secret

摘要: k8s secret默认类型是Opaque,所有类型secret value都是base64转码值。 创建secret 把用户名和密码base64转码存入echo -n "abc" | base64 apiVersion: v1 kind: Secret metadata: name: test t 阅读全文

posted @ 2024-03-26 09:17 王景迁 阅读(54) 评论(0) 推荐(0)

上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 69 下一页

导航