Operating System - HP-UX
1752782 Members
6161 Online
108789 Solutions
New Discussion юеВ

Re: Can we delete core files.

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Can we delete core files.

Hi All,


What is the purpose of core files.

Can we delete all the core files available in our HPUX 11.00.


Ex:

root@lgapps:/var > find / -name core
/home/ansys1/cliu/core
/home/ansys1/cryer/core
/home/ansys1/eirmis/core
/home/ansys1/emdutil/core
/home/ansys1/goetzke/core
/home/ansys1/lib/core
/home/ansys1/pmanicka/core
/home/ansys1/sbhagava/core
/home/ansys1/vkumar/engine/emd710/EMD_VT/core
/home/ansys1/xliu/core
/home/ansys1/ywang/core
/home/ansys1/zagone/core
/home/ansys1/zagone/tmp2zagonebk2/core
/home/gen/andersor/core
/home/gen/casseril/core
/home/gen/grave_yard/vz96qb/core
/home/gen/lister/core
/home/gen/bhoinack/core
/home/gen/noel/core
/home/gen/oddie/core
/home/ansys2/lost+found/core
/home/ansys2/alerch/core
/home/ansys2/bwang/core
/home/ansys2/csmidowi/backdrops/core
/home/ansys2/csmidowi/core
/home/ansys2/dgrzybow/core
/home/ansys2/emdutil/core
/home/ansys2/ho/core
/home/ansys2/irodrig/core
/home/ansys2/jblase/core
/home/ansys2/jcarr/ansys/zagone/core
/home/ansys2/jcarr/ansys/zagone/tmp2zagonebk2/core
/home/ansys2/jszatkow/core
/home/ansys2/lib/core
/home/ansys2/mklemp/core
/home/ansys2/nchristo/core
/home/ansys2/rmacvica/core
/home/ansys2/seanma/core
/home/ansys2/skeene/core
/home/ansys2/smoazezi/core
/home/ansys2/sswenson/core
/home/ansys2/zkaplan/core
/opt/apps/local/emdutil/lib/core
/opt/apps/local/emdutil/mx_new/core
/opt/csc/flexlm/core
/var/opt/dce/dced/core
/var/opt/cifsclient/core
/var/opt/omni/enhincrdb/_var_opt_omni/2C/core
/var/adm/syslog/core
/var/adm/core
/var/spool/cron/atjobs/core
/root/core
/emd/home/andersor/core
/emd/home/casseril/core
/emd/home/grave_yard/vz96qb/core
/emd/home/lister/core
/emd/home/bhoinack/core
/emd/home/noel/core
/emd/home/oddie/core
/emd/ansys1/cliu/core
/emd/ansys1/cryer/core
/emd/ansys1/eirmis/core
/emd/ansys1/emdutil/core
/emd/ansys1/goetzke/core
/emd/ansys1/lib/core
/emd/ansys1/pmanicka/core
/emd/ansys1/sbhagava/core
/emd/ansys1/vkumar/engine/emd710/EMD_VT/core
/emd/ansys1/xliu/core
/emd/ansys1/ywang/core
/emd/ansys1/zagone/core
/emd/ansys1/zagone/tmp2zagonebk2/core
/emd/ansys2/lost+found/core
/emd/ansys2/alerch/core
/emd/ansys2/bwang/core
/emd/ansys2/csmidowi/backdrops/core
/emd/ansys2/csmidowi/core
/emd/ansys2/dgrzybow/core
/emd/ansys2/emdutil/core
/emd/ansys2/ho/core
/emd/ansys2/irodrig/core
/emd/ansys2/jblase/core
/emd/ansys2/jcarr/ansys/zagone/core
/emd/ansys2/jcarr/ansys/zagone/tmp2zagonebk2/core
/emd/ansys2/jszatkow/core
/emd/ansys2/lib/core
/emd/ansys2/mklemp/core
/emd/ansys2/nchristo/core
/emd/ansys2/rmacvica/core
/emd/ansys2/seanma/core
/emd/ansys2/skeene/core
/emd/ansys2/smoazezi/core
/emd/ansys2/sswenson/core
/emd/ansys2/zkaplan/core
/emd/engine/gtpower/VKUMAR/1Cyl-710/core
/emd/engine/gtpower/cliu/gtp_tr/core
/emd/engine/starcd/aditya/core
/emd/tpw/adarlene/core
/emd/mxdata/mxadmin/core
/appl/gtpower.5.2/GTvtrain/v5.2.0/bin/core
/appl/iman.8.1.1.10/bin/core
/appl/iman.8.1.1.10/lib/oracle/core
/appl/iman.8.1.1.10/core
/appl/avl/FIRE/v73/obj_hp9000_11/mp_mpi/core
/appl/oracle/dba/product/9.2.0/inventory/filemap/oem_webstage/oracle/core
/appl/oracle/dba/product/9.2.0/oem_webstage/oracle/core
/appl/oracle/dba/product/9.2.0_oracle/inventory/filemap/oem_webstage/oracle/core
/appl/oracle/dba/product/9.2.0_oracle/oem_webstage/oracle/core
/appl/oracle/dba/admin/dba/core
/appl/EDS/DataAccess/5_0/Tomcat/webapps/tomcat-docs/catalina/docs/api/org/apache/catalina/core
/appl/hyperworks.7.0/altair/hw/tcl/hwat/core
/users/tpw01/adarlene/core
/data/tceloco/imandata/core
/data/tceloco81110/imandata/log_lgapps_tceloco/new_db_logs/make_datasettype_38/core
/data/tceloco81110/imandata/log_lgapps_tceloco/new_db_logs/make_datasettype_39/core
/data/tceloco81110/imandata/log_lgapps_tceloco/new_db_logs/make_datasettype_40/core
/data/tceloco81110/imandata/log_lgapps_tceloco/new_db_logs/make_datasettype_41/core
/data/tceloco81110/imandata/log_lgapps_tceloco/new_db_logs/make_datasettype_42/core
/data/tceloco81110/imandata/log_lgapps_tceloco/new_db_logs/make_datasettype_45/core
/data/tceloco81110/imandata/core


