Comments for IdeaHeap https://ideaheap.com Percolating Insight from Omaha, NE Thu, 19 May 2022 08:42:30 +0000 hourly 1 https://wordpress.org/?v=6.4.3 Comment on log4j2 + rsyslog for the client side of centralized logging by Kumaran https://ideaheap.com/2015/03/log4j2-rsyslog-logging/#comment-1260157 Thu, 19 May 2022 08:42:30 +0000 http://www.ideaheap.com/?p=729#comment-1260157 Hi,
I trying to achieve syslog appender using log4j2.property file in spark application. Can you provide any reference in property file format instead of xml format.

Thanks,
Kumaran

]]>
Comment on Stopping SD Card Corruption on Raspberry Pi’s Raspbian by Tom https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/#comment-1258536 Mon, 27 Sep 2021 19:53:56 +0000 http://www.ideaheap.com/?p=418#comment-1258536 as others already advised, do NOT disable swap.

instead, use vm.swappiness to make swapping much less attractive to the system. set it to a low value, i.e. 10:

sudo sysctl vm.swappiness=10

]]>
Comment on Stopping SD Card Corruption on Raspberry Pi’s Raspbian by Drew Derbyshire https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/#comment-1237128 Thu, 08 Feb 2018 21:11:03 +0000 http://www.ideaheap.com/?p=418#comment-1237128 Putting /var/log on a ram disk and thus losing it at every boot (including crashes) is … ill-advised.

Use a reliable disk, and make your power supplies are up to specification. Don’t just assume disk corruption is a way of life.

]]>
Comment on Logging context with Mapped Diagnostic Contexts by Guillaume https://ideaheap.com/2016/04/logging-context-with-mapped-diagnostic-contexts/#comment-1237081 Thu, 25 Jan 2018 03:32:58 +0000 http://ideaheap.com/?p=815#comment-1237081 Thank you !

Added the method

public T populateMdcStream(T result){
populateMdc();
return result;
}

Which allow using like this :
things.parallelStream.map(context::populateMdcStream).forEach(thing -> doTheThing(thing));

]]>
Comment on Logging context with Mapped Diagnostic Contexts by jgao https://ideaheap.com/2016/04/logging-context-with-mapped-diagnostic-contexts/#comment-1236922 Fri, 22 Dec 2017 23:47:19 +0000 http://ideaheap.com/?p=815#comment-1236922 In reply to Jack.

I believe that’s just a typo for `MdcSnapshot`

]]>
Comment on Logging context with Mapped Diagnostic Contexts by Jack https://ideaheap.com/2016/04/logging-context-with-mapped-diagnostic-contexts/#comment-1236524 Wed, 13 Sep 2017 21:09:44 +0000 http://ideaheap.com/?p=815#comment-1236524 Where is the class MdcContext ????

]]>
Comment on Stopping SD Card Corruption on Raspberry Pi’s Raspbian by Edward Jang https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/#comment-1235621 Thu, 16 Feb 2017 05:31:08 +0000 http://www.ideaheap.com/?p=418#comment-1235621 The lxsession log file (~pi/.cache/lxsession/LXDE-pi/run.log) becomes very big…..
I added it in the /etc/fstab to make the file’s max size 10MB..
tmpfs /home/pi/.cache/lxsession/LXDE-pi/ tmpfs size=10M,noatime 0 0
But it doesn’t work…
It continue to become big..
Sure, I can remove the log file in the /etc/crontab job….
But I want to show the log file’s content..
Do you have a good idea?

]]>
Comment on Stopping SD Card Corruption on Raspberry Pi’s Raspbian by Nicholas Wertzberger https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/#comment-1233726 Thu, 28 Apr 2016 02:07:33 +0000 http://www.ideaheap.com/?p=418#comment-1233726 In reply to walter.

I only lower the risk of corruption! It’s obviously still possible. In my original use case, the power source was flaky (i had an old battery on a mobile source that died every 15 or so minutes).

]]>
Comment on Stopping SD Card Corruption on Raspberry Pi’s Raspbian by walter https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/#comment-1233710 Tue, 26 Apr 2016 09:35:59 +0000 http://www.ideaheap.com/?p=418#comment-1233710 Linux (and unix) filesystems do not like power outages. Pulling the power just like that is almost guaranteed to corrupt the filesystem. If you are going to pull the power anyway (which you should never do … but you didn’t listen), at least issue the “sync” command a couple of times to write out caches and update the filesystem’s superblock.
If you still get filesystem errors, boot into single user mode and run “fsck” to repair the filesystem. You may also insert the card into another linux computer to fsck it.
Happily running my pi with logging and swap enabled. Swap usage is zero though; I am running a server without X11 so it doesn’t use much memory.

]]>
Comment on Stopping SD Card Corruption on Raspberry Pi’s Raspbian by John Fro https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/#comment-1233649 Sun, 17 Apr 2016 03:20:45 +0000 http://www.ideaheap.com/?p=418#comment-1233649 I followed this general advice on an old RP1 years ago and the multiple units run 24/7 w/ no failures so far. Essentially, nothing gets written to the SD card.

]]>