dumpadm(8) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

dumpadm(8)

System Administration Commands                                      dumpadm(8)



NAME
       dumpadm - configure operating system crash dump

SYNOPSIS
       /usr/sbin/dumpadm [-enpuy] [-c content-spec] [-d dump-device]
            [-m mink | minm | min%] [-s savecore-dir]
            [-r root-dir] [-z on | off] [-D on | off]

DESCRIPTION
       The  dumpadm program is an administrative command that manages the con‐
       figuration of the operating system crash dump facility. A crash dump is
       a  copy  of  the physical memory of the computer at the time of a fatal
       system error. When a fatal operating system  error  occurs,  a  message
       describing  the error is printed to the console. If deferred dumping is
       enabled (on), the operating system then generates a crash dump by  pre‐
       serving  the  contents of physical memory in RAM. If this is not possi‐
       ble, or if deferred dumping is disabled (off), the contents of physical
       memory  are  written to a predetermined dump device, which can be a ZFS
       ZVOL, or a local disk partition.


       Once the crash dump has been preserved, the system will reboot.


       Fatal operating system errors can be caused by bugs  in  the  operating
       system,  its  associated  device  drivers  and  loadable modules, or by
       faulty hardware. Whatever the cause, the  crash  dump  itself  provides
       invaluable  information  to  your support engineer to aid in diagnosing
       the problem. As such, it is vital that the crash dump be retrieved  and
       given  to  your  support provider. Following an operating system crash,
       the savecore(8)  utility  is  executed  automatically  during  boot  to
       retrieve  the crash dump and write it to your file system in compressed
       form, to files named vmdump.X, and vmdump-<secname>.X, where  X  is  an
       integer  identifying the dump. Afterward, savecore(8) can be invoked on
       the same or another system to expand the compressed crash dump to files
       named vmcore.X and vmcore-<secname>.X. The directory in which the crash
       dump is saved on reboot can be configured using dumpadm command.


       By default dedicated ZFS volumes are used for dump devices. For further
       information about setting up a dump area with ZFS, see the Managing ZFS
       File Systems in Oracle Solaris 11.4 book.


       To view the current dump configuration, use the dumpadm command with no
       arguments:

         example# dumpadm

               Dump content: kernel with ZFS metadata
                Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
         Savecore directory: /var/crash
           Savecore enabled: yes
            Save compressed: on
              Deferred Dump: on



       When  no options are specified, dumpadm displays the current crash dump
       configuration. The example above shows the set of default  values:  the
       dump  content  is set to kernel memory pages and ZFS metadata only. The
       crash dump will be preserved in  memory  (if  possible),  else  a  dump
       device  will  be used. The dump device is by default a zvol in the root
       pool. The directory for savecore files is set to /var/crash/.  savecore
       is configured to run automatically on reboot and save the crash dump in
       a compressed format.


       When one or more options are  specified,  dumpadm  verifies  that  your
       changes  are  valid,  and if so, reconfigures the crash dump parameters
       and displays the resulting configuration. You must be root to  view  or
       change dump parameters.


       Upon  system  installation, dumpadm establishes a dump device of suffi‐
       cient size, based on system memory size and other internal information,
       to  accommodate  a  dump  file. If you subsequently attempt to create a
       dump device that is too small to store the dump file, dumpadm issues  a
       warning message.

