329 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
Heading to IamLUG? Still Time to Join an Outstanding Group of Individuals Attending
Tue, Apr 30th 2013 73
Running Adobe Acrobat Reader on Ubuntu x64
Thu, Apr 11th 2013 140
IBM Connections 4.5: Decoding the Downloaded Filesnames
Mon, Apr 1st 2013 229
Some Fun at BLUG
Thu, Mar 28th 2013 255
Train Tips for European Traveling
Wed, Mar 27th 2013 367
BLUG Slides Uploaded
Tue, Mar 26th 2013 169
A Few Quick Points on Domino 9, x64, and Linux
Mon, Mar 25th 2013 405
Top 10
iNotes Tip: Getting the Lotus Learning Widget to Install on 8.5.3
Wed, Dec 19th 2012 532
Mac OSX Mountain Lion Technical Tips and Upgrade Considerations
Thu, Aug 2nd 2012 514
Mac OSX Lion Install Tips & Considerations
Thu, Jul 21st 2011 483
A Few Quick Points on Domino 9, x64, and Linux
Mon, Mar 25th 2013 405
Mobile Data Tips for Americans Traveling Overseas
Wed, Nov 7th 2012 402
Lotus iNotes D8.5.1 FP5 Login Error
Fri, Jan 14th 2011 394
Train Tips for European Traveling
Wed, Mar 27th 2013 367
A Difficult Change of Plans Regarding SkiLUG
Thu, Jan 17th 2013 358
IBM Marketing Claims Another Victim
Thu, Jul 28th 2011 351
A Busy Week and Thursday at IBM Connect 2013 -- Content on the Final Day
Thu, Jan 10th 2013 340


IBM Softwware Admins -- Customizing Your Linux Core Dumps
Bill Malchisky    

Applications crash. It is a fact of life with administration, as we have to clean-up the mess when they do. In Linux these memory protection situations, CPU violations, or other software bug snafus typically manifest themselves in a core file, when occurring outside of Domino--which uses its own type of crash files.

In UNIX or Linux, you may see the occasional core file laying around the / filesystem, or throughout your home directory if you were running the program that crashed. But what if you do not want them to appear there? Perhaps you are tight for space on / and the thought of a 500MB core file appearing at 2am then causing your monitoring tool to trigger a low disk space warning while you are in REM sleep is well, unpalatable. Here are two points to help you when in Linux.


1) Enabling core files to use the process ID when creating
First you want to enable the core files to use the PID file, otherwise, you will just get one file entitled core which will be overwritten by each successive core dump, unless you relocate this single file with an automated process to minimize the chance of an overwrite, it can be very ineffective. If you enable the feature with kernels 2.5+, then you have many options.

Let's start with the first step: #vi /etc/sysctl.conf
Note: make a backup of the file, despite your making a one character change
Search for lines containing core: /core
kernel.core_uses_pid is by default set to "0"; change it to "1", sans the quotes

You an also enable the setuid to dump core, if it is enabled for the program that is running during the crash. If you want to do this append the following string to the sysctl.conf file
kernel.suid_dumpable = 2

Note: if you have a restricted box, then you can use "1" instead, which is debug mode and dumps all processes when possible; else, the value of two sets the dumped core to readable by root only, which locks-down the file so that regular users are unable to view it; the benefit herein is that any sensitive information about the program or system which might have been in memory is only seen by the administration account; this will help keep the box safe


2) Setting the default directory and filename for core files
#vi /proc/sys/kernel/core_pattern

This is a one line file. Just set the directory to where you want them to go, and how you want the file name to be constructed. It is also advisable that if you are moving the files off of the root filesystem (/), that you avoid placing them on a subdirectory that is part of /, otherwise, your disk consumption will remain unchanged on that file system, and you could potentially fill-it unknowingly. If you have ample space on /var or /tmp and they are mounted on a different file system than /, you can create a directory under there and have your core dumps in one place

/tmp/corefiles/core-%e-%p-%t

This will provide you a file with a listing something like this, if the process, 'foo' crashed earlier today, when it had the process ID (PID) of 15479; the time is the number of seconds from 1 January 1970.
$ls /tmp/corefiles
core-foo-15479-1335899059

If you want to disable certain non-root users from writing core dumps, then adjust their write access to the corefiles directory so they are unable to do so, then no cores will be written by those accounts. You can accomplish this by either playing with group membership or removing world read/write privileges.
$ls -l /tmp/corefiles
drwrwxrwx 2 root root 4096 Apr 30 02:30 corefiles

#chmod 770 /tmp/corefiles
drwrwx--- 2 root root 4096 Apr 30 02:30 corefiles


3) Bonus: Testing Your Changes
If you want to see if you have everything working properly, here is how you can force a core file:
$kill -s SIGSEGV $$

Note: notice I am suggesting your user account here, versus the root account. This will dump core from your current shell (if you are using ssh to access to the box, you will need to login again). If you performed steps one and two properly, you will find this core file where you designated it. Type an $ls -lh //core* to see your file. {e.g. $ls -lh /tmp/corefiles/core*}

Here's hoping you will see very few core files. But if you do see one, you will have a much better way to manage these files, while determining crash frequency, and by whom, in a secure and useful way.



---------------------
http://www.BillMal.com/billmal/billmal.nsf/dx/linux_core.htm
May 01, 2012
148 hits



Recent Blog Posts
73


Heading to IamLUG? Still Time to Join an Outstanding Group of Individuals Attending
Tue, Apr 30th 2013 2:52p   Bill Malchisky Jr.
This year, Linux School: Advanced Administration for IBM Software debuts at IamLUG. This offering, covers a lot of useful tools and installation tips for IBM products on Linux. We'll cover a lot of information and am looking forward to showcasing useful utilities which can save you time when troubleshooting. There is still time to get there, find decently priced air fare, and join a great group of peers to learn. Have you signed-up yet? Here is the official list of IamLUG Sessions and speake [read] Keywords: administration ibm lotus community linux
140


