- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: corefiles
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2002 11:02 PM
10-22-2002 11:02 PM
How can under HP-UX 11i the generation of core files, i.e. when a process dumps core, be controlled ?
( core file name as well as file location)
BRGDS
and thanks in advance
Andi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2002 11:23 PM
10-22-2002 11:23 PM
Re: corefiles
The process that dumps a core files does so in the directory that it is currently working in and will by default dump it as "core".
As you are aware these files can be analysed to identify how they were caused.
Core file are more often that not results of incorrect code in programs and as such should be looked at and the results passed either to your development team or software supplier.
A way to prevent core file generation in certain directories is to mkdir "core" in that dir.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2002 11:36 PM
10-22-2002 11:36 PM
Re: corefiles
There are lot of patches for application and OS for to eliminate the core files.
If this is a program built in by the user then the user has to examine the code.
Probably you can start with debugging the core files for the source of origin.
HPux has a lot of debuggers like gdb,wgb to trace the core dumps and to debug them.
If you really want to stop them then probably you can do a
ulimit -c 0
which sets the value of core files size to 0 and will stop generating files.
The best way would be to find out the source,patch things properly and eliminate them.
Try using the debuggers.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2002 11:42 PM
10-22-2002 11:42 PM
Re: corefiles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 02:22 AM
10-23-2002 02:22 AM
Re: corefiles
Rather than prevent their creation, we choose to remove them after a suitable "debugging period" has passed with a simple find command that runs nightly via cron:
00 02 * * * /usr/bin/find / -name "core" -mtime +2 -exec rm {} \;
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2002 04:22 AM
10-23-2002 04:22 AM
Re: corefiles
Put this in /etc/profile:
ulimit -Sc 0
Now every user will no longer have any core files created (assumes that the default POSIX shell is the user's login shell). However, someone who needs core files (a programmer for instance) can turn them on again by typing:
ulimit -c 123456
or whatever limit to the maximum size is needed. Note also that this applies only to users that login, not cron or daemons, etc.
It's probably a good idea to identify the source of the core file as it indicates there is a big problem with the program. Use the command:
file core
to decode the core file.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2002 04:55 AM
10-24-2002 04:55 AM
SolutionOn 11.x, there is a kernel param, core_addpid, which will change the name of the core file to core.pid, where pid is the pid of the process that created the core.
To enable this dynamically:
echo "cored_addpid/w 1" | adb -w /stand/vmunix /dev/kmem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2002 04:59 AM
10-24-2002 04:59 AM
Re: corefiles
ulimit -c 0