Apologies for my lack of dev knowledge and general amateur hackiness,
I am running CC v15.05 and trying to get logging to to an external usb drive working. I have spent many hours reading and trying to understand how this works and have managed to come up with the following commands which are set in the browser client (system > startup > local startup) to run at start up:
mount -t ext4 -U <UID> /mnt/usbdrive -o rw
sleep 1
mkdir /mnt/usbdrive/logs/syslog/$(date +"%d.%m.%Y-%H.%M")
sleep 1
logread -f > /mnt/usbdrive/logs/syslog/$(date +"%d.%m.%Y-%H.%M")/logread.txt&
sleep 1
mkdir /mnt/usbdrive/logs/klog/$(date +"%d.%m.%Y-%H.%M")
sleep 1
dmesg > /mnt/usbdrive/logs/klog/$(date +"%d.%m.%Y-%H.%M")/dmesg.txt&
exit 0
I normally power off my unit every night so what I want to do is have openwrt log both logs to a seperate folder which it makes with the days date as the folder name when I power the unit on each day. To my immense surprise this actually works! but alas it only works intermittently at best, sometimes it logs every day for a few days and sometimes it doesnt work for weeks on end. I have tried adjusting the sleeps, taking them out, putting them back in and varying the lengths. But my knowledge is lacking on any thing else i can tinker with and i find myself unable to get this working reliably,
So I would be really grateful if someone could help me with this, any ideas or any help, pointers etc would be very much appreciated.
Cheers,
L