Disk space monitoring while data logging

While using NVIDIA Jetson TX2 on an UAV, storage space running out fast during data logging. I have a ground control station that is connected to TX2 via Data Link. During flying, I need to monitor available disk space in the ground station and give an alarm/warning if it reaches a threshold limit. From this topic Setting threshold for "Low memory warning" , I know we can configure threshold limit in TX2. Is it possible to send disk space information to ground station and monitor it in ground station’s HMI ?

One possible solution is to use tcp and send data through network. You can check online document and develop the use-case through gstreamer.

@DaneLLL Thank you for your reply. Which data/api that contains information about available disk space should be sent through the network?

Executing $ df -a can get status of disks. Maybe you can put the command in
system(3) - Linux manual page

If you only have eMMC or SD card without multiple disks, then I’d use:
df -H /
(you could script this to repeat once every 10 seconds, and parse out the percent remaining; then send the df -H / results if and only if remaining disk drops below some percentage)

Note that if you don’t name a particular location, then it will give you disk usage even on pseudo filesystems which are really just in RAM and not part of the disk).

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.