lerner
Posts: 509
Joined: Sun Mar 29, 2015 12:12 am

Help with log files and seeing what is/was going on.

Wed Jul 03, 2019 11:05 pm

I thought the problem of the random RPZ(w) was behind me.

Alas it seems to have started happening again.

Could someone help me to identify which log files I need to look at to determine the cause?

I know of the /var/log/system and /var/log/messages but are there any others which could/may help me find out what is going on?

User avatar
neilgl
Posts: 1623
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Help with log files and seeing what is/was going on.

Thu Jul 04, 2019 7:57 pm

Can you tell us what the problem is?

lerner
Posts: 509
Joined: Sun Mar 29, 2015 12:12 am

Re: Help with log files and seeing what is/was going on.

Fri Jul 05, 2019 2:23 am

It is a headless machine and it (now and then) seems to lock up.

Can't ping it.

Dead for remote access.

User avatar
bertlea
Posts: 303
Joined: Wed Dec 07, 2016 6:33 am
Location: Hong Kong

Re: Help with log files and seeing what is/was going on.

Fri Jul 05, 2019 4:26 am

You can try

Code: Select all

journalctl -n 1000
This will give you the last 1,000 log entries. You can change the number after "-n" to suit your needs. If you have some keywords you can filter to log such as "carrier", you can pipe the output and use grep to filter it. I used that method to trouble shoot my pi's wifi carrier loss problem.

lerner
Posts: 509
Joined: Sun Mar 29, 2015 12:12 am

Re: Help with log files and seeing what is/was going on.

Fri Jul 05, 2019 6:21 am

Thanks.

I hope it helps.

(As said)

It is headless, and from past tests I remember I can't just plug in a monitor/keyboard to see what is/was happening.

epoch1970
Posts: 4478
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Help with log files and seeing what is/was going on.

Fri Jul 05, 2019 6:46 am

If you’re losing network connectivity and you can’t install a console directly on the machine to see what’s happening, it’s more or less game over.

You can try and look at the WiFi AP/router log files, they might reveal something.

On the Pi, “dmesg” will print kernel messages some of which might not be reflected in the system log.
Otherwise with /var/log/syslog on Raspbian you have a comprehensive view of what’s going on.
Applications such as wpa_supplicant allow to specify log verbosity. This one in particular can be very verbose (and cryptic)...

Also, keep in mind the unpredictable nature of wireless. If the neighbor next door has changed WiFi settings on their router, your network might be affected.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

User avatar
bensimmo
Posts: 4321
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Help with log files and seeing what is/was going on.

Fri Jul 05, 2019 6:48 am

lerner wrote:
Fri Jul 05, 2019 6:21 am
Thanks.

I hope it helps.

(As said)

It is headless, and from past tests I remember I can't just plug in a monitor/keyboard to see what is/was happening.
Do the opposite, keep the cables in (you may need to force hdmi and fix a screen resolution so a screen can be seen after you plug it into the monitor/TV)
How, I've forgotten unfortunately.

lerner
Posts: 509
Joined: Sun Mar 29, 2015 12:12 am

Re: Help with log files and seeing what is/was going on.

Fri Jul 05, 2019 7:00 am

Thanks to all.

Bit more.

Dunno if this is "O/T" or not, but it is part of the problem.

I am running NR on that RPIZ(w).

It connects (via WiFi) to another RPI which is also running NR.

The second RPI is a 2B is my "main" machine for this. It is also my MQTT broker.

These two machines are on 24/7.

I have played with MQTT and I am getting weird messages.

Today at 07:10 I booted this machine and logged in to see what is going on.
The RPZ says it has established MQTT connection to the network. (how/why? It was on since last night and hasn't been turned off.)
At 07:17 I turn off THIS machine. Nothing to do with the RPZ or the other RPI.
Later on today I turn THIS machine back on and look again. This was at 12:20
I see a MQTT message saying it (the RPZ) was shutting down. O.k.a.y......
And it is establishing MQTT at 12:20.
Then at 12:52 I shut THIS machine down.
16:18 THIS machine powered back up.
I see the MQTT connection re-established.
And that at 12:52 the MQTT link was shut down.

That is only part of the problem, as the RPZ is still running.

It gets worse when the RPZ is just dead.

Anyone got any ideas?

epoch1970
Posts: 4478
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Help with log files and seeing what is/was going on.

Fri Jul 05, 2019 7:09 am

I don’t use MQTT but perhaps those lines are saying “I am shutting down the previously registered connection to node X”
Which a server would do because a time-out has elapsed or it knows its database needs a cleanup.
So in a sense it would be talking of itself, not really of node X.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

User avatar
neilgl
Posts: 1623
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Help with log files and seeing what is/was going on.

Fri Jul 05, 2019 7:10 am

What is NR? Node-Red?

lerner
Posts: 509
Joined: Sun Mar 29, 2015 12:12 am

Re: Help with log files and seeing what is/was going on.

Fri Jul 05, 2019 7:16 am

Epoch1970,

I don't think so.

I shall investigate that. But really that isn't the real problem.

It is really more that sometimes I try to log into that machine and it is just dead. I'm just mentioning this because it may be related.

Neilgl,
Yes, sorry. NR - Node-Red.


Oh dear!

Sorry. Update.
No the RPZ(w) is connected to a REAL WAP. That WAP is cat-5 connected to the other RPI.
(There is another WiFi problem, but I'll keep that to another thread)

Return to “Troubleshooting”