diff --git a/README.md b/README.md index cf66e18..32a7023 100644 --- a/README.md +++ b/README.md @@ -1 +1,43 @@ -#MyNote \ No newline at end of file +![image-20210117034809780](https://public.veypi.com/img/screenshot/20210117034809.png) + + + + + + + +![image-20210117035636815](https://public.veypi.com/img/screenshot/20210117035636.png) + + + + + +![image-20210117040727886](https://public.veypi.com/img/screenshot/20210117040727.png) + + + +![image-20210117042146956](https://public.veypi.com/img/screenshot/20210117042146.png) + + + +![image-20210117043700038](https://public.veypi.com/img/screenshot/20210117043700.png) + + + + + + + + + +![image-20210117043750115](https://public.veypi.com/img/screenshot/20210117043750.png) + + + + + + + + + +![image-20210117045857685](https://public.veypi.com/img/screenshot/20210117045857.png) \ No newline at end of file diff --git a/linux/caddy.md b/linux/caddy.md new file mode 100644 index 0000000..fb08e79 --- /dev/null +++ b/linux/caddy.md @@ -0,0 +1,16 @@ +# caddy + +## caddyfile + +```bash +*.nps.veypi.com:80 { + reverse_proxy 127.0.0.1:800 + # or + file_server [] [browse] { + root / + hide + index + browse [] + } +} +``` diff --git a/linux/net.sh b/linux/net.sh index 0e85901..17fc0cc 100755 --- a/linux/net.sh +++ b/linux/net.sh @@ -6,29 +6,20 @@ # Distributed under terms of the MIT license. # - +#!/bin/sh LANG="" while true do - up_time1=`ifconfig $1 | grep "bytes" | awk '{print $6}'` - down_time1=`ifconfig $1 | grep "bytes" | awk '{print $2}'` - + up_time1=`ifconfig $1 | grep "TX packets" | awk '{print $5}'` + down_time1=`ifconfig $1 | grep "RX packets" | awk '{print $5}'` sleep 1 clear - - up_time2=`ifconfig $1 | grep "bytes" | awk '{print $6}'` - down_time2=`ifconfig $1 | grep "bytes" | awk '{print $2}'` - - up_time1=${up_time1} - up_time2=${up_time2} - down_time1=${down_time1} - down_time2=${down_time2} - + up_time2=`ifconfig $1 | grep "TX packets" | awk '{print $5}'` + down_time2=`ifconfig $1 | grep "RX packets" | awk '{print $5}'` up_time=`expr $up_time2 - $up_time1` down_time=`expr $down_time2 - $down_time1` up_time=`expr $up_time / 1024` down_time=`expr $down_time / 1024` - - echo 上传速度: $up_time kb/s - echo 下载速度: $down_time kb/s + echo 上传速度: $up_time KB/s + echo 下载速度: $down_time KB/s done diff --git a/linux/pack_sys.md b/linux/pack_sys.md new file mode 100644 index 0000000..a186d94 --- /dev/null +++ b/linux/pack_sys.md @@ -0,0 +1,20 @@ +# 打包系统 + +https://blog.csdn.net/zanj0525/article/details/79129375 +https://github.com/chamuco/respin + + +```bash +sudo add-apt-repository ppa:sergiomejia666/respin +sudo apt-get install respin +sudo respin backup +``` + + +2 + +https://www.cnblogs.com/jikexianfeng/p/6103504.html + +```bash + +``` diff --git a/linux/rip b/linux/rip index 22ccc66..8c3f721 100755 --- a/linux/rip +++ b/linux/rip @@ -9,26 +9,26 @@ from_port=$3 to=$4 to_port=$5 -if ! [ -e "$1" ]; then +if ! [ -n "$1" ]; then echo "iptable chan not found" >&1 exit 1 fi -if ! [ -e "$2" ]; then +if ! [ -n "$2" ]; then echo "from host not found" >&1 exit 1 fi -if ! [ -e "$3" ]; then +if ! [ -n "$3" ]; then echo "from port not found" >&1 exit 1 fi -if ! [ -e "$4" ]; then +if ! [ -n "$4" ]; then echo "destination host not found" >&1 exit 1 fi -if ! [ -e "$5" ]; then +if ! [ -n "$5" ]; then echo "destination port not found" >&1 exit 1 fi diff --git a/openstack/passthrough.md b/openstack/passthrough.md index 372dd2f..5cf16d2 100644 --- a/openstack/passthrough.md +++ b/openstack/passthrough.md @@ -2,7 +2,18 @@ ### https://blog.csdn.net/u012336567/article/details/74743168 +https://pve.proxmox.com/wiki/Pci_passthrough + +https://www.server-world.info/en/note?os=CentOS_7&p=kvm&f=10 + +https://blog.51cto.com/sery/2161368?cid=716548 + +https://mathiashueber.com/windows-virtual-machine-gpu-passthrough-ubuntu/ + ``` bash + +# 使用lspci -nn列出所有PCI设备和他们的地址,记录下GPU ids为 [10de:11c6] & [10de:0e0b] + 10de:1c03,10de:10f1 1002:67df,1002:aaf0 @@ -44,7 +55,9 @@ nano /etc/modprobe.d/vfio.conf options vfio-pci ids=10de:1c03,10de:10f1 sudo nano /etc/initramfs-tools/modules +sudo vim /etc/modules +# 添加如下 vfio vfio_iommu_type1 vfio_pci @@ -58,4 +71,13 @@ nano /etc/libvirt/qemu.conf nvram = ["/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd"] find /sys/kernel/iommu_groups/ -type l -``` \ No newline at end of file + +dmesg | grep vfio-pci.ids +dmesg | grep IOMMU +sudo lsmod | grep vfio + +# https://blog.csdn.net/hbuxiaofei/article/details/106566348 +grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg +grub2-mkconfig -o /boot/grub2/grub.cfg + +``` diff --git a/openstack/passthrough.xml b/openstack/passthrough.xml new file mode 100644 index 0000000..a68f682 --- /dev/null +++ b/openstack/passthrough.xml @@ -0,0 +1,184 @@ + + win10 + c9387dc7-a3dc-40bc-a041-91844d1fcc06 + 8290304 + 8290304 + 5 + + /machine + + + hvm + + + + + + + + + + + + + + + + + Broadwell-noTSX-IBRS + + + + + + + + + + + + + + + destroy + restart + destroy + + + + + + /usr/bin/kvm-spice + + + + + + +
+ + + + + + + + +
+ + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + +
+ +