How to delete all core file.
9 REPLIES 9
Stephan.
Honored Contributor
Solution

Re: Can we delete core files.

Hi,

#man core

The HP-UX system writes out a file containing a core image of a terminated process when certain signals are received (see signal(5) for the list of reasons).

iIf you don't want to debug them you can delete them by running 'find / -name core -fsonly vxfs -exec rm {} \;' (without the ').

You can also add this command to the crontab for an automatically deletion of the core files.
Steven E. Protter
Exalted Contributor

Re: Can we delete core files.

Shalom,

Yes you can delete them.

Here is a cron based script.

The attached script will require some mods but can do the job.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Michal Kapalka (mikap)
Honored Contributor

Re: Can we delete core files.

hi,

at first you need to know what you are doing.

them you can follow the advice from SVO.

if you are using find command use also the option : -xdev /home for example.


mikap
James R. Ferguson
Acclaimed Contributor

Re: Can we delete core files.

Hi:

Yes, 'core' files can be removed. You could simply create a crontask that runs once a day and do something like:

# find /path1 /path2 /path3 -xdev -type f -mtime +3 -name core -exec rm {} +

This looks for _files_ named (exactly) "core" and removes them if they are older than 3-days.

Replace '/path1' etc. with the directories in which you expect to find core files. This will be far less resource intensive than searching '/'.

If you are running 11.31 then you should look at your 'coreadm' parameters.

If you have appended a pid to the core file, you could do:

# find /path1 /path2 -xdev -type f -name core -o -name "core.[0-9][0-9]*" -exec ls -l {} +

...which finds both "core" and files named "core.12" but skips files like '/usr/share/man/man4.Z/core.4' (which you might want!).

@ SEP: The script you posted is _copyrighted_ !!!

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Can we delete core files.

If you aren't going to pay someone to analyze them, you can remove them. Make sure you only remove files and not directories: -type f
V. Nyga
Honored Contributor

Re: Can we delete core files.

Hi,

Dennis has added it - make sure that these are files not directories.
The reason of a core directory is to prevent applications to create a core file.

Also: with 'file core' you can identify the application which created the core file.
Then you can ask the users what's the problem with these applications.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Ganesan R
Honored Contributor

Re: Can we delete core files.

Hi Senthilkumar,

Core files are normally created by applications when it panics or not able to handle the requests. You can do basic level debug using these commands.

#file
#what
#gdp

As mentioned by others, nothing harm to delete the core files if you don't want them.
Best wishes,

Ganesh.
James R. Ferguson
Acclaimed Contributor

Re: Can we delete core files.

Hi Senthil:

If you are satisfied with the answers you have received it would be appreciated if you would assign points:

http://forums11.itrc.hp.com/service/forums/helptips.do?#28

...JRF...
щ╗ЮчЗГ
Valued Contributor

Re: Can we delete core files.

Bro,
if you don't need it for aome analysis, just go ahead!!

regards!
have a good one!!
Man's mind, once stretched by a new idea, never regains its original dimensions