Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 28 May 2015, 06:29
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to keep your /tmp/xerrs.log file small.
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [22 Posts]   Goto page: 1, 2 Next
Author Message
musher0


Joined: 04 Jan 2009
Posts: 5340
Location: Gatineau (Qc), Canada

PostPosted: Sat 27 Dec 2014, 02:22    Post subject:  How to keep your /tmp/xerrs.log file small.
Subject description: and how to monitor it!
 

~~ Note ~~~~~
Jan. 17, 2015. Since I opened this thread, I concocted a little tool that uses the
less utility and may help you monitor the /tmp/xerrs.log file effortlessly. Please
go to: http://murga-linux.com/puppy/viewtopic.php?p=821855&sort=lastpost#821855.
Enjoy! musher0
~~~~~~~~~~~~

Hello, all !

I hope you are having a happy Holiday Season!

The reason for this thread is that I was having some problems with error reporting
to xerrs.log in Slacko-6.0b -- but not only that Puppy, I have had such problems before.

It's not just me, either, since ttuxxx and technosaurus have also complained about
too many errors being logged in xerrs.log, at:
http://murga-linux.com/puppy/viewtopic.php?t=94328&sort=lastpost&start=750

Also argolance at:
http://www.murga-linux.com/puppy/viewtopic.php?t=85700
And many other advanced Puppyists have commented on errors in numerous other
threads on this forum. But I have not found a thread dedicated to the subject.
(flash, please prove me wrong?!) Smile So I thought a specific thread would be helpful.

A word of caution: test before you use your "silencing" solution! Make sure
the script or program works properly with the error-reporting off. because some
programs simply won't.


Remember that the xerrs.log file is designed to be a helper in debugging your
Puppy, in hunting down and resolving any reported error. A xerrs.log that's small
and stays small means that you're a good hunter/debugger...
As a result,
your Puppy will run more smoothly, and most likely, a tiny bit faster.

These are only the tricks that I've discovered. There are literally thousands of such
tips scattered over the Internet. You're more than welcome to provide your own tips
and/or adaptations below.

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)

Last edited by musher0 on Sat 17 Jan 2015, 20:29; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 5340
Location: Gatineau (Qc), Canada

PostPosted: Sat 27 Dec 2014, 02:24    Post subject:  

Now for my little list.
~~~~~~~~~~~~~
* Getting numerous "Error: BadWindow blabla"
I realized that I had compiled pekwm-1.15 with the xorg parameter "on". My fault.
This particular compilation of pekwm searches for some xorg parameters in
/usr/share/X11 and doesn't find them,because Puppy's architecture is slightly
different.

I initially thought it might be the X driver for the video card, so I tried the 3 drivers
suggested by xorgwizard for my old card. But tough it out, man, it wasn't the video
card driver...

After hours searching and reading various suggestions about this on the Internet (it
seems to be relatively common on slackware related distros, BTW), it finally struck
me that the headache-free solution was to send any window manager errors to
/dev/null in the /root/.xinit file, like so:

Code:

#
which $CURRENTWM && exec $CURRENTWM &>/dev/null
[ -x $CURRENTWM ] && exec $CURRENTWM &>/dev/null
exec jwm

###END###

Adapted from:
http://unix.aspcode.net/view/635395087004115229142276/redirect-both-stderr-and-stdout-to-devnull-with-binsh
(Found Dec 26 2014 at 11 pm.)

You launch your window manager the usual way, with
Code:
xwin pekwm
(or whatever WM) and the modified lines of the bottom
of the .xinitrc script take care of (actually cut off) error reporting.

~~~~~~~~~~~~
* Silencing conky output to xerrs.log
We actually don't need it, except the first few times, when we want to make sure
that we have the conky configuration right. After that, we use the -q parameter to
stop conky from always bragging about itself Smile :
Code:
conky -q -c <your.conky.configuration>

