Default services/process constantly writing/using usb/exroot

im using an old OpenWrt router on the latest firmware 23.05.05 at the moment, as a client

id like it to perform at its maximum potential by disabling startup services that are not required

all im using is
luci
ssh
firewall
wireguard
transmission
samba4

just to put things in perspective, on the raspberry pi running raspbianOS
when i stopped the following

sudo systemctl disable wpa_supplicant
sudo systemctl disable bluetooth
sudo systemctl disable triggerhappy
sudo systemctl disable avahi-daemon
sudo systemctl disable modemmanager
sudo systemctl disable cups
sudo systemctl disable alsa-state
sudo systemctl disable dhcpcd
sudo systemctl disable man-db.timer
sudo systemctl disable man-db.service
sudo systemctl disable nmbd

it just performed better with less heat on the attached usb pendrive

on OpenWrt, the exroot pendrive is running hot, i would initially like to disable
the equivalent of

sudo systemctl disable nmbd

which is responsible to broadcast the service for samba4

i dont require things like that as ill connect to the samba share via the static ip ive set on the for OpenWrt client on the OpenWrt router its connected to

thanks

What is your router doing on your network?

Ssh and luci take up next to zero resources.
Firewall is required in most cases.
Wg only consumes power/resources when in active use.
Transmission and samba - are you using those?

1 Like

its a client, connected to a main router (which is also on OpenWrt firmware) i use it to download from 12am to 6am, ive written a script and added it to crontab to disable samba4 at 12am (/etc/init.d/samba4 stop) while transmission is running and start it again at 6am (/etc/init.d/samba4 start) while everything on transmission is paused
this way, samba4 and transmission can play well together

the router this OpenWrt Client is connected to blocks internet to it based on a time based rule i.e. from 6am to 12am, so wireguard is not actively connected to the internet for the most part

so yup,

but i cannot understand why the usb pendrive attached is running so hot, i have a raspberry pi, on raspbianOS doing the same tasks at the moment and the usb pendrive attached to it stopped overheating when i turned off services as in the OP

i dont need wireless on the OpenWrt client as well,

thanks

I assume you used extroot to get samba installed ?

1 Like

yup, same pendrive has exroot and samba4 on it
made a directory /overlay/share for both samba4 and transmission to use

Edit:

i removed the USB plastic cover for both the pendrives connected to the OpenWrt client and the pi client, because of the pendrives heating up, after the changes made to the pi mentioned in the OP the pendrive connected to the pi has stopped heating up, im hoping to achieve the same for the OpenWrt client so that i can stop using the pi client altogether

top gives

Mem: 45632K used, 11612K free, 3544K shrd, 2276K buff, 20208K cached
CPU:   0% usr   0% sys   0% nic  99% idle   0% io   0% irq   0% sirq
Load average: 0.00 0.00 0.00 1/72 3266
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
 3266  3258 root     R     1388   2%   0% top
 3031  2617 pi       SN    9812  17%   0% /usr/bin/transmission-daemon -f -g /overlay/share/transmission
 3257  1067 root     S     1292   2%   0% /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p 22 -K 300 -T 3 -W 262144 -2 9
   91     2 root     IW       0   0%   0% [kworker/0:3-wg-]
 2709     1 root     S    33192  58%   0% /usr/sbin/smbd -F
 3030  2709 root     S    31792  55%   0% {smbd-cleanupd} /usr/sbin/smbd -F
 3029  2709 root     S    31788  55%   0% {smbd-notifyd} /usr/sbin/smbd -F
 2710     1 root     S    22984  40%   0% /usr/sbin/nmbd -F
 1176  1171 network  S     4320   8%   0% /usr/sbin/hostapd -s -g /var/run/hostapd/global
 1175  1172 network  S     4300   7%   0% /usr/sbin/wpa_supplicant -n -s -g /var/run/wpa_supplicant/global
  849     1 root     S     3832   7%   0% /sbin/rpcd -s /var/run/ubus/ubus.sock -t 30
 2617     1 root     SN    2908   5%   0% {transmission} /sbin/ujail -t 5 -n transmission -S /etc/seccomp/transmission-daemon.json -U p
 2202     1 root     S     2908   5%   0% {ntpd} /sbin/ujail -t 5 -n ntpd -U ntp -G ntp -C /etc/capabilities/ntpd.json -c -u -r /bin/ub
 1002     1 root     S     2908   5%   0% {dnsmasq} /sbin/ujail -t 5 -n dnsmasq -u -l -r /bin/ubus -r /etc/TZ -r /etc/dnsmasq.conf -r /
 1172     1 root     S     2908   5%   0% {wpa_supplicant} /sbin/ujail -t 5 -n wpa_supplicant -U network -G network -C /etc/capabilitie
 1171     1 root     S     2908   5%   0% {hostapd} /sbin/ujail -t 5 -n hostapd -U network -G network -C /etc/capabilities/wpad.json -c
 1514     1 nobody   S     2256   4%   0% avahi-daemon: running [OpenWrt.local]
 1238     1 root     S     2100   4%   0% /sbin/netifd
 1413     1 root     S     2000   3%   0% /usr/sbin/uhttpd -f -h /www -r OpenWrt -x /cgi-bin -u /ubus -t 60 -T 30 -k 20 -A 1 -n 3 -N 10
    1     0 root     S     1972   3%   0% /sbin/procd
 1462     1 root     S     1900   3%   0% /usr/bin/dbus-daemon --system --nofork
 1030  1002 dnsmasq  S     1728   3%   0% /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf.cfg01411c -k -x /var/run/dnsmasq/dnsmasq.cfg01411c
  442     1 ubus     S     1500   3%   0% /sbin/ubusd

how can i disable
/usr/sbin/nmbd
/usr/sbin/wpa_supplicant
and what others could you suggest i can safely disable

thanks

Edit:
based on this post Samba: how to disable nmbd? - #3 by nozombian managed to disable nmdb by commenting out

nano /etc/init.d/samba4
#               if [ "$DISABLE_NETBIOS" -ne 1 ] && [ -x /usr/sbin/nmbd ]; then
#                       procd_open_instance
#                       procd_set_param command /usr/sbin/nmbd -F
#                       procd_set_param nice "$nice_value"
#                       procd_set_param respawn
#                       procd_set_param file /etc/samba/smb.conf
#                       procd_close_instance
#               fi

and rebooting

Do we talk about the small usb3 nano flashdrives or the normal big one that get hot in your picture?

Because all nano or equivalent small flash drives I have ever used on any computer get really hot. Which is not that surprising since the nano size have pretty much no physical thermal solution whatever.

But flash drives operational temp are more a question of specific manufacturer and model to model if they always get “hot” or run “cold” no matter which computer or hub they are connected to.

(And is the nano flash drive getting hotter or colder than the whole router since the usb metal case and connector becomes a expended part of the passive cooling of the router pcb when you connect any cable or flashdrive in it).

1 Like

That usually indicates that your pendrive is EOL, especially when using it with transmission. Does transmission write to the pendrive? because that's a big "no-no" in my book, your better of with an ssd

My first advice, backup your data and buy a new pen-drive or better ssd-drive.

My second advice, run custom firmware using the firmware-selector. I'm sure with you disabling almost everything, you could remove those packages from the build.

What could this guy safely remove from his build?

1 Like

good point man, ive been trying a bunch of permutation combination of pendrives/thumbdrives, i could not put all of them in the picture

my point of reference is the pi on raspianOS and the OpenWrt client, trying to achieve the same result

thats the big question really

raspbianOS on the pi is running transmission and all the same as the OpenWrt client
transmission is not running when the thumbdrive is getting hot or any pendrive is getting hot, that is attached to the OpenWrt client

thanks

Edit:
in a nutshell
im not comparing raspbianOS to OpenWrt
im not looking at one type of pendrive/thumbdrive
im using same type of thumbdrives/pendrives while testing on both the pi and the OpenWrt router

ive already omitted odhcp6c odhcpd-ipv6only ppp ppp-mod-pppoe from firmware-selector while i made a custom build,

in addition to the posts above of disabling nmdb
i just disabled dnsmasq
based on advice from AI (https://search.brave.com/search?q=when+running+openwrt+router+as+a+ethernet+client+which+services+can++be+disabled&summary=1&conversation=e03472ce7c07d4e7336da9&reload_with_fallback_captcha=b3266f40c4cf22d9680f19542c5b4d7d)

by running
/etc/init.d/dnsmasq disable

what else can go?

thanks

Edit1:
i.e. what else can go from
base-files busybox ca-bundle dropbear firewall4 fstools kmod-gpio-button-hotplug kmod-leds-gpio kmod-mt7603 kmod-nft-offload libc libgcc libustream-mbedtls logd mtd netifd nftables opkg procd procd-seccomp procd-ujail swconfig uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport luci

what all ive disabled so far, with no joy, usb thumb still running hot



That's because its EOL (usbdrive). Replace it, you'll be happy. But you could check with lsof how much open files there are.

Not enough to integrate luci-app-samba4 I'm afraid (its 8+MB in size), but you could integrate everything else:

nfs-kernel-server
kmod-usb2
kmod-usb-ohci
kmod-usb-ledtrig-usbport
luci
luci-proto-wireguard

I would dive into NFS, its less CPU intensive and has a smaller footprint. (source)

In a closed network (where you know every device), NFS is a fine choice. With a good network, throughput it disgustingly fast and at the same time less CPU intensive on the server. It's very simple to set up and you can toggle readonly on shares you don't need to be writeable.

my device no matter how much i slim down packages will require exroot.

i am interested in identifying the services that are constantly using the usb (exroot)

the usb device is not the problem,

if i temporarily disable transmission and samba4 on startup, there is still a service/process constantly accessing the exroot/usb causing it to run hot

thanks

Update:

I've stopped trying to find a solution to this problem because ive hit a brick wall

Even with a basic flash of firmware, without extroot, without installing any additional packages, i.e. just a clean flash of latest OpenWrt firmware,
if i plug in a usb device (pendrive or thunbdrive) it instantly starts running hot, even if there is no usb usage

so, there seems to be an issue with the device or power supply, on using raspberry pi power supply for the OpenWrt router (which is more than sufficient) the usb drive still runs hot, just when its plugged in.

so, there's something else going on, when any usb device is plugged in

any thoughts?

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