Capture logread just before restart

Hi, I have a modem that keeps restarting. It is remote, but I can ssh to it… running logread - f live does not capture the cause of the restart. So I was wondering if I can someone capture the logread output to a file just before the unit restarts itself… is that possible?

I want to try and capture the reason for the restart…

Do you have the uart console?
Yoi can type “logread -f” to see the latest log.

Does the module reset without network regiatration?
You can stop the telecom stack by at+cfun=0

Hi @jyijyi, thanks for the reply. This is a customer modem that is in the field. The only access I have is by remote ssh (over the cellular network). Because of the latency, I never get the last bit of the log before a restart. The modem is doing a full reset, so it re-registers to the network. This is a FX30s. I don’t think it is doing a full network scan before registering if that is what you mean?

But this is why I’d like to create a mechanism to capture the log up until the restart in the hope it will shed light on why it is restarting. Can I somehow do that?

Thanks,

you can try this: “logread -f > /home/root/log.txt”
The log will be in the flash and you can get it after reboot

Does anything show in “AT!GCDUMP?” ?
(you might need to type at!gcclr before the reset to clear the data)

I just get “ERROR” response for that command when using microcom /dev/ttyAT

probably because my app is registered atclient ?

How about at!gcdump without question mark