- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to avoid producing "core" or let the size ...
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
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
тАО11-13-2003 04:32 PM
тАО11-13-2003 04:32 PM
how to avoid producing "core" or let the size of core be zero?
so I want to know how to avoid this case on time?
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2003 05:58 PM
тАО11-13-2003 05:58 PM
Re: how to avoid producing "core" or let the size of core be zero?
Try with:
$ ulimit -c SIZE_IN_BLOCKS # Limit core size under sh or ksh
$ limit coredumpsize SIZE_IN_KB # Limit core size under csh or tcsh
Kind regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2003 06:02 PM
тАО11-13-2003 06:02 PM
Re: how to avoid producing "core" or let the size of core be zero?
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=6369
HTH
Kind regards,
Zigor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2003 02:31 AM
тАО11-14-2003 02:31 AM
Re: how to avoid producing "core" or let the size of core be zero?
everything in the program's memory and writes it as a file named 'core' in
the current directory. Oone way to prevent this from happening, do the
following:
cd
touch core
chmod 0 core
chown root core
Now, core files can't be created because the file has no permissions for
any user (except the superuser) and the file can't be changed by the user
since it's owned by root. It is a zero-length file so it occupies no space.
And to keep from having cron messages about not being able to remove a
directory called core, change the above find command to:
find / -name "core" -type f -exec rm {} \;
However, the easier technique is to use the POSIX shell builtin called
ulimit. Normally, ulimit is a programming interface (section 2 of the
man pages) but with ksh and sh-posix, this is much easier to change at
the command line. ksh does not have the full complement of options (it
only supports the maximum file size that can be created), while POSIX
shell has almost a dozen options. To limit core files to zero, use:
ulimit -c 0
>From now on, any process that is started from this shell prompt will
produce a zero-length core file. Try this (with the POSIX shell)
to prove it:
ulimit -c 0
sleep 500 &
ps
kill -3
This will produce a zero-length core file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2003 05:00 PM
тАО11-16-2003 05:00 PM
Re: how to avoid producing "core" or let the size of core be zero?
thanks for your informations.
but I found after I issued as the following:
>ulimit -c 0
>sleep 500 &
[1] 3834
>ps
>kill -3 3834
but I didn't find any core produced.why?
thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2003 02:34 PM
тАО11-19-2003 02:34 PM
Re: how to avoid producing "core" or let the size of core be zero?
However, you need to determine what program is creating the core files (hint: file core). The reason is that ulimit is effective in the environment in which it is run, which means that it must be added to batch jobs run by cron and perhaps to bootup processes.
If you need to preserve a core file to determine the reason for the program's failure, I would use this in /etc/profile:
ulimit -Sc 0
which means that a programmer/developer can override the current ulimit value (-S is the softlimit value).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2003 12:11 PM
тАО11-20-2003 12:11 PM
Re: how to avoid producing "core" or let the size of core be zero?
but I don't know how to make sure "make sure ulimit -c 0 is present in all login environments."
could you tell me how to do?
thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2003 01:41 PM
тАО11-20-2003 01:41 PM
Re: how to avoid producing "core" or let the size of core be zero?
If ulimit -a gives an error, you are running ksh which does not have the flexibility of the POSIX shell. However, /etc/profile is run by the POSIX shell so ulimit can be set there and will still affect ksh and all child processes. You can see the ulimit settings in ksh by typing /usr/bin/ulimit -a
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2003 02:03 PM
тАО11-20-2003 02:03 PM
Re: how to avoid producing "core" or let the size of core be zero?
I mean I don't know how to let ulimit -c 0 is present in all login environments.
could you tell this in detail?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2003 02:13 PM
тАО11-20-2003 02:13 PM
Re: how to avoid producing "core" or let the size of core be zero?
ulimit -Sc 0
This will work for all 'normal' logins using sh or ksh as the shell. This assumes that your users do NOT use csh, and do not use remsh or rlogin to start a session on your system. Try it out by logging in with your personal login and type ulimit -a
Bill Hassell, sysadmin