Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
For a home PC, do you check the log files?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  

How often do you check the log files?
Never
7%
 7%  [ 1 ]
Sometimes, out of curiosity
14%
 14%  [ 2 ]
After each update/install
0%
 0%  [ 0 ]
Only when something is wrong
57%
 57%  [ 8 ]
Daily
21%
 21%  [ 3 ]
Total Votes : 14

Author Message
RoGeorge
n00b
n00b


Joined: 13 Mar 2020
Posts: 17

PostPosted: Sun Mar 29, 2020 12:35 pm    Post subject: For a home PC, do you check the log files? Reply with quote

Last days I had a pop-up warning for running low on space for the $HOME folder 8O , which ended up with a crawl under the desk to press the reset button. :D

It was the $HOME/.xsession-errors log file. More than 60GB of the same error, something about "can not create vdpau chroma filter".

The OS is Kubuntu 20.04 LTS (not yet released until April 2020, but it already has daily builds, the dev branch), KDE Plasma 5.18.3, KDE Frameworks 5.68.0, Qt 5.12.5, Kernel 5.4.0-18-generic, i7, 32GB, nVidia+Intel GPU.

After searching the error message, I found out it was from VLC, indeed I was watching a movie with VLC the night before and the hardware decoding was set to use VDPAU (nVidia), but the movie was played on a monitor connected to the onboard Intel video card. Maybe that's why.

Emptied the .xsession-errors, set the VLC hardware decoding to Automatic, then keep an eye on the .xsession-errors. No VDPAU errors this time, but it was still growing fast.

It was a small plasmoid, Thermal Monitor, that was spamming the log with "qml: temp unit: 0". Fixed that by modifying the sources (found some good hints in the GitHub report issues pages). All good, still plenty of errors, but not exactly flooded.

Then, I noticed the log going crazy again, when I started the Ktorrent. It's spamming the error log with "Initiating connection to (an IPv4 here) via (TCP)", "Connection to (IP)", "Authentication failed." repeated thousands of times per hour. It was reported back in 2017 and the advice was to use a newer version of Ktorrent. My Ktorrent version is even bigger, v5.1.2. OK, so I closed Ktorrent, and will look for some other client.

After removing the errors from VLC/VDPAU, Thermal Monitor plasmoid and Ktorrent, there were still plenty of errors left, and about 20-30 lines are generated almost at each new window or program open or close (e.g. Dolphin).

Looks like a continuous whack-a-mole game to me. What should I do? :?

- Is there any OS harm or side effect (other than staying uninformed) if I symlink $HOME/.xsession-errors to /dev/null?
- Never looked in .xsession-errors before, is it normal to have more than 100 000 lines a day (~10MiB)? How big is your err log?

- How can I find the emitter of a logged error? Is there any way to tell where from is the message, then to block all future errors from that component only?
Back to top
View user's profile Send private message
mrbassie
Guru
Guru


Joined: 31 May 2013
Posts: 592

PostPosted: Sun Mar 29, 2020 2:51 pm    Post subject: Re: For a home PC, do you check the log files? Reply with quote

RoGeorge wrote:
OK, so I closed Ktorrent, and will look for some other client.


Qbittorrent is good.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1609
Location: U.S.A.

PostPosted: Sun Mar 29, 2020 2:57 pm    Post subject: Reply with quote

Quote:
symlink $HOME/.xsession-errors to /dev/null

Sure, why not. That's what a Democrat would do.
_________________
patrix_neo wrote:
The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it.
Back to top
View user's profile Send private message
RoGeorge
n00b
n00b


Joined: 13 Mar 2020
Posts: 17

PostPosted: Sun Mar 29, 2020 3:10 pm    Post subject: Reply with quote

About KTorrent spamming into .xsession-errors, it seems those messages are all coming from the stdout of KTorrent, not from the stderr, as the name .xsession-errors sugests. To get rid of the spamming messages I just redirected the stdout in the KDE Ktorrent's .desktop file

[Fix] for KTorrent spamming connection messages into ~/.xsession-errors, when launched from GUI but not from terminal:
    In the file /usr/share/applications/org.kde.ktorrent.desktop, found the 'Exec=' key, and changed it from 'Exec=ktorrent %U' into
    Code:
    Exec=sh -c "ktorrent %U" > /dev/null

    Save the file and start KTorrent from GUI. The ~/.xsession-errors log should not be spammed any more. The extra shell wrapper is required, or else when a new torrent URL is added, the shell will concatenate the %U list of URLs with > /dev/null, which will generate errors.


If the Ktorrent is started from a terminal, it shows all those verbose messages in the console only. If launched from GUI, both the stdout and stderr are redirected to .xsession-errors.

I was expecting only stderr to be redirected to the err log, why sending stdout there?
Is this a bug of KDE Plasma, to redirect stdout to the .xsession-errors log, or is it the expected behaviour?


Last edited by RoGeorge on Mon Mar 30, 2020 4:11 pm; edited 3 times in total
Back to top
View user's profile Send private message
Old School
Apprentice
Apprentice


Joined: 20 Nov 2004
Posts: 250
Location: West Bank of the Coast Fork

