如果硬碟沒有分割區,可以用以下指令擴大硬碟區域:
https://unix.stackexchange.com/questions/643026/how-to-resize-a-disk-without-partition
1 | resize2fs /dev/[DISK_ID][PARTITION_NUMBER] |
https://tech.sars.tw/posts/gcp-linux-enlarge-disk-size/
https://www.tecmint.com/parted-command-create-linux-partitions/
https://godleon.github.io/blog/Linux/Linux-extend-lvm-from-unused-space/
LVM說明
https://linux.vbird.org/linux_basic_train/centos8/unit14.php
打開ssh登錄日誌
1 | nano /etc/ssh/sshd_config |
因為 growpart 是用來擴展分割區(partition)的,但從你的 lsblk 輸出來看:
1 | sdb 8:16 0 1T 0 disk /home |
sdb 是整顆磁碟直接掛載到 /home,底下沒有任何分割區(沒有 sdb1 之類的)。所以 growpart 在這裡不適用。
如果你的目的是擴展 /home 的檔案系統(例如雲端供應商幫你把 sdb 從小容量擴大到 1T),你應該直接對整顆磁碟做 resize2fs(假設是 ext4):
1 | # 先確認檔案系統類型 |
這樣就能讓檔案系統擴展到磁碟的完整大小。
如果硬碟沒有分割區,可以用以下指令擴大硬碟區域:
https://unix.stackexchange.com/questions/643026/how-to-resize-a-disk-without-partition
首先查看系統是否已經辨識到新空間
1 | fdisk -l /dev/<device> |
1 | resize2fs /dev/[DISK_ID][PARTITION_NUMBER] |
https://tech.sars.tw/posts/gcp-linux-enlarge-disk-size/
https://www.tecmint.com/parted-command-create-linux-partitions/
https://godleon.github.io/blog/Linux/Linux-extend-lvm-from-unused-space/
LVM說明
https://linux.vbird.org/linux_basic_train/centos8/unit14.php
可以用symble link的方式,將服務檔放到/etc/systemd/system/目錄下,讓systemd管理服務。
更改service檔後,需執行以下指令,讓systemd重新載入設定檔:
1 | sudo systemctl daemon-reload |
移除服務:
1 | systemctl stop [servicename] |
查看服務整的log
1 | journalctl -u appname |
必須要載入libnvinfer_plugin,可以用python的trt.init_libnvinfer_plugins載入,
1 | TRT_LOGGER = trt.Logger(trt.Logger.ERROR) |
PLUGIN_CREATORS = trt.get_plugin_registry().plugin_creator_list
for plugin_creator in PLUGIN_CREATORS:
print(plugin_creator.name)
參考並修改:https://developer.nvidia.com/zh-cn/blog/tensorrt-custom-layer-cn/
inference範例參考:
https://leimao.github.io/blog/TensorRT-Python-Inference/
(float[5])v_anchors
查看大小為5的float array
參考:
https://github.com/microsoft/vscode-cpptools/issues/688#issuecomment-299262784
列印位址
1 | //變數c的位址 |
https://stackoverflow.com/questions/43861731/gdb-print-the-value-of-memory-address
列印位址的內容
1 | (gdb) p *(struct node *) 0x00000000004004fc |
https://stackoverflow.com/questions/43861731/gdb-print-the-value-of-memory-address
segmentation fault 除錯