===== Boot (vxvm) ===== server{root}# eeprom | grep boot-device boot-device=disk server{root}# init 0 […] {3} ok printenv boot-device boot-device = disk {3} ok setenv boot-device vx-rootdisk vx-rootmir boot-device = vx-rootdisk vx-rootmir {3} ok printenv boot-device boot-device = vx-rootdisk vx-rootmir {3} ok boot /pci@87,2000/scsi@1/disk@1,0:a -v ===== Checker device de boot ===== * SDS server{root}# prtconf -vp | grep bootpath bootpath: '/pci@83,4000/FJSV,ulsa@2,1/disk@0,0:a' ===== Booter en maintenance ===== sc> break -y sc> console -f sc> boot -s -a ===== Networker 8.1 sous Solaris 9 ===== cd /usr/lib/iconv/geniconvtbl/srcs/ geniconvtbl ISO8859-1_to_UTF-8.src geniconvtbl UTF-8_to_ISO8859-1.src mv ISO8859-1_to_UTF-8.bt ../binarytables/ mv UTF-8_to_ISO8859-1.bt ../binarytables/ cd ../binarytables ln -s ISO8859-1_to_UTF-8.bt ISO8859-1%UTF-8.bt ln -s UTF-8_to_ISO8859-1.bt UTF-8%ISO8859-1.bt -r--r--r-- 1 bin bin 1464 Feb 19 17:02 UTF-8_to_ISO8859-1.bt lrwxrwxrwx 1 root other 21 Feb 19 17:03 UTF-8%ISO8859-1.bt -> UTF-8_to_ISO8859-1.bt -r--r--r-- 1 bin bin 1448 Feb 19 17:04 ISO8859-1_to_UTF-8.bt lrwxrwxrwx 1 root other 21 Feb 19 17:05 ISO8859-1%UTF-8.bt -> ISO8859-1_to_UTF-8.bt ===== Undelete Solaris ===== Si quelqu'un a fait un malencontreux rm des fichiers du répertoire //// des process du user ////, le répertoire //// est vide mais les process sont toujours en machine avec les fichiers ouverts. Avec la commande suivante, on récupère les fichiers : cd /proc find * -user -links 0 -type f | while read f do x=`echo $f | sed 's!/!_!g' ` echo ln $f /$x done | sh -x ===== Récupérer des infos dans un fichier core ===== root@SomeMachine:/var/crash/SomeMachine# mdb -k unix.0 vmcore.0 Loading modules: [ unix krtld genunix specfs dtrace ufs sd ssd fcp fctl emlxs ip sctp usba nca random lofs md logindmux ] [ ptm cpc fcip sppp crypto zfs nfs ipc ] > ::status debugging crash dump vmcore.0 (64-bit) from SomeMachine operating system: 5.10 Generic_118833-24 (sun4v) panic message: BAD TRAP: type=31 rp=2a1061cb020 addr=0 mmu_fsr=0 occurred in module "ip" due to a NULL pointer dereference dump content: kernel pages only > ::stack udp_snmp_get+0x100(3000c659098, 4, 60027b1a7c0, 60001cd9060, 300079c8640, 600067cbc00) snmpcom_req+0x33c(3000c659098, 60001d89080, 3000938ee00, 7bf7a248, 16, 6001c2f2530) ip_snmpmod_wput+0xe4(3000c659098, 60001d89080, 7bf61c00, 7bf7a000, 7bf7a400, 600118ab0b0) putnext+0x218(3000c659190, 3000c659098, 60001d89080, 100, 30007e13308, 0) snmpcom_req+0x368(30007e13308, 60001d89080, 60025ad7380, 7bfe3720, 16, 6002abb88f0) icmp_wput_restricted+0xc8(30007e13308, 60001d89080, 7bfe3400, 60001d89080, 6002d13f340, 600118ab0b0) putnext+0x218(6000300ebe8, 30007e13308, 60001d89080, 0, 3000cb69b80, 0) strput+0x1d8(6001a6dd2f0, 60001d89080, 4375, 60001d89080, 6002d13f340, 0) strputmsg+0x298(0, 2a1061cb9e8, 2a1061cb9c8, 6001a6dd370, 2a1061cb8c8, 3) msgio32+0x354(3, 4, 3, 2a1061cbad8, 6001ed2a970, 2a1061cbadf) putmsg32+0x98(3, ffbffb9c, 0, 0, 4, 2a1061cbad4) syscall_trap32+0xcc(3, ffbffb9c, 0, 0, 1d000, 3) > ::panicinfo cpu 10 thread 30002ac9c20 message BAD TRAP: type=31 rp=2a1061cb020 addr=0 mmu_fsr=0 occurred in module "ip" due to a NULL pointer dereference tstate 44e2001607 g1 6000341f848 g2 0 g3 0 g4 0 g5 3 g6 0 g7 30002ac9c20 o0 60027b1a7c0 o1 0 o2 2000000 o3 60001cd9060 o4 7bfad400 o5 2 o6 2a1061ca8c1 o7 7bf7a320 pc 7bf7a348 npc 7bf7a34c y 0 sfsr 0 sfar 0 tt 31 > 30002ac9c20::thread -p ADDR PROC LWP CRED 0000030002ac9c20 60006922080 3000c64c710 600118ab0b0 > ::ps -f ... > ::ptree ... > 60006922080::ps -f S PID PPID PGID SID UID FLAGS ADDR NAME R 17269 17267 16379 16379 359 0x4a004000 0000060006922080 netstat -ni > 0t17269::pid2proc 60006922080 > 60006922080::ptree 0000000001836a40 sched 00000600030b9360 init 0000060004ea4fc8 cron 0000060012176070 sh 0000060011a24c40 CheckTibcoATP.sh 000006002e8e7370 RepartitionInsta 000003000c5f7c28 grep 0000060006922080 netstat > 60006922080::ps -t S PID PPID PGID SID UID FLAGS ADDR NAME R 17269 17267 16379 16379 359 0x4a004000 0000060006922080 netstat T 0x30002ac9c20 > 30002ac9c20::findstack stack pointer for thread 30002ac9c20: 2a1061ca491 000002a1061ca541 die+0x78() 000002a1061ca621 trap+0x9dc() 000002a1061ca771 ktl0+0x64() 000002a1061ca8c1 udp_snmp_get+0xd8() 000002a1061ca9d1 snmpcom_req+0x33c() 000002a1061caa81 ip_snmpmod_wput+0xe4() 000002a1061cab31 putnext+0x218() 000002a1061cabe1 snmpcom_req+0x368() 000002a1061cac91 icmp_wput_restricted+0xc8() 000002a1061cad41 putnext+0x218() 000002a1061cadf1 strput+0x1d8() 000002a1061caff1 strputmsg+0x298() 000002a1061cb101 msgio32+0x354() 000002a1061cb211 putmsg32+0x98() 000002a1061cb2e1 syscall_trap32+0xcc() > 0000060027b64098::ps -f S PID PPID PGID SID UID FLAGS ADDR NAME R 17266 17265 16383 16383 358 0x4a004000 0000060027b64098 netstat -ni > 0000060006922080::ps -f S PID PPID PGID SID UID FLAGS ADDR NAME R 17266 17265 16383 16383 358 0x4a004000 0000060027b64098 netstat T 0x3000dc10340 > 0000060027b64098::ps -t S PID PPID PGID SID UID FLAGS ADDR NAME R 17266 17265 16383 16383 358 0x4a004000 0000060027b64098 netstat T 0x3000dc10340 > 3000dc10340::findstack stack pointer for thread 3000dc10340: 2a1088dabd1 [ 000002a1088dabd1 cv_wait+0x38() ] 000002a1088dac81 ip_quiesce_conn+0x128() 000002a1088dad31 ip_close+0x2c() 000002a1088dade1 qdetach+0x90() 000002a1088dae91 strclose+0x3c0() 000002a1088daf61 socktpi_close+0x158() 000002a1088db011 fop_close+0x20() 000002a1088db0d1 closef+0x4c() 000002a1088db181 closeandsetf+0x37c() 000002a1088db231 close+8() 000002a1088db2e1 syscall_trap32+0xcc() > ::help ... > ::dcmds ... > ::quit