查詢硬碟空間
1 | du -sh ./* |
有時候硬碟空間可能因為資料夾沒有mount,所以雖然占用硬碟空間但是du無法顯示出來,可以使用下面的指令來查看:
1 | shopt -s dotglob && sudo mount / /mnt -o bind && du -sh /mnt/* && umount /mnt |
查詢硬碟空間
1 | du -sh ./* |
有時候硬碟空間可能因為資料夾沒有mount,所以雖然占用硬碟空間但是du無法顯示出來,可以使用下面的指令來查看:
1 | shopt -s dotglob && sudo mount / /mnt -o bind && du -sh /mnt/* && umount /mnt |
linker設定rpath的選項範例如下
1 | gcc -Wl,-rpath=/opt/nvidia/deepstream/deepstream-6.4/lib test.cpp |
RPATH有一個特殊識別符號$ORIGIN,表示執行檔的所在目錄
1 | gcc -Wl,-rpath='$ORIGIN/../lib' test.cpp |
查看函式庫的rpath
1 | readelf -d libnvds_rest_server.so |head -20 |
或是
1 | objdump -x libnvds_rest_server.so |grep 'R.*PATH' |
CMake使用兩個變數來控制RPATH:INSTALL_RPATH和BUILD_RPATH,install步驟的rpath是INSTALL_RPATH
1 | SET_TARGET_PROPERTIES(nvds_rest_server |
cmake的另一個設定RPATH的方法
https://discourse.cmake.org/t/library-rpath-resolution/887/7
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH “${ORIGIN}”)
1 | // 發送EOS訊號讓filesink可以正常結束 |
https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html#gst_element_get_state
https://gstreamer-devel.narkive.com/g1omJFAj/gst-devel-graceful-exit-shutdown-of-a-pipeline#post3
https://stackoverflow.com/questions/38170733/gstreamer-not-flushing-to-the-filesink
https://gitlab.freedesktop.org/freedesktop/snippets/-/snippets/1760
https://gist.github.com/CaptainOnly/f88cbb6ac5fdeae80200fbb3f7be695c
如果硬碟沒有分割區,可以用以下指令擴大硬碟區域:
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 |
如果硬碟沒有分割區,可以用以下指令擴大硬碟區域:
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
可以用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/