(From conky man file)
~~~~~~~~~~~
* Silencing errors not conky's fault!
You may think that there is not much to be done about error messages such as
"/usr/lib/that-lib.so.9 not exactly matching this or that" or whatever. Nevertheless,
this works in the case of conky:
Code:
conky -q -c $CNK/.conky-1l-pek-haut &>/dev/null &

($CNK being a folder for conky configs in /root/.config)

conky itself remains quiet because of the -q parameter (see par. above), and we
finish shutting up its blabber concerning the library error with the universal quieting
trick: "&>/dev/null". Finally, we make sure that the script doesn't stop at this line
by adding an additional ampersand (the "&") at the very end of the line.
~~~~~~~~~~~
(More to come!)

~~~~~~~~~~~

BFN.

musher0

~~~~~~~~~~~
P.S. -- I just re-checked and now my xerrs.log file stays below 3k Smile whereas before
applying the above tricks it was growing up to 75k in about 10 minutes. Sad

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
greengeek

Joined: 20 Jul 2010
Posts: 3078
Location: New Zealand

PostPosted: Sat 27 Dec 2014, 04:50    Post subject:  

Hi musher - slightly off topic, but I recall reading somewhere that some programs that write to /dev/null run the risk of corrupting some system files. I don't know if that is true or not (I think it was in a thread about using arecord with VU meter...) but is there some alternative way to 'dump' data? Is there a "non-global" devnull like /dev/nullxxxx or /dev/null($random) or something??
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 10589

PostPosted: Sat 27 Dec 2014, 05:31    Post subject:  

ah not just me then..... I just have xwin using > /dev/null 2>/dev/null...seems happy that way....too many apps seem to want to dump piles of text otherwise...mplayer was a good one for it.

Done if for years and no side effects and don't miss it either.

In real linux xerrs.log should be in /var/log anyway where the useful xorg.0.log resides.

mike
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 5340
Location: Gatineau (Qc), Canada

PostPosted: Sat 27 Dec 2014, 06:30    Post subject:  

@mikeb: thanks for the comforting "testimony"! Smile

greengeek wrote:
Hi musher - slightly off topic, but I recall reading somewhere that some programs that write to /dev/null run the risk of corrupting some system files. I don't know if that is true or not (I think it was in a thread about using arecord with VU meter...) but is there some alternative way to 'dump' data? Is there a "non-global" devnull like /dev/nullxxxx or /dev/null($random) or something??


Hi, greengeek.

You're not off-topic at all, actually, you're right on! Smile

First time I've heard of a possible damage with /dev/null. First time also I heard of
a "non-global" devnull. I'll research them, but if you could give me a starting URL, it
would be much appreciated.

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
greengeek

Joined: 20 Jul 2010
Posts: 3078
Location: New Zealand

PostPosted: Sat 27 Dec 2014, 14:49    Post subject:  

musher0 wrote:
First time I've heard of a possible damage with /dev/null. First time also I heard of
a "non-global" devnull. I'll research them, but if you could give me a starting URL
Hi musher0 - my suggestion of a "non-global" dev/null is just an idea bouncing round in my head - its not something that really exists. What I meant was a "localized data dump" - so that a script/program could dump data to its own 'rubbish bin' rather than to a "communal" rubbish bin which might be filled/contaminated or even kicked out of the room entirely by some other user.

The suggestion of damage being caused by improper use of /dev/null is noted in these links:

http://www.murga-linux.com/puppy/viewtopic.php?p=783890#783890
http://murga-linux.com/puppy/viewtopic.php?p=373193#373193
http://mail.murga-projects.com/puppy/viewtopic.php?p=796990&sid=0a617969a3222c9bd09f7c584ab48e8a#796990
http://www.murga-linux.com/puppy/viewtopic.php?p=787295#787295


2009 mike! "Long time ago when the earth was green...."
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 10589

PostPosted: Sat 27 Dec 2014, 15:04    Post subject:  

Ah that old chestnut.... the 'mono' fixed it at the time.

Hmm so one errant binary thats been sorted since..... bit of a one off and /dev/null should be sacred and not be messed up in this way so we can freely use it.... indeed it is very commonly used and 99.9 % of the time its happy.