OPTIONS
       The following options are supported:

       -c content-spec

           Modify  the  dump  configuration so that the crash dump consists of
           the specified dump content. The content-spec comprises of  optional
           content-type and content modifiers:

           [ content-type ] [ +content-modifier | -content-modifier.. ]

               content-type  provides the basis, the content modifiers further
               change the contents to be dumped. With +, the content modifiers
               add extra data to be dumped, with - the data is left out.

               The content-type can be one of the following:


               kernel     Kernel  memory  pages  only. Note that this includes
                          only basic set of kernel pages,  that  is,  not  the
                          pages which can be specified with content modifiers.


               all        All  memory  pages.  If all is specified, the system
                          image is written to the dump device. Note  that  the
                          resulting  dump  will  include  pages for filesystem
                          buffers.


               curproc    Kernel memory pages (as specified by 'kernel'),  and
                          the  memory  pages  of  the process whose thread was
                          currently executing on the CPU on  which  the  crash
                          dump  was initiated. If the thread executing on that
                          CPU is a kernel thread not associated with any  user
                          process, only kernel pages will be dumped.


               allproc    Kernel  memory  pages (as specified by 'kernel') and
                          all process pages. If allproc is specified, the sys‐
                          tem image is written to the dump device.

               The content-modifier can be one of the following:


               zfs    Kernel pages which store ZFS metadata.

               The  content  modifiers  affect which portions of kernel memory
               are dumped and which are not. They do not have any effect  when
               the 'all' content type is set.

               If  content-type  is  omitted,  and  only a content-modifier is
               specified, then  the  currently  configured  content-type  will
               remain unchanged.



       -d dump-device

           Modify the dump configuration to use the specified dump device. The
           dump device may one of the following:

           dump-device

               A block device specified  as  an  absolute  pathname,  such  as
               /dev/dsk/cNtNdNsN,     or     a     ZFS    volume    such    as
               /dev/zvol/dsk/rpool/dump.


           swap

               If the special token swap is  specified  as  the  dump  device,
               dumpadm  examines  the active swap entries and selects the most
               appropriate entry to configure as the dump device. See swap(8).
               Refer  to  the NOTES below for details of the algorithm used to
               select an appropriate swap entry.

               A given ZFS volume cannot be configured for both the swap  area
               and the dump device.

               Use of a swap device for a dump device is not recommended.


           none

               Do not use disk based dump device. The crash dump will still be
               retrieved if it is possible to store crash dumps in memory.



       -D on | off

           Modify  the  dump  configuration  to  control  whether  dumping  is
           deferred  or not. The options are on, to preserve the crash dump in
           system memory if possible, and off, to write the crash dump to  the
           dump device as part of the panic process. After the system reboots,
           savecore will find the crash dump in either system memory or on the
           dump  device,  and  copy it to the savecore directory at that time.
           The default is on, because in most cases that will reduce the over‐
           all downtime of the system.


       -e

           Print  estimate of disk space required for storing compressed crash
           dump. The value is computed using current  configuration  and  cur‐
           rently running system.


       -m mink | minm | min%

           Create  a minfree file in the current savecore directory indicating
           that savecore should maintain at least the specified amount of free
           space  in  the file system where the savecore directory is located.
           The min argument can be one of the following:


           k

               A positive integer suffixed with the unit  k  specifying  kilo‐
               bytes.


           m

               A   positive  integer  suffixed  with  the  unit  m  specifying
               megabytes.


           %

               A % symbol, indicating that the minfree value  should  be  com‐
               puted  as the specified percentage of the total current size of
               the file system containing the savecore directory.

           The savecore command will consult the  minfree  file,  if  present,
           prior  to  writing the dump files. If the size of these files would
           decrease the amount of free disk space below the minfree threshold,
           no  dump  files  are  written  and  an error message is logged. The
           administrator should immediately clean up the savecore directory to
           provide  adequate  free  space, and re-execute the savecore command
           manually. The administrator can also specify an alternate directory
           on the savecore command-line.


       -n

           Modify  the dump configuration to not run savecore automatically on
           reboot.  This  is  not  the   recommended   system   configuration.
           savecore(8)  can  be  run manually once the system has booted up to
           extract the crash dump to the savecore directory.

           If the dump device is a swap partition, the dump data may be  over‐
           written as the system begins to use the swap device. If savecore is
           not executed shortly after boot, crash dump retrieval  may  not  be
           possible.


       -p

           Produce machine parseable output.


       -r root-dir

           Specify  an  alternate  root  directory  relative  to which dumpadm
           should create files. If no -r argument is  specified,  the  default
           root directory / is used.


       -s savecore-dir

           Modify  the  dump  configuration  to use the specified directory to
           save files written by savecore. The directory should be an absolute
           path and exist on the system. If upon reboot the directory does not
           exist, it will be created prior to the execution of  savecore.  See
           the  NOTES section below for a discussion of security issues relat‐
           ing to access to  the  savecore  directory.  The  default  savecore
           directory is /var/crash/.


       -u

           Forcibly update the kernel dump configuration based on the contents
           of /etc/dumpadm.conf. Normally this option is used only  on  reboot
           when  starting  svc:/system/dump:config,  when the dumpadm settings
           from the previous boot must be restored. Your dump configuration is
           saved in the configuration file for this purpose. If the configura‐
           tion file is missing or contains invalid values for any dump  prop‐
           erties,  the  default values are substituted. Following the update,
           the configuration file is resynchronized with the kernel dump  con‐
           figuration.


       -y

           Modify  the  dump  configuration  to  automatically run savecore on
           reboot. This is the default for this dump setting. See NOTES.


       -z on | off

           Modify the dump configuration to control the operation of  savecore
           on  reboot.  The  options  are on, to enable saving core files in a
           compressed format, and off, to automatically uncompress  the  crash
           dump  file. The default is on, because crash dump files can be very
           large and require less file system space if saved in  a  compressed
           format.


