查看earlyoom停止的程式
1 | sudo journalctl -u earlyoom | grep sending |
參考:
https://github.com/rfjakob/earlyoom
https://zhangjk98.xyz/early-oom-and-oomd-for-out-of-memory/
查看earlyoom停止的程式
1 | sudo journalctl -u earlyoom | grep sending |
參考:
https://github.com/rfjakob/earlyoom
https://zhangjk98.xyz/early-oom-and-oomd-for-out-of-memory/
Windows
1 | route -p add 10.179.101.0 mask 255.255.255.0 10.179.10.254 metric 10 |
Ubuntu
1 | sudo ip route add 10.179.2.0/24 via 10.179.20.254 dev enp75s0f1 |
在現在常見的SSD作業系統碟加上HDD資料碟的配置,下面接介紹如何手動將/home移動到HDD資料碟
1 | lsblk #找出硬碟的名稱 |
1 | sudo mkdir /mnt/tmp |
1 | sudo rsync -avx /home/ /mnt/tmp |
1 | sudo blkid |
sudo nano /etc/fstab # or any other editor
將下面一行寫入/etc/fstab
文件最後面來設定mount點1 | UUID=<noted number from above> /home ext4 defaults 0 2 |
以下指令會刪掉舊的/home。務必先unmount新的home以免刪錯
1 | sudo umount /home # unmount the new home first! |
參考:
https://askubuntu.com/a/50539
https://www.tecmint.com/convert-home-directory-partition-linux/
1 | # 顯示目前狀態 |
1 | Local time: 三 2023-04-26 11:00:22 CST |
啟動網路校時
輸入下面指令後,就會打開網路校時功能
1 | # 啟用 NTP 校時 |
Ubuntu使用的是systemd-timesyncd
,因此等一下要設定systemd-timesyncd
檢查systemd-timesyncd
服務狀態
1 | # 檢查 systemd-timesyncd 服務狀態 |
1 | ● systemd-timesyncd.service - Network Time Synchronization |
/etc/systemd/timesyncd.conf
1 | [Time] |
重新啟動systemd-timesyncd
服務
重啟服務讓更改生效
1 | # 重新啟動 systemd-timesyncd 服務 |
檢查一下是不是有跟NTP校時了
用指令systemctl status systemd-timesyncd
看一下目前服務狀態,如果有更新成功會顯示出來
/etc/systemd/timesyncd.conf
並加入RootDistanceMaxSec=
,通常30秒已經很夠用了1 | See timesyncd.conf(5) for details. |
1 | systemctl status systemd-timesyncd.service |
1 | ps -e | grep ntp |
1 | ps -e | grep chrony |
https://chrony-project.org/doc/4.6.1/chronyc.html
詳細說明如下
https://unix.stackexchange.com/a/655489
參考:
https://www.cnblogs.com/pipci/p/12833228.html
https://officeguide.cc/ubuntu-linux-timedatectl-time-synchronization-tutorial/
https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-ubuntu-20-04
https://www.tenable.com/audits/items/CIS_Ubuntu_18.04_LTS_Server_v2.1.0_L1.audit:26286d27c59292cfdb9c7b04593edbed
https://serverfault.com/questions/1024770/ubuntu-20-04-time-sync-problems-and-possibly-incorrect-status-information