PostPosted: Sun Mar 29, 2020 5:30 pm    Post subject: Reply with quote

Bones McCracker wrote:
Quote:
symlink $HOME/.xsession-errors to /dev/null

Sure, why not. That's what a Democrat would do.
A Republican would just buy an iMac.
_________________
I don't care who you are, nobody has 56 friends who committed suicide.

The further a society drifts from truth, the more it will hate those who speak it.
George Orwell
Back to top
View user's profile Send private message
RoGeorge
n00b
n00b


Joined: 13 Mar 2020
Posts: 17

PostPosted: Sun Mar 29, 2020 5:53 pm    Post subject: Reply with quote

Old School wrote:
Bones McCracker wrote:
Quote:
symlink $HOME/.xsession-errors to /dev/null

Sure, why not. That's what a Democrat would do.
A Republican would just buy an iMac.

So, the one who redirected all stdouts to .xsession-errors must have been a Bureaucrat. :)
Back to top
View user's profile Send private message
RoGeorge
n00b
n00b


Joined: 13 Mar 2020
Posts: 17

PostPosted: Sun Mar 29, 2020 7:42 pm    Post subject: Reply with quote

Forgot to add how to fix the other spammer, Thermal Monitor plasmoid:

In the ~/.xsession-errors again, there was still some smaller spam with the repeated message "qml: temp unit: 0". This was from a widget/plasmoid installed from the official "Plasma Addon - Discover" repository. The addon is called Thermal Monitor, and also has had a minor bug that all the temperatures were shown except for the CPU, where it showed OFF instead of a number. At a right click and Reload Temperature Sources, the CPU temperature start working.

To fix the error log spamming with "qml: temp unit: 0", open the file "~/.local/share/plasma/plasmoids/org.kde.thermalMonitor/contents/code/temperature-utils.js" and in the line #16, change print into dbgprint, then save, so line 16 will look like that:
Code:
dbgprint('temp unit: ' + temperatureUnit)


To fix the OFF displayed instead of the CPU temperature, open the file "~/.local/share/plasma/plasmoids/org.kde.thermalMonitor/contents/ui/main.qml" and change the line 58 from "property var systemmonitorAvailableSources" into
Code:
property var systemmonitorAvailableSources: []

then save and restart.

The Thermal Monitor plasmoid should now display correctly, without any help, and also should not spam error messages any more. The fixes above were found by reading the github issues and comments, e.g. https://github.com/kotelnik/plasma-applet-thermal-monitor/issues/53
Back to top
View user's profile Send private message
Old School
Apprentice
Apprentice


Joined: 20 Nov 2004
Posts: 250
Location: West Bank of the Coast Fork

PostPosted: Sun Mar 29, 2020 8:54 pm    Post subject: Reply with quote

RoGeorge wrote:
Old School wrote:
Bones McCracker wrote:
Quote:
symlink $HOME/.xsession-errors to /dev/null

Sure, why not. That's what a Democrat would do.
A Republican would just buy an iMac.

So, the one who redirected all stdouts to .xsession-errors must have been a Bureaucrat. :)
:lol:
_________________
I don't care who you are, nobody has 56 friends who committed suicide.

The further a society drifts from truth, the more it will hate those who speak it.
George Orwell
Back to top
View user's profile Send private message
RoGeorge
n00b
n00b


Joined: 13 Mar 2020
Posts: 17

PostPosted: Tue Mar 31, 2020 7:49 pm    Post subject: Re: For a home PC, do you check the log files? Reply with quote

mrbassie wrote:
Qbittorrent is good.

Even after the workaround of redirecting the ktorrent's stdout to null by modifying the .desktop start line, it was still spamming the log if was left open at a shutdown/restart. This was because KDE Plasma restores its application's running state at startup, but for some reason it disregards the .desktop configuration while restoring the running ones, so no redirection and thus spam again. Also, sometimes ktorrent was crashing, but only at a manual quit, either from taskbar or from its own quit menu.

Switched to qBittorrent, and very happy with it so far, thanks for the hint! :)
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1412

PostPosted: Tue Mar 31, 2020 9:48 pm    Post subject: Re: For a home PC, do you check the log files? Reply with quote

RoGeorge wrote:
Switched to qBittorrent, and very happy with it so far, thanks for the hint! :)
It is a mess with Kde when they re-invent complicated software but don't have the man power!
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 189

PostPosted: Mon Apr 06, 2020 10:32 am    Post subject: Reply with quote

Bones McCracker wrote:
Quote:
symlink $HOME/.xsession-errors to /dev/null

Sure, why not. That's what a Democrat would do.
:lol:

No but seriously, is there an XDG spec where user logs should go; like how instead of your ~/ being littered with dotfiles, programs (should) also use ~/.config?
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 102

PostPosted: Mon Apr 06, 2020 9:54 pm    Post subject: Reply with quote

I don't even run a syslogger. For a home computer, whenever there be a problem, it is usually easy to solve it without consulting logs.

If logs indeed need be consulted, some makeshift log of simply starting the process and routing output and errors to a file tends to also do nicely.

Of course, hardly recommendable for servers.
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum