1)To see dump device information
root@solaris1:~# dumpadm
Dump content: kernel pages
Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
2)to change dump device
root@solaris1:~# zpool create testpool c2d7
root@solaris1:~# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
rpool 9.94G 5.29G 4.65G 53% 1.00x ONLINE -
testpool 19.9G 85K 19.9G 0% 1.00x ONLINE -
root@solaris1:~# zfs create -V 5g testpool/vol1
root@solaris1:~# dumpadm -d /dev/zvol/dsk/testpool/vol1
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
3)To change Save core directory
root@solaris1:~# mkdir /var/crash/solaris1
root@solaris1:~# dumpadm -s /var/crash/solaris1
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash/solaris1
Savecore enabled: yes
Save compressed: on
root@solaris1:~# dumpadm -s /var/crash
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
4)To disable save core
root@solaris1:~# dumpadm -n
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: no
Save compressed: on
5)to enable save core
root@solaris1:~# dumpadm -y
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
6)to disable compression
root@solaris1:~# dumpadm -z off
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: off
7)to enable compression
root@solaris1:~# dumpadm -z on
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
8)To list service
root@solaris1:~# svcs dumpadm
STATE STIME FMRI
online 12:26:18 svc:/system/dumpadm:default
9)logical device
root@solaris1:~# ls -l /dev/dump
lrwxrwxrwx 1 root root 29 Nov 1 16:38 /dev/dump -> ../devices/pseudo/dump@0:dump
10)configuration file
root@solaris1:~# cat /etc/dumpadm.conf
#
# dumpadm.conf
#
# Configuration parameters for system crash dump.
# Do NOT edit this file by hand -- use dumpadm(1m) instead.
#
DUMPADM_DEVICE=/dev/zvol/dsk/testpool/vol1
DUMPADM_SAVDIR=/var/crash
DUMPADM_CONTENT=kernel
DUMPADM_ENABLE=yes
DUMPADM_CSAVE=on
11)to generate crash dump offline
#halt -d
12)to generate crash dump online
root@solaris1:/var/crash# ls
solaris1
root@solaris1:/var/crash# savecore -L
dumping to /dev/zvol/dsk/testpool/vol1, offset 65536, content: kernel
0:38 100% done
100% done: 122396 pages dumped, dump succeeded
savecore: System dump time: Sat Dec 7 17:32:15 2013
savecore: Saving compressed system crash dump in /var/crash/vmdump.0
savecore: Decompress the crash dump with
'savecore -vf /var/crash/vmdump.0'
root@solaris1:/var/crash# ls
bounds solaris1 vmdump.0
root@solaris1:/var/crash# savecore -vf vmdump.0
savecore: System dump time: Sat Dec 7 17:32:15 2013
savecore: saving system crash dump in /var/crash/{unix,vmcore}.0
Constructing namelist /var/crash/unix.0
Constructing corefile /var/crash/vmcore.0
0:27 100% done: 122396 of 122396 pages saved
45958 (37%) zero pages were not written
0:27 dump decompress is done
root@solaris1:/var/crash# ls
bounds solaris1 unix.0 vmcore.0 vmdump.0
root@solaris1:~# dumpadm
Dump content: kernel pages
Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
2)to change dump device
root@solaris1:~# zpool create testpool c2d7
root@solaris1:~# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
rpool 9.94G 5.29G 4.65G 53% 1.00x ONLINE -
testpool 19.9G 85K 19.9G 0% 1.00x ONLINE -
root@solaris1:~# zfs create -V 5g testpool/vol1
root@solaris1:~# dumpadm -d /dev/zvol/dsk/testpool/vol1
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
3)To change Save core directory
root@solaris1:~# mkdir /var/crash/solaris1
root@solaris1:~# dumpadm -s /var/crash/solaris1
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash/solaris1
Savecore enabled: yes
Save compressed: on
root@solaris1:~# dumpadm -s /var/crash
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
4)To disable save core
root@solaris1:~# dumpadm -n
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: no
Save compressed: on
5)to enable save core
root@solaris1:~# dumpadm -y
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
6)to disable compression
root@solaris1:~# dumpadm -z off
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: off
7)to enable compression
root@solaris1:~# dumpadm -z on
Dump content: kernel pages
Dump device: /dev/zvol/dsk/testpool/vol1 (dedicated)
Savecore directory: /var/crash
Savecore enabled: yes
Save compressed: on
8)To list service
root@solaris1:~# svcs dumpadm
STATE STIME FMRI
online 12:26:18 svc:/system/dumpadm:default
9)logical device
root@solaris1:~# ls -l /dev/dump
lrwxrwxrwx 1 root root 29 Nov 1 16:38 /dev/dump -> ../devices/pseudo/dump@0:dump
10)configuration file
root@solaris1:~# cat /etc/dumpadm.conf
#
# dumpadm.conf
#
# Configuration parameters for system crash dump.
# Do NOT edit this file by hand -- use dumpadm(1m) instead.
#
DUMPADM_DEVICE=/dev/zvol/dsk/testpool/vol1
DUMPADM_SAVDIR=/var/crash
DUMPADM_CONTENT=kernel
DUMPADM_ENABLE=yes
DUMPADM_CSAVE=on
11)to generate crash dump offline
#halt -d
12)to generate crash dump online
root@solaris1:/var/crash# ls
solaris1
root@solaris1:/var/crash# savecore -L
dumping to /dev/zvol/dsk/testpool/vol1, offset 65536, content: kernel
0:38 100% done
100% done: 122396 pages dumped, dump succeeded
savecore: System dump time: Sat Dec 7 17:32:15 2013
savecore: Saving compressed system crash dump in /var/crash/vmdump.0
savecore: Decompress the crash dump with
'savecore -vf /var/crash/vmdump.0'
root@solaris1:/var/crash# ls
bounds solaris1 vmdump.0
root@solaris1:/var/crash# savecore -vf vmdump.0
savecore: System dump time: Sat Dec 7 17:32:15 2013
savecore: saving system crash dump in /var/crash/{unix,vmcore}.0
Constructing namelist /var/crash/unix.0
Constructing corefile /var/crash/vmcore.0
0:27 100% done: 122396 of 122396 pages saved
45958 (37%) zero pages were not written
0:27 dump decompress is done
root@solaris1:/var/crash# ls
bounds solaris1 unix.0 vmcore.0 vmdump.0
No comments:
Post a Comment