Mikrotik Tips
Họ có sẵn 4 kết nối FTTH với 400Mb/s x 4 FTTH, có sẵn thiết lập PCC.
→ Phần mô tả hành vi trước khi cấu hình:
+ Bất kỳ ai lướt web sẽ luôn đạt 20-35Mbps
+ Sau đó lướt Facebook/Youtube 15-20Mbps
+ Và speedtest 20Mbps
+ Nhưng download ISO/File lớn ~8-10Mbps
+ Với cơ chế sau 20 giây tải liên tục → tự giảm.
→ Phần mô tả sang kỹ thuật Burst
burst-time = ?
+ 5s burst quá ngắn,
+ 10s tốt,
+ 15s tốt nhất,
+ 30s user chiếm băng thông, ảnh hưởng người dùng khác.
→ Phần chuyển sang ý tưởng (có thể tùy biến).
Thuộc tính gán Giá trị
limit-at 4M
max-limit 20M
burst-limit 35M
burst-threshold 15M
burst-time 20s
→ Chuyển sang câu lệnh RouterOS
/queue type
add name=pcq-download kind=pcq \
pcq-classifier=dst-address \
pcq-rate=20M \
pcq-burst-rate=35M \
pcq-burst-threshold=15M \
pcq-burst-time=20s
add name=pcq-upload kind=pcq \
pcq-classifier=src-address \
pcq-rate=20M \
pcq-burst-rate=35M \
pcq-burst-threshold=15M \
pcq-burst-time=20s
/queue simple
add name=WIFI-LIMIT \
target=172.16.0.0/16 \
max-limit=1600M/1600M \
queue=pcq-upload/pcq-download
𝐋𝐮̛𝐮 𝐲́ 𝐯𝐚̀ 𝐫𝐚̂́𝐭 𝐭𝐡𝐚̣̂𝐧 𝐭𝐫𝐨̣𝐧𝐠 𝐩𝐡𝐚̉𝐢 𝐧𝐡𝐨̛́:
- Queue phải đặt sau PCC routing mark khi thiết lập cấu hình.
- Các cấu hình này yêu cầu người vận hành phải có năng lực và am hiểu rõ về phân tích lưu lượng trên RouterOS.
DejaDup - Backup Tools for Linux
DejaDup - Backup Tools for Linux
https://apps.gnome.org/DejaDup/
Docker image commit
- Commit Container thành Image: Lệnh này lưu trạng thái container hiện tại thành một Image mới.
# Cú pháp: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
docker commit my_container my_backup_image:v1
- Save Image thành file .tar: Lưu Image vừa tạo ra file.
docker save -o backup_full.tar my_backup_image:v1 - Cách khôi phục (Restore): Sử dụng lệnh load để nạp file tar vào Docker (nó sẽ trở thành một Image).
docker load -i backup_full.tar
- Gán Image Tag nếu không có
sudo docker image ls -a
docker tag <image_id> <name>:latestXCP - Create Local ISO storage
mkdir -p /var/opt/xen/ISO_Store
xe sr-create name-label=LocalISO type=iso device-config:location=/var/opt/xen/ISO_Store device-config:legacy_mode=true content-type=iso
xe sr-scan uuid=UUID
https://umhau.github.io/create-local-ISO-repository-on-xcp-ng/
https://thuanbui.me/category/systems-infrastructure/virtualization/
Git create - delete - clear
Create, Commit, Push to remote:
echo "# Device Configs Linh Trung" > README.md
git add .
git commit -m "Initial commit"
git push -u origin master
Delete multi file:
delete multi file: git rm $(git ls-files --deleted)
Clear version git:
git checkout --orphan temp_branch
git add -A
git commit -am "Purging Old History"
git branch -D master
git branch -m master
OR:
git pull --rebase
git reflog expire --expire=now --all
OR:
git fetch --prune
git prune
git gc
git push -f origin master
Git Add Exam:
Git Add Exam:
echo "# Device Configs Linh Trung" > README.md
git add .
git commit -m "Initial commit"
git push -u origin master
Create Git local:
git init
git add README.md
git add .
git commit -m "first commit"
git remote add origin https://github.com/userName/repoName.git
git push --force origin master echo "# services" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/databom/services.git
git push -u origin main How to solve this problem of "! [rejected] master -> master (fetch first)"
| First Do this ... | |
| git fetch origin master | |
| git merge master | |
| Then, do this ... | |
| git fetch origin master:tmp | |
| git rebase tmp | |
| git push origin HEAD:master | |
| git branch -D tmp | |
| Now everything works well. |
git fetch origin master:tmp
git rebase tmp
git push origin HEAD:master
git branch -D tmpError: Message 'src refspec master does not match any' when pushing commits in Gitgit init
git add .
git commit -m 'message'
git *create remote
git push -u origin master
OR
git checkout -b master
git add .
git commit -m "my commit message"
git push origin master