well remembered by the way.....

mike.

Checked and thee world still seems fairly green out there though I am turning blue...need to cook some hot food....
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 5340
Location: Gatineau (Qc), Canada

PostPosted: Sat 27 Dec 2014, 16:19    Post subject:  

Hi, guys.

Thanks for the feedback.

@greengeek
Many thanks for the references. I looked them up and they all have to do with one
executable: arecord. Or are there others?

As to creating a localized /dev/null for program x or y, I have to admit that I
wouldn't know how to do that.

Another concern is: is that desirable for general use? Of course, for any kind of
developement, it makes a lot of sense to be able to check what you or your
program are doing wrong in a particular file or folder. My point being that if a
program creates lots of errors, it shouldn't yet be offered to the general public.

@mikeb
Basically, if I re-write your message in my head Smile, you're saying that the arecord
case is the exception to the /dev/null general rule?

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 5340
Location: Gatineau (Qc), Canada

PostPosted: Sat 27 Dec 2014, 16:39    Post subject:  

This note, for the record, is about bmpanel2, if anyone is interested.

This nice and versatile companion bar to pekwm is a fussy baby... Launched normally,
It complains to the xerrs.log file a lot. For example:
Quote:
(2.1pre1/panel.c:769) Unknown XEvent (type: 65, win: 8389185)

and on and on and on... 3-4 lines every time you use it. The only thing that changes
is the "win:" number at the end.

Luckily, you can give him this pacifier Smile :
Code:
bmpanel2 --theme=blabla-blue.mod &>/dev/null &

That shuts him up. Smile

BFN.

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 10589

PostPosted: Sat 27 Dec 2014, 16:42    Post subject:  

Quote:
Basically, if I re-write your message in my head Smile, you're saying that the arecord
case is the exception to the /dev/null general rule?

yes it appears so..... I might have been the bunny who discovered it... I was playing with the vu meter option of precord so the guilt may be on my head for that one Very Happy

A bit like the gmplayer crash and puppy menues...a curious on off

mike
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 5340
Location: Gatineau (Qc), Canada

PostPosted: Sat 27 Dec 2014, 22:30    Post subject:  

[quote="mikeb"]
Quote:
[...]
A bit like the gmplayer crash and puppy menues...a curious on off

mike


Oh ? And they complained to xerrs.log, I presume? Smile

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 10589

PostPosted: Sun 28 Dec 2014, 06:17    Post subject:  

No it just crashed ...reason why the gnome-mplayer was used ....

mplayer in general is quite versose unless you add the loglevel parameter....used to fill my tmpfs which was fun....

mike
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 5340
Location: Gatineau (Qc), Canada

PostPosted: Sat 17 Jan 2015, 20:30    Post subject:  

First post edited with URL to monitoring script. musher0
_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 5340
Location: Gatineau (Qc), Canada

PostPosted: Sat 14 Mar 2015, 11:44    Post subject:  

Hello.

I had given up on silencing non-errors and simple anomalies in xerrs.log.
But this "arch-linuxian" suggested this, which explains a solution to
partially shut up the verbose "no listen" in xinit. See the last post there.

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 10589

PostPosted: Sat 14 Mar 2015, 12:13    Post subject:  

Funny you should bring this thread back up.

I was getting tired of endless whining messages in the terminal testing a gtkdialog script...which I assume would have ended up in xerrs if it existed.

These mainly came from glib...after all since gtk devs change functions every time they fart, warning messages have increased exponentially.

so I recompiled glib without warning messages only errors..you know the stuff that actually stops applications working. It worked...silence was golden.

Gtk2 itself also tends to spew them out so will try the same with that.

Now about those doodads warnings and 'oh there will be problems'.....Very Happy

This was on lucid so I guess that and newer suffer from warning hell...me older distros are much quieter.

mike
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [22 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1093s ][ Queries: 11 (0.0163s) ][ GZIP on ]