home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 17252 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  2.2 KB

  1. Path: sparky!uunet!wupost!crcnis1.unl.edu!moe.ksu.ksu.edu!matt.ksu.ksu.edu!news
  2. From: probreak@matt.ksu.ksu.edu (James Michael Chacon)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: Limiting Core dumps
  5. Date: 19 Nov 1992 22:38:21 -0600
  6. Organization: Kansas State University
  7. Lines: 52
  8. Message-ID: <1ehq3tINNnh5@matt.ksu.ksu.edu>
  9. References: <Nov.19.14.50.39.1992.190@remus.rutgers.edu>
  10. NNTP-Posting-Host: matt.ksu.ksu.edu
  11.  
  12. glenw@remus.rutgers.edu (Glenn Wasserman) writes:
  13.  
  14. >Does anyone know how to limit or eliminate core dump sizes? 
  15. >I know with the C shell at school there's a variable:
  16.  
  17. >    set limitcoredumpsize=0
  18.  
  19. >I would like to do the same for my system. I believe that when the drive fills
  20. >up, (Usually during a really nasty core dump - ~ 2meg or more) the system
  21. >halts and dies. I figure if I can keep these core dumps from happening, then
  22. >maybe the system won't crash entirely.
  23.  
  24. >-Glenn
  25.  
  26. Under bash there is a useful feature known as help. It will do pattern
  27. matching if you don't know the exact command you are looking for.
  28. Here is the output from help *limit*
  29.  
  30.  
  31. Shell commands matching keyword `*limit*'
  32.  
  33. ulimit: ulimit [-SHacdmstfpn [limit]]
  34.     Ulimit provides control over the resources available to processes
  35.     started by the shell, on systems that allow such control.  If an
  36.     option is given, it is interpreted as follows:
  37.     
  38.         -S    use the `soft' resource limit
  39.         -H    use the `hard' resource limit
  40.         -a    all current limits are reported
  41.         -c    the maximum size of core files created
  42.         -d    the maximum size of a process's data segment
  43.         -m    the maximum resident set size
  44.         -s    the maximum stack size
  45.         -t    the maximum amount of cpu time in seconds
  46.         -f    the maximum size of files created by the shell
  47.         -p    the pipe buffer size
  48.         -n    the maximum number of open file descriptors
  49.     
  50.     If LIMIT is given, it is the new value of the specified resource.
  51.     Otherwise, the current value of the specified resource is printed.
  52.     If no option is given, then -f is assumed.  Values are in 1k
  53.     increments, except for -t, which is in seconds, and -p, which is in
  54.     increments of 512 bytes.
  55.  
  56. So to set your limit on coredumping to zero you would just do a
  57.  
  58. ulimit -c 0;
  59.  
  60. Hope this helps
  61.  
  62. James
  63.  
  64.