- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- core files
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
Discussions
Discussions
Discussions
Forums
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
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
тАО01-11-2007 11:33 AM
тАО01-11-2007 11:33 AM
I found some core files in my hp-ux and they are taking too much disk space. I would like to know what is this core files and is it safe to me to delete it without affecting other files?
Is is used by the system?
Maximum points to all correct answers.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2007 11:50 AM
тАО01-11-2007 11:50 AM
Solutionfile /some_directory/core
Then remove the file. They are not used by HP-UX in any way. If you have programmers that are writing programs, you can move the file to the programmer's work area and they can figure out what to do.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2007 12:42 PM
тАО01-11-2007 12:42 PM
Re: core files
Core files gets generated when any process gets terminated abnormally, or due to Memory violation , illegal operation , floating point exceptions, or due to user initiated kill signals.
You can delete this files to save disk space, and you can check the file with # strings core, to see which application generated the core file.
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2007 08:02 PM
тАО01-11-2007 08:02 PM
Re: core files
# file core
core: core file from 'bma' - received SIGABRT
Posible "core" from "bma" (data protector aplication)
# strings core
# rm core or mv core
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2007 08:08 PM
тАО01-11-2007 08:08 PM
Re: core files
core files are of no use if you don't want to investigate further into the root cause of the core dump/process crash.
In case, you go into troubleshooting of the process that crash then you may be required to analyse the core dump to get appropriate information.
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2007 08:32 PM
тАО01-11-2007 08:32 PM
Re: core files
HP-UX will dump the core file in the working directory and if you get multiple core dumps,the older core files in that same directory will get replaced by the newer one.
so if you are planning to save multiple core files,use following:
$ mkdir -p /var/core 2>/dev/null
$ coreadm -g /var/core/core.%p.%t
$ coreadm -I /var/core/core.%p.%t
$ coreadm -e global
$ coreadm -e process
Now Verify your new settings:
$ coreadm
Beside this you may want to read,coreadm(2M)
~amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 12:01 AM
тАО01-12-2007 12:01 AM
Re: core files
On HP-UX, the 'coreadm' command mentioned by Amit, does *not* exist. The command belongs to Sun/Solaris!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 12:08 AM
тАО01-12-2007 12:08 AM
Re: core files
Hello:
For aditional information,
man core
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 01:48 AM
тАО01-12-2007 01:48 AM
Re: core files
coreadm is a nice feature from the Solaris OS.
Nevertheless, the shell gives you a limited
control over your core files by the ulimit command.
e.g.
$ sleep 600 &
[1] 2994
$ kill -s SEGV %1
$ jobs
[1] + Memory fault(coredump) sleep 600 &
$ ll -n core
-rw------- 1 101 20 189932 Jan 12 15:44 core
$ file core
core: core file from 'sleep' - received SIGSEGV
$ rm core
$ ulimit -c
4194303
$ ulimit -c 0
$ sleep 600 &
[1] 3000
$ kill -s SEGV %1
$ jobs
[1] + Memory fault sleep 600 &
$ ll -n core
core not found
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 03:21 AM
тАО01-12-2007 03:21 AM
Re: core files
What made the core in the first place:
file core
To get the libs used:
what core
To debug the stinker:
gdb -c core
To debug the stinker:
gdb ProgramName -c core
Also see HP doc - KNC071499001
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 07:27 AM
тАО01-12-2007 07:27 AM
Re: core files
You can gunzip the file for now if space is a issue. Most the time you can contact hp and ftp the core file to them to be review for the reason of the crash. Then just go ahead a delete them.
Hope this helps,
sp,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 03:10 PM
тАО01-12-2007 03:10 PM
Re: core files
To add on what he said about saving them for developers, if you are going to move them to another system, you need to use gdb's packcore command. (A corefile is useless without the executable and all shared libs that were used.)
Contrary to Raj and rariasn say, you should NOT use strings on core because you may get confused and blame the wrong thing.
Doug is correct that you can use gdb on the executable and core to get a stack trace. This may allow you to identify your problem as something already known, or with a patch.
You can download wdb for free at:
http://www.hp.com/go/wdb
>Sp4admin: You can gunzip the file
I assume you meant gzip? ;-)
>Most the time you can contact hp
I'm not sure if HP will do that for core files for user applications. Were you thinking of panic dumps in /var/adm/crash/?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 03:27 PM
тАО01-12-2007 03:27 PM
Re: core files
Please assign points to Bill H. and Dennis..
here's my 5-cents for you..
I agree with Dennis and a pointer back to Bill H.
but I have seen that a core file can dump it's self into a new core file and cause space problems..
to help you with this problem..
try this one..
locate the core file itself and set the file modes to non-write..
a little learning here..
1. core file is located in /x/y/core
2. ls -l /x/y/core
it is very big in size, so reduce the size to ZERO bytes
3. $ >/x/y/core
ls -l /x/y/core
now the size is zero bytes
4. change the mode on the file so it is NEVER ABLE TO WRITE ON TOP OF ITSELF
chmod 444 /x/y/core
this is not clean here.. but can help to prevent space problems..
follow up on Dennis and Bill's points..
think about this one.. even an WebServer like Apache can grow in size. because of a program bug.. if the program grows and grows.. and then performs something that the kernel does not allow, hence Segmentation fault, page-fault, bus-error..
again, follow Dennis and Bill..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 03:52 PM
тАО01-12-2007 03:52 PM
Re: core files
think about it.. even the shell "ksh" or "sh" can sometimes cause a core file..
If the running process is growing and demanding more memory and space, then the size of the process in memory is big.
do you agree ?
Okay, let's try this one:
find all the active processes on your system and report the size of the processes
1. ps -efl
the "l" flag shows the total memory of the process, but yet it might have some Dynamic Libraries that it is using.. which is also added to the number..
say, the process "Core" dumps and creates a 'core' file, then the entire memory footprint (think of CSI on TV here) is now copied onto Disk Space. this can be a killer, but yet it may take many blocks of disk space.
if you like, you can try some cool tools of HP-UX here:
1. assume core file is /x/y/core
2. run the cat command using the -v option
$ cat -v /x/y/core | more
3. notice the first or second page of the output ? Does this show any program name, or do you find like an Application name ? Then, this is a clear validation that the program name file is called, let's just say "abc_program".
at this point you do not know where is the location of this executable name "abc_program", do you ?
so, try to find it using the "find" command, example.. follows assume "abc_program" was printed using the "cat -v core" output, then..
4. find the path of the "abc_program" file
$ cd /
$ find . -exec ls -l {} -name abc_program -print \;
note, this might take 5 or 10 minutes to run, if you do find the Full Directory Path name of the executable, then prove it to yourself that the "core" file matches the executable file name by running "adb" command.
example of adb
5. adb /filesystemx/abc_program /x/y/core
$C
$q
bingo.. you now have confirmed that the program that caused the 'core' file is called /filesytemx/abc_program
note this matches the /x/y/core file.
good hunting..
rgds,
T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 04:49 PM
тАО01-12-2007 04:49 PM
Re: core files
I just create a directory called "core".
As mentioned by Ralph you can use ulimit.
>2. run the cat command using the -v option
"file core" handles this directly.
$ cd /
$ find . -exec ls -l {} -name abc_program -print \;
You can speed this up by using -name before -exec. And no need to use -print if you use ll:
$ find / -name abc_program -exec ll +
(And replace \; by +.)
>5. adb /filesystemx/abc_program /x/y/core
It is much much easier to use gdb.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2007 03:53 PM
тАО01-13-2007 03:53 PM
Re: core files
The "file" command is important to us, in that, some executables might be of 11.11 PA-RISC and some might be of 11.23 Itanium..
clearly this command "file" is very helpful to all..
question for you: let's say, someone load a binary file of a.out format for 11.23 itanium but on a older OS 11.11 PA-RISC ?
This has happened to me..
Does the "file" command on a 11.11 PA-RISC know about the "Magic Number" for an 11.23 Itanium ? I strongly feel there should be a smart version of the "file" command that notes the identity of all binary versions.. be it Itanium, PA-RISC, or even Linux.
rgds,
T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2007 11:27 AM
тАО01-14-2007 11:27 AM
Re: core files
I was away over the weekend and i was so surprised about the helped i got from you about the 'core' files topic! Thanks guys for the answers! This forum really helps!
Brgds,
Pando
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2007 08:05 AM
тАО01-16-2007 08:05 AM
Re: core files
You need to be on 11.23 PA for file(1) to work better. Otherwise if you look closely you can still tell:
On 11.11:
$ file a.out # +DD32 IPF
a.out: ELF-32 executable object file
$ file a.out # +DD64 IPF
a.out: ELF-64 executable object file
$ file a.out # +DD64 PA
a.out: ELF-64 executable object file - PA-RISC 2.0 (LP64)
On 11.23, IPF:
$ file a.out # On IPF +DD64
a.out: ELF-64 executable object file - IA64
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2007 01:32 AM
тАО12-07-2007 01:32 AM
Re: core files
I'm surprised I didn't mention that this now exists on 11.31.