Running Adobe Acrobat Reader on Ubuntu x64
Thu, Apr 11th 2013 6:17a   Bill Malchisky Jr.
Adobe Acrobat Reader is i386 code that needs one i386 library file --- when installed on an x64 OS --- omitted with the native x64 installation of Ubuntu 12.x. As such, you'll see this error. To fix the issue, run this command From here you'll see this window, which will flow into several screens of files being unpacked and then installed. It's quite a lot. When finished though, Acrobat will run. The process continues with suggested packages and alerting the end-user t [read] Keywords: linux ubuntu
229


IBM Connections 4.5: Decoding the Downloaded Filesnames
Mon, Apr 1st 2013 7:14a   Bill Malchisky Jr.
As IBM announced IBM Connections 4.5 on 12 March 2013 with a 29 March download availability, there became a lot of interest from partners and customers to dive-in and take advantage of the great new enhancements this product provides. To that point and as this collaborative tool does a lot, there are a significant quantity of files from which you can choose. Now, not every customer site will need all of the files available in Passport Advantage for this offering, but the more you need, the more [read] Keywords: collaboration connections domino ibm lotus notes aix db2 enterprise linux microsoft network office server tivoli websphere
255


Some Fun at BLUG
Thu, Mar 28th 2013 7:14a   Bill Malchisky Jr.
Our illustrious BLUG organizer Theo Heselmans had a surprise for us. During a special event for the speakers and sponsors, he arranged for a Dutch artist to arrive and sketch caricatures for anyone invited. As I recall, there were 31 completed in about three hours (plus time for a couple of breaks). So the artist named, Tice, worked tirelessly creating art. He had two LCD monitors setup, the second was facing the victim volunteer, so we each could see the picture evolve. I believe that Tice used [read] Keywords:
367


Train Tips for European Traveling
Wed, Mar 27th 2013 6:15a   Bill Malchisky Jr.
Train travel is fun and certainly exciting. You can easily get to anywhere with enhancements to the multi-country rail network in Europe. Here are a couple of tips (hardly plenary, I'll add) to aid you on your way. 1. Rail travel is expensive on mainland Europe (UK is quite reasonable comparatively); with the advent of cheap (for some travel situations) airfare like Easy Jet https://www.easyjet.com/ ,but if you have luggage you need to move around, it can be by far the easiest and most cost [read] Keywords: laptop network wifi wireless
169


BLUG Slides Uploaded
Tue, Mar 26th 2013 6:15a   Bill Malchisky Jr.
After a fabulous event in Leuven, Belgium with BLUG 2013, I adjusted the deck to account for a few new morsels provided by IBM since the release of IBM Domino 9 (link in yesterday's post). I also provided the changes to the BLUG Team to ensure currency and consistency across versions. The slides are located in My Presentations section. Title: Infrastructure Fitness and Design Simplicity for IBM Mobile Connect Session ID: A13 Track: Administration Absolutely enjoyed the event and to be p [read] Keywords: administration domino ibm mobile




405


A Few Quick Points on Domino 9, x64, and Linux
Mon, Mar 25th 2013 6:12a   Bill Malchisky Jr.
IBM released Notes Domino 9 this week and it has been a firestorm of zeal, anticipation realized, fun tweets, community upgrades, and success stories overall. Included in the server code are two x86 Linux installation flavors for the first time. This allows one to run native Domino code in either i386 or x64 mode. If you attended Linuxfest at IBM Connect 2013 with myself, Wes Morgan and Daniel Nashed, my BLUG 2013 session, or my private Domino training sessions since December, you were ahead [read] Keywords: administration collaboration domino ibm lotus notes application community linux red hat server vm ubuntu
314


IBM Connect Slides Uploaded
Tue, Feb 5th 2013 7:10p   Bill Malchisky Jr.
I took some time today to update My Presentations page and insert the latest (updated) slides from my IBM Connect 2013 session. Title: Infrastructure Fitness and Design Simplicity for IBM Mobile Connect Session ID: BP406 Track: Best Practices Really enjoyed speaking once again with the Lotusphere/Connect team and working with René Winkelmeyer as well. Happy reading and enjoy the slides. Let me know if you have any questions or comments. Great to meet some many people at IC13 this year t [read] Keywords: ibm lotusphere mobile
326


New Upgrade Tool in Fedora 18
Fri, Jan 18th 2013 6:14a   Bill Malchisky Jr.
Fedora 18 comes with a new upgrade tool entitled, FedUp. It allows you to perform system upgrades. You can also install it on Fedora 17 so that you can load the RPM there and then utilize the tool to get to version 18. This is a command line tool (CLI), which will download several to a lot of packages (depending upon your configuration), a new kernel, initrd, the will reboot the box to perform the final operations. Know that the code is new and may very well change before Fedora 18 is released. [read] Keywords: notes bug linux network red hat redhat security wiki
358


A Difficult Change of Plans Regarding SkiLUG
Thu, Jan 17th 2013 5:14a   Bill Malchisky Jr.
This is the blog entry I never thought I would have to write. With apologies, SkiLUG 2013 is cancelled for this year. My team and I started planning SkiLUG 2013 during Lotusphere 2012 and garnered a lot of interest in what we were planning for the community. People from multiple time zones were excited. From that basis, we started immediately with finding a location and proceeding with all of the action items that one does when planning such an event. Things were going along well, until... H [read] Keywords: ibm lotus lotusphere community office




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition