Archive for the ‘*Nix’ Category
Kill Many* Jobs
When I want to shutdown the oracle database. I must kill many session client who connect to the database and running in background Os…
bash> ps -ef|grep -i local=no oracle 19027 1 0 Sep 07 ? 0:01 oracleSERVER (LOCAL=NO) oracle 25918 1 0 Sep 07 ? 0:03 oracleSERVER (LOCAL=NO) oracle 16403 1 0 Sep 07 ? 0:00 oracleSERVER (LOCAL=NO) oracle 18858 1 0 Sep 06 ? 0:01 oracleSERVER (LOCAL=NO) oracle 7836 1 0 Sep 07 ? 0:02 oracleSERVER (LOCAL=NO) oracle 9021 1 0 Sep 07 ? 0:00 oracleSERVER (LOCAL=NO) oracle 27940 1 0 Sep 06 ? 0:00 oracleSERVER (LOCAL=NO) oracle 25505 1 0 Sep 07 ? 0:01 oracleSERVER (LOCAL=NO) oracle 2427 1 0 Sep 07 ? 0:00 oracleSERVER (LOCAL=NO) oracle 26640 1 0 Sep 06 ? 0:01 oracleSERVER (LOCAL=NO) oracle 15440 1 0 19:23:09 ? 0:01 oracleSERVER (LOCAL=NO) oracle 16712 1 0 Sep 07 ? 0:00 oracleSERVER (LOCAL=NO) oracle 11544 1 0 Sep 06 ? 0:00 oracleSERVER (LOCAL=NO) oracle 1411 1 0 Sep 07 ? 0:01 oracleSERVER (LOCAL=NO) oracle 18909 1 0 Sep 06 ? 0:00 oracleSERVER (LOCAL=NO) oracle 15607 1 0 Sep 06 ? 0:01 oracleSERVER (LOCAL=NO) oracle 2873 1 0 Sep 06 ? 0:01 oracleSERVER (LOCAL=NO) oracle 21197 1 0 17:36:49 ? 0:00 oracleSERVER (LOCAL=NO) oracle 22318 1 0 Sep 06 ? 0:02 oracleSERVER (LOCAL=NO)
Show this the trick (when Nobody give up..:D)
bash> ps -ef|grep LOCAL|awk '{print $2'}|xargs kill -9
Tada..
Get WWN of Fibre cards
A World Wide Name (WWN) or World Wide Identifier (WWID) is a unique identifier in a Fibre Channel or Serial Attached SCSI storage network. Each WWN is an 8-byte number derived from an IEEE OUI (for the first 3 bytes) and vendor-supplied information (for the rest) … quote from wiki
To get your wwn at your Solaris machine, you can use this command
bash> prtpicl -v | grep wwn :node-wwn 50 01 04 f0 00 5f 0a 85 :port-wwn 50 01 04 f0 00 5f 0a 83 :node-wwn 50 06 0e 80 04 2a b0 04
or
bash> luxadm -e port /devices/ssm@0,0/pci@18,700000/SUNW,qlc@2/fp@0,0:devctl CONNECTED /devices/ssm@0,0/pci@18,700000/SUNW,qlc@1/fp@0,0:devctl CONNECTED /devices/ssm@0,0/pci@18,600000/fibre-channel@1/fp@0,0:devctl CONNECTED /devices/ssm@0,0/pci@18,700000/SUNW,qlc@2,1/fp@0,0:devctl NOT CONNECTED /devices/ssm@0,0/pci@18,700000/SUNW,qlc@1,1/fp@0,0:devctl NOT CONNECTED
And then grab one of the luxadm output
bash> luxadm -e dump_map /devices/ssm@0,0/pci@18,700000/SUNW,qlc@2/fp@0,0:devctl Pos Port_ID Hard_Addr Port WWN Node WWN Type 0 10000 0 200400a0b818aad4 200400a0b818aad3 0x0 (Disk device) 1 10300 0 200500a0b818aad4 200400a0b818aad3 0x0 (Disk device) 2 20000 0 200400a0b818aad5 200400a0b818aad3 0x0 (Disk device) 3 20300 0 200500a0b818aad5 200400a0b818aad3 0x0 (Disk device) 4 20900 0 210000e08b829a76 200000e08b829a76 0x1f (Unknown Type,Host Bus Adapter)
At your HP-UX machine, you can use this command
bash> fcmsutil /dev/td9 Vendor ID is = 0x001254 Device ID is = 0x001159 XL2 Chip Revision No is = 2.3 PCI Sub-system Vendor ID is = 0x05103c PCI Sub-system ID is = 0x01128c Topology = PTTOPT_FABRIC Link Speed = 2Gb Local N_Port_id is = 0x0a1650 N_Port Node World Wide Name = 0x50060b000023c458 N_Port Port World Wide Name = 0x50060b000023c459 Driver state = ONLINE Hardware Path is = 0/0/14/0/0 Number of Assisted IOs = 32763725 Number of Active Login Sessions = 2 Dino Present on Card = NO Maximum Frame Size = 2048 Driver Version = @(#) libtd.a HP Fibre Channel Tachyon TL/TS/XL2 Driver B.11.11.12 PATCH_11.11 (PHSS_31326) /ux/kern/kisu/TL/src/common/wsio/td_glue.c: Sep 5 2005, 10:14:40
At your Linux machine, used this..
bash> cat /proc/scsi/qla2xxx/* |grep port|grep -v port-0 scsi-qla0-adapter-port=210000145e254fca; scsi-qla0-port-1=50060160b021b712:500601683021b712:018100:82; scsi-qla1-adapter-port=210000145e254fcb; scsi-qla1-port-1=50060160b021b712:500601693021b712:018100:82;