$ find . -name "*.gz" -exec zgrep -la bbarney03@xxxx.com \{\} \;
./aaa_1/231_20160606193002_232895_330_20160606_231655_1_0000_01.act.gz
./aaa_1/231_20160606173001_604598_330_20160606_211628_1_0000_01.act.gz
./aaa_1/232_20160606191508_769207_935_20160606_230502_1_0000.act.gz
./aaa_1/232_20160606191600_522897_329_20160606_230518_1_0000.act.gz
./aaa_1/232_20160606160002_239869_935_20160606_194946_1_0000.act.gz
./aaa_1/232_20160606094601_736357_329_20160606_133804_1_0000.act.gz
./aaa_1/232_20160606103002_77028_935_20160606_141917_1_0000.act.gz
./aaa_1/231_20160606113107_109722_840_20160606_152107_1_0000.act.gz
./aaa_1/231_20160606120002_183644_330_20160606_154014_1_0000_03.act.gz
./aaa_1/231_20160606094501_813187_330_20160606_133446_1_0000_00.act.gz
./aaa_1/232_20160606114501_577769_935_20160606_153424_1_0000.act.gz
./aaa_1/232_20160606104600_643312_329_20160606_143819_1_0000.act.gz
./aaa_1/232_20160606103107_699907_837_20160606_141919_1_0000.act.gz
./aaa_1/231_20160606120019_863535_330_20160606_154515_1_0000_01.act.gz
./aaa_1/232_20160606094701_251538_329_20160606_133804_1_0000_03.act.gz
./aaa_1/232_20160606153002_294217_935_20160606_191943_1_0000.act.gz
./aaa_1/232_20160606160107_988588_837_20160606_194949_1_0000.act.gz
./aaa_1/232_20160606160102_442949_329_20160606_195433_1_0000.act.gz
./aaa_1/232_20160606114603_483834_837_20160606_153426_1_0000.act.gz
./aaa_1/231_20160606153002_218144_330_20160606_191602_1_0000_02.act.gz
$ zgrep -i bbarney03@xxxx.com 231_20160609122102_492219_840_20160609_160748_1_0000.act.gz
$ zgrep -la bbarney03@sxxxxcom 231_20160609122102_492219_840_20160609_160748_1_0000.act.gz
find . -name "*.gz" -exec zgrep -la 8434763502 \{\} \;
find . -name "*.gz" -exec zgrep -la 50495939382 \{\} \;
Friday, May 26, 2017
Wednesday, May 28, 2014
Linux: find hba information
-bash-3.2$ nsu
Password:
[root@redhat ~]# cd /opt/hp
[root@redhat hp]# ls
hpdiags hp-ilo hpsmh hpssa
hp_fibreutils hpmouse hp-smh-templates hpssacli
hp-health hp-OpenIPMI hp-snmp-agents
[root@redhat hp]# cd hp_fibreutils
[root@redhat hp_fibreutils]# ls
adapter_info hp_rescan lssd lssg scsi_info
[root@redhat hp_fibreutils]# ./hp_rescan -h
NAME
hp_rescan
DESCRIPTION
Sends the rescan signal to all or selected Fibre Channel HBAs/CNAs.
OPTIONS
-a, --all - Rescan all Fibre Channel HBAs
-h, --help - Prints this help message
-i, --instance - Rescan a particular instance
-l, --list - List all supported Fibre Channel HBAs
[root@redhat hp_fibreutils]# ./hp_rescan -l
QLogic adapters:
/sys/class/scsi_host/1
/sys/class/scsi_host/2
Emulex adapters:
Brocade adapters:
[root@redhat hp_fibreutils]# cd /sys/class/scsi_host
[root@redhat scsi_host]# ls
host0 host1 host2
[root@redhat scsi_host]# ls -la
total 0
drwxr-xr-x 5 root root 0 May 23 14:25 .
drwxr-xr-x 43 root root 0 May 23 14:26 ..
drwxr-xr-x 2 root root 0 May 26 11:13 host0
drwxr-xr-x 2 root root 0 May 26 11:13 host1
drwxr-xr-x 2 root root 0 May 26 11:13 host2
[root@redhat scsi_host]# cd host1
[root@redhat host1]# ls
84xx_fw_version model_desc state
beacon model_name subsystem
cmd_per_lun mpi_version total_isp_aborts
device npiv_vports_inuse uevent
driver_version optrom_bios_version unchecked_isa_dma
fabric_param optrom_efi_version unique_id
flash_block_size optrom_fcode_version vlan_id
fw_dump_size optrom_fw_version vn_port_mac_address
fw_state pci_info vport_create
fw_version phy_version vport_delete
host_busy proc_name zio
isp_id scan zio_timer
isp_name serial_num
max_npiv_vports sg_tablesize
[root@redhat host1]# more driver_version
8.04.00.12.5.6-k2
[root@redhat host1]# more model_name
QMH2462
[root@redhat host1]#
Password:
[root@redhat ~]# cd /opt/hp
[root@redhat hp]# ls
hpdiags hp-ilo hpsmh hpssa
hp_fibreutils hpmouse hp-smh-templates hpssacli
hp-health hp-OpenIPMI hp-snmp-agents
[root@redhat hp]# cd hp_fibreutils
[root@redhat hp_fibreutils]# ls
adapter_info hp_rescan lssd lssg scsi_info
[root@redhat hp_fibreutils]# ./hp_rescan -h
NAME
hp_rescan
DESCRIPTION
Sends the rescan signal to all or selected Fibre Channel HBAs/CNAs.
OPTIONS
-a, --all - Rescan all Fibre Channel HBAs
-h, --help - Prints this help message
-i, --instance - Rescan a particular instance
-l, --list - List all supported Fibre Channel HBAs
[root@redhat hp_fibreutils]# ./hp_rescan -l
QLogic adapters:
/sys/class/scsi_host/1
/sys/class/scsi_host/2
Emulex adapters:
Brocade adapters:
[root@redhat hp_fibreutils]# cd /sys/class/scsi_host
[root@redhat scsi_host]# ls
host0 host1 host2
[root@redhat scsi_host]# ls -la
total 0
drwxr-xr-x 5 root root 0 May 23 14:25 .
drwxr-xr-x 43 root root 0 May 23 14:26 ..
drwxr-xr-x 2 root root 0 May 26 11:13 host0
drwxr-xr-x 2 root root 0 May 26 11:13 host1
drwxr-xr-x 2 root root 0 May 26 11:13 host2
[root@redhat scsi_host]# cd host1
[root@redhat host1]# ls
84xx_fw_version model_desc state
beacon model_name subsystem
cmd_per_lun mpi_version total_isp_aborts
device npiv_vports_inuse uevent
driver_version optrom_bios_version unchecked_isa_dma
fabric_param optrom_efi_version unique_id
flash_block_size optrom_fcode_version vlan_id
fw_dump_size optrom_fw_version vn_port_mac_address
fw_state pci_info vport_create
fw_version phy_version vport_delete
host_busy proc_name zio
isp_id scan zio_timer
isp_name serial_num
max_npiv_vports sg_tablesize
[root@redhat host1]# more driver_version
8.04.00.12.5.6-k2
[root@redhat host1]# more model_name
QMH2462
[root@redhat host1]#
Thursday, March 20, 2014
Solaris: nvalias
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@0/pci@0/pci@2/scsi@0/sd@0,0
1. c1t1d0
/pci@0/pci@0/pci@2/scsi@0/sd@1,0
2. c4t60060E80056F110000006F11000060D4d0
/scsi_vhci/ssd@g60060e80056f110000006f11000060d4
Specify disk (enter its number):
{0} ok printenv boot-device
boot-device = /pci@0/pci@0/pci@2/scsi@0/disk@0,0:a disk net
{0} ok nvalias root-mirr /pci@0/pci@0/pci@2/scsi@0/disk@1,0:a
{0} ok devalias
root-mirr /pci@0/pci@0/pci@2/scsi@0/disk@1,0:a
ttya /ebus@c0/serial@0,ca0000
nvram /virtual-devices/nvram@3
net3 /pci@0/pci@0/pci@1/pci@0/pci@3/network@0,1
net2 /pci@0/pci@0/pci@1/pci@0/pci@3/network@0
net1 /pci@0/pci@0/pci@1/pci@0/pci@2/network@0,1
net0 /pci@0/pci@0/pci@1/pci@0/pci@2/network@0
net /pci@0/pci@0/pci@1/pci@0/pci@2/network@0
cdrom /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/device@4/storage@0/disk@0:f
disk3 /pci@0/pci@0/pci@2/scsi@0/disk@3
disk2 /pci@0/pci@0/pci@2/scsi@0/disk@2
disk1 /pci@0/pci@0/pci@2/scsi@0/disk@1
disk0 /pci@0/pci@0/pci@2/scsi@0/disk@0
disk /pci@0/pci@0/pci@2/scsi@0/disk@0
scsi /pci@0/pci@0/pci@2/scsi@0
virtual-console /virtual-devices/console@1
name aliases
{0} ok boot
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@0/pci@0/pci@2/scsi@0/sd@0,0
1. c1t1d0
/pci@0/pci@0/pci@2/scsi@0/sd@1,0
2. c4t60060E80056F110000006F11000060D4d0
/scsi_vhci/ssd@g60060e80056f110000006f11000060d4
Specify disk (enter its number):
{0} ok printenv boot-device
boot-device = /pci@0/pci@0/pci@2/scsi@0/disk@0,0:a disk net
{0} ok nvalias root-mirr /pci@0/pci@0/pci@2/scsi@0/disk@1,0:a
{0} ok devalias
root-mirr /pci@0/pci@0/pci@2/scsi@0/disk@1,0:a
ttya /ebus@c0/serial@0,ca0000
nvram /virtual-devices/nvram@3
net3 /pci@0/pci@0/pci@1/pci@0/pci@3/network@0,1
net2 /pci@0/pci@0/pci@1/pci@0/pci@3/network@0
net1 /pci@0/pci@0/pci@1/pci@0/pci@2/network@0,1
net0 /pci@0/pci@0/pci@1/pci@0/pci@2/network@0
net /pci@0/pci@0/pci@1/pci@0/pci@2/network@0
cdrom /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/device@4/storage@0/disk@0:f
disk3 /pci@0/pci@0/pci@2/scsi@0/disk@3
disk2 /pci@0/pci@0/pci@2/scsi@0/disk@2
disk1 /pci@0/pci@0/pci@2/scsi@0/disk@1
disk0 /pci@0/pci@0/pci@2/scsi@0/disk@0
disk /pci@0/pci@0/pci@2/scsi@0/disk@0
scsi /pci@0/pci@0/pci@2/scsi@0
virtual-console /virtual-devices/console@1
name aliases
{0} ok boot
HPUX: How to check hpux ilo firmware version
<>hpiLO-> show
status=0
status_tag=COMMAND COMPLETED
/
Targets
system1
map1
Properties
Verbs
cd version exit show
<>hpiLO-> show /map1
status=0
status_tag=COMMAND COMPLETED
/map1
Targets
firmware1
accounts1
log1
enetport1
dhcpendpt1
dnsendpt1
gateway1
dnsserver1
dnsserver2
dnsserver3
dhcpserver1
settings1
config1
snmp1
oemhp_dircfg1
oemhp_vm1
vlan1
oemhp_ssocfg1
Properties
name=iLO 3 Advanced
license=3368NY7M2BQGKTNMLDZ8KZLLH
Verbs
cd version exit show reset set oemhp_ping
hpiLO-> show firmware1
status=0
status_tag=COMMAND COMPLETED
/map1/firmware1
Targets
Properties
version=1.10
date=Jul 26 2010
Verbs
cd version exit show load set
hpiLO->
to upgrade
How to upgrade the firmware using SSH PDF Print E-mail
Written by Carlo Cacciafesta
Thursday, 07 January 2010 13:35
How to upgrade the firmware using SSH
The following commands can be used to upgrade the firmware on an HP iLO or iLO2 interface. This procedure is particularly useful when the iLO stops working properly and it's not accessible from the server or via HTTP(S).
Use the following procedure:
* Use SSH to access the iLO device
* Log in to the iLO using administrative credentials
* Type the following command and press enter: "load -source http://ip_address/path/imagename.bin /map1/firmware"
o Example: "load -source http://192.168.0.1/ilo2_180.bin /map1/firmware"
* The interface will download the new image and will reset itself
* To check the firmware version, log in again using SSH and enter the following command: "show /map1/firmware version"
status=0
status_tag=COMMAND COMPLETED
/
Targets
system1
map1
Properties
Verbs
cd version exit show
<>hpiLO-> show /map1
status=0
status_tag=COMMAND COMPLETED
/map1
Targets
firmware1
accounts1
log1
enetport1
dhcpendpt1
dnsendpt1
gateway1
dnsserver1
dnsserver2
dnsserver3
dhcpserver1
settings1
config1
snmp1
oemhp_dircfg1
oemhp_vm1
vlan1
oemhp_ssocfg1
Properties
name=iLO 3 Advanced
license=3368NY7M2BQGKTNMLDZ8KZLLH
Verbs
cd version exit show reset set oemhp_ping
hpiLO-> show firmware1
status=0
status_tag=COMMAND COMPLETED
/map1/firmware1
Targets
Properties
version=1.10
date=Jul 26 2010
Verbs
cd version exit show load set
hpiLO->
to upgrade
How to upgrade the firmware using SSH PDF Print E-mail
Written by Carlo Cacciafesta
Thursday, 07 January 2010 13:35
How to upgrade the firmware using SSH
The following commands can be used to upgrade the firmware on an HP iLO or iLO2 interface. This procedure is particularly useful when the iLO stops working properly and it's not accessible from the server or via HTTP(S).
Use the following procedure:
* Use SSH to access the iLO device
* Log in to the iLO using administrative credentials
* Type the following command and press enter: "load -source http://ip_address/path/imagename.bin /map1/firmware"
o Example: "load -source http://192.168.0.1/ilo2_180.bin /map1/firmware"
* The interface will download the new image and will reset itself
* To check the firmware version, log in again using SSH and enter the following command: "show /map1/firmware version"
Redhat: Find network device
[root@ devices]# du -a . | grep net
0 ./vmbus_0_0/vmbus_0_4/net:seth0
0 ./pci0000:00/0000:00:0a.0/net:eth0
[root@ devices]# pwd
/sys/devices
[root@ devices]#
0 ./vmbus_0_0/vmbus_0_4/net:seth0
0 ./pci0000:00/0000:00:0a.0/net:eth0
[root@ devices]# pwd
/sys/devices
[root@ devices]#
Solaris: Restricted ftp access
groupadd partsftp
useradd -c "F1 performance project" -d /root/home/partsftp -g partsftp -m -s /usr/bin/false partsftp
svcadm -v enable ftp
Change user's home directory to /u01/network:
Code:
usermod -d /u01/network ftp_user
Then add:
Code:
restricted-uid ftp_user
to /etc/ftpd/ftpaccess file.
server1# vi /etc/shells
"/etc/shells" [New file]
/usr/bin/false
deny-uid uid-range [uid-range...]
deny-gid gid-range [gid-range...]
allow-uid uid-range [uid-range...]
allow-gid gid-range [gid-range...]
/etc/ftpd/ftpaccess example
--------------
.
.
.
. omitted
# limit-time anonymous 30
# limit anonusers 10 Wk0730-1800 /etc/ftpd/toomany.msg
# limit anonusers 50 SaSu|Any1800-0730 /etc/ftpd/toomany.msg
restricted-uid partsftp
allow-uid partsftp
deny-uid *
defumask 022
server1#
useradd -c "F1 performance project" -d /root/home/partsftp -g partsftp -m -s /usr/bin/false partsftp
svcadm -v enable ftp
Change user's home directory to /u01/network:
Code:
usermod -d /u01/network ftp_user
Then add:
Code:
restricted-uid ftp_user
to /etc/ftpd/ftpaccess file.
server1# vi /etc/shells
"/etc/shells" [New file]
/usr/bin/false
deny-uid uid-range [uid-range...]
deny-gid gid-range [gid-range...]
allow-uid uid-range [uid-range...]
allow-gid gid-range [gid-range...]
/etc/ftpd/ftpaccess example
--------------
.
.
.
. omitted
# limit-time anonymous 30
# limit anonusers 10 Wk0730-1800 /etc/ftpd/toomany.msg
# limit anonusers 50 SaSu|Any1800-0730 /etc/ftpd/toomany.msg
restricted-uid partsftp
allow-uid partsftp
deny-uid *
defumask 022
server1#
Thursday, February 20, 2014
Unix: tcpdump check connectivity
Useful commnd to run
tcpdump -nn -v -s 1500 -c 1 'ether[20:2] == 0x2000' -i ethX
Subscribe to:
Posts (Atom)
UNIX: How to print column nicely using printf
[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...
-
This does increase the amount of CPU and I/O that both your sending and receiving side use, but I’ve been able to run ~25 parallel instance...
-
Creating a Loopback File System (LOFS) A LOFS file system is a virtual file system that provides an alternate path to an existing file syste...
-
[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...