EXAMPLES
       Example  1 Reconfiguring The Dump Device to store current process pages
       and no ZFS metadata pages




         example# dumpadm -c curproc-zfs
                            Dump content: kernel and current process without ZFS metadata
                             Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
                      Savecore directory: /var/crash
                        Savecore enabled: yes
                         Save compressed: on
                           Deferred Dump: on





       Example 2 Specifying allproc or all content




         example# dumpadm -c all
                            Dump content: all
                             Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
                      Savecore directory: /var/crash
                        Savecore enabled: yes
                         Save compressed: on
                           Deferred Dump: on


       Example 3 Preserving crash dump if savecore is disabled



       If savecore is disabled, the crash dump may still be preserved in  mem‐
       ory  and  copied  to  the dump device after reboot. It can be extracted
       later by running savecore(8) manually.




         example# dumpadm -n -c kernel+zfs
                            Dump content: kernel with ZFS metadata
                             Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
                      Savecore directory: /var/crash
                        Savecore enabled: no
                         Save compressed: on
                           Deferred Dump: on



EXIT STATUS
       The following exit values are returned:

       0

           Dump configuration is valid and  the  specified  modifications,  if
           any, were made successfully.


       1

           A  fatal  error  occurred in either obtaining or modifying the dump
           configuration.


       2

           Invalid command line options were specified.


FILES
       /dev/dump

           Crash dump management device driver.


       /etc/dumpadm.conf

           Contains configuration parameters for dumpadm and savecore. Modifi‐
           able only using dumpadm.


       savecore-directory/minfree

           Contains  minimum  amount of free space for savecore-directory. See
           savecore(8).


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/core-os


SEE ALSO
       svcs(1),   uname(1),  attributes(7),  smf(7),  savecore(8),  svcadm(8),
       swap(8)

NOTES
       The system crash dump service is  managed  by  the  service  management
       facility, smf(7), under the following service identifiers:

         svc:/system/dump:config
         svc:/system/dump:deferred
         svc:/system/dump:disk
         svc:/system/dump:swap



       While  administrative  actions  on this service, such as enabling, dis‐
       abling, or requesting restart, can be performed using svcadm(8), it  is
       not recommended to disable these services. The status of these services
       can be queried using the svcs(1) command.

   Dump Device Selection
       When the special swap token is specified as the argument to dumpadm  -d
       the  utility will attempt to configure the most appropriate swap device
       as the dump device. dumpadm configures the largest swap block device as
       the  dump  device;  if  no  block  devices  are available for swap, the
       largest swap entry is configured as the dump device. If no swap entries
       are  present,  or  none can be configured as the dump device, a warning
       message will be displayed.

   Dump Device/Swap Device Interaction
       In the event that the dump device is also a swap device, and  the  swap
       device  is deleted by the administrator using the swap  -d command, the
       swap command will automatically invoke dumpadm  -d  swap  in  order  to
       attempt  to  configure  another  appropriate  swap  device  as the dump
       device. If no swap devices remain or none can be configured as the dump
       device,  the  crash dump will be disabled and a warning message will be
       displayed. Similarly, if the crash dump is disabled and the administra‐
       tor  adds  a  new  swap  device using the swap  -a command, dumpadm  -d
       swap will be invoked to re-enable the crash dump  using  the  new  swap
       device.


       Once  dumpadm   -d  swap has been issued, the new dump device is stored
       in the configuration file for subsequent reboots. If a larger  or  more
       appropriate  swap device is added by the administrator, the dump device
       is not changed; the administrator must re-execute dumpadm  -d  swap  to
       reselect the most appropriate device from the new list of swap devices.

   Minimum Free Space
       If  the  dumpadm  -m option is used to create a minfree file based on a
       percentage of the total size of the file system containing the savecore
       directory,  this value is not automatically recomputed if the file sys‐
       tem subsequently changes size. In this case, the administrator must re-
       execute  dumpadm   -m  to  recompute the minfree value. If no such file
       exists in the savecore directory, savecore will default to a free space
       threshold  of  one  megabyte.  If no free space threshold is desired, a
       minfree file containing size 0 can be created.


       If there is insufficient space in the dump directory, and  system  pre‐
       served  a  crash dump image in memory, then the image is written to the
       dump device for later extraction using savecore(8).

   Security Issues
       If, upon reboot, the specified savecore directory is  not  present,  it
       will  be  created  prior  to the execution of savecore with permissions
       0700 (read, write, execute by owner only) and owner root. It is  recom‐
       mended that alternate savecore directories also be created with similar
       permissions, as the operating system crash dump  files  themselves  may
       contain secure information.

   Default for savecore
       System installation software might reserve a dedicated dump device (for
       example, a disk slice or a ZFS volume). In such  a  case,  the  dumpadm
       default  can be set to -n, meaning that savecore does not run automati‐
       cally when the system reboots. A crash image will be preserved  on  the
       dump  device  even  if  initially  it  was  preserved  in  memory.  Run
       /usr/bin/savecore manually as root to retrieve the crash image and copy
       it to set of files under /var/crash. The crash image will remain on the
       dump device until overwritten by a later one.



Oracle Solaris 11.4               11 May 2021                       dumpadm(8)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3