Closed5
ロボット用NUCのディスク圧迫

df-hコマンドでいつのまにか要領をとても圧迫していることが発覚
seek@seek:~/seek$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.1G 2.5M 3.1G 1% /run
/dev/nvme0n1p2 457G 408G 26G 95% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
efivarfs 192K 125K 63K 67% /sys/firmware/efi/efivars
/dev/nvme0n1p1 1.1G 6.1M 1.1G 1% /boot/efi
tmpfs 3.1G 112K 3.1G 1% /run/user/1000

seek@seek:~/seek$ sudo du -ah / 2>/dev/null | sort -rh | head -n 20
415G /
366G /var
361G /var/log
360G /var/log/uvcdynctrl-udev.log
30G /home/seek
30G /home
9.4G /home/seek/.cache
8.5G /usr
7.9G /home/seek/.ros/log
7.9G /home/seek/.ros
7.6G /snap
6.8G /home/seek/.local/lib/python3.10/site-packages
6.8G /home/seek/.local/lib/python3.10
6.8G /home/seek/.local/lib
6.8G /home/seek/.local
6.7G /home/seek/.cache/pip/http
6.7G /home/seek/.cache/pip
6.2G /usr/lib
5.0G /var/lib
4.6G /var/lib/snapd
/var/log/uvcdynctrl-udev.logがとんでもない要領を食べてる

seek@seek:~/seek$ sudo tail -n 100 /var/log/uvcdynctrl-udev.log
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00980001, name = 'User Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00980001, name = 'User Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00980001, name = 'User Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00980001, name = 'User Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0001, name = 'Camera Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0001, name = 'Camera Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0001, name = 'Camera Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0001, name = 'Camera Controls'
checking dir: /usr/share/uvcdynctrl/data
Could not find 8086 entry
checking dir: /usr/share/uvcdynctrl/data
Could not find 8086 entry
==============================================================================
==============================================================================
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00980001, name = 'User Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00980001, name = 'User Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0001, name = 'Camera Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0001, name = 'Camera Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00980001, name = 'User Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00980001, name = 'User Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0001, name = 'Camera Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0001, name = 'Camera Controls'
checking dir: /usr/share/uvcdynctrl/data
Could not find 32e4 entry
==============================================================================
checking dir: /usr/share/uvcdynctrl/data
Could not find 32e4 entry
==============================================================================
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00980001, name = 'User Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00980001, name = 'User Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0001, name = 'Camera Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0001, name = 'Camera Controls'
checking dir: /usr/share/uvcdynctrl/data
Could not find 32e4 entry
==============================================================================
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00980001, name = 'User Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00980001, name = 'User Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0001, name = 'Camera Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0001, name = 'Camera Controls'
checking dir: /usr/share/uvcdynctrl/data
Could not find 8086 entry
==============================================================================
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Warning: The driver behind device video12 has a slightly buggy implementation
of the V4L2_CTRL_FLAG_NEXT_CTRL flag. It does not return the next higher
control ID if a control query fails. A workaround has been enabled.
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00980001, name = 'User Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00980001, name = 'User Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x00980001, name = 'User Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x00980001, name = 'User Controls'
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0001, name = 'Camera Controls', type = 6
[libwebcam] Invalid V4L2 control type encountered: ctrl_id = 0x009A0001, name = 'Camera Controls', type = 6
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0001, name = 'Camera Controls'
[libwebcam] Invalid or unsupported V4L2 control encountered: ctrl_id = 0x009A0001, name = 'Camera Controls'
checking dir: /usr/share/uvcdynctrl/data
Could not find 8086 entry
checking dir: /usr/share/uvcdynctrl/data
Could not find 1419 entry
==============================================================================
特に意味のないカメラドライバのエラーログが延々に記述されていた

対策
sudo rm /var/log/uvcdynctrl-udev.log

これで要領がめっちゃ空いた
seek@seek:~/seek$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.1G 2.5M 3.1G 1% /run
/dev/nvme0n1p2 457G 40G 394G 10% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
efivarfs 192K 125K 63K 67% /sys/firmware/efi/efivars
/dev/nvme0n1p1 1.1G 6.1M 1.1G 1% /boot/efi
tmpfs 3.1G 112K 3.1G 1% /run/user/1000
このスクラップは3日前にクローズされました