perl -MFile::Find=find -MFile::Spec::Functions -Tlwe 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'
Uncategorized
apache as a web proxy
if you want a quick web proxy for your browsers or for anything, you can define a virtualhost in apache2 as follows:
Listen *:8080 <VirtualHost *:8080> ProxyRequests On ProxyVia On <Proxy *> Order deny,allow Allow from all </Proxy> CacheRoot "/tmp" CacheMaxExpire 24 CacheLastModifiedFactor 0.1 CacheDefaultExpire 1 ServerName my-proxy ErrorLog "/opt/csw/apache2/var/log/proxy-error.log" CustomLog "/opt/csw/apache2/var/log/proxy-access.log" common </VirtualHost>
Set ownership and permissions to raw devices using udev
To have the rawdevices in /dev/raw/* have permissions set at reboot, you can add a line to /etc/udev/rules.d/60-raw.rules
added ACTION="add", KERNEL=="raw*", OWNER="informix", GROUP="informix", MODE="0600"
Thx to Justin Lim
M9000 internal network config
Make sure you have the dscp addresses configured in the xscf
XSCF> showdscp
DSCP Configuration:
Network: 192.168.224.0
Netmask: 255.255.255.0
Location Address
———- ———
XSCF 192.168.224.1
Domain #00 192.168.224.2
Domain #01 192.168.224.3
Domain #02 192.168.224.4
Domain #03 192.168.224.5
Domain #04 192.168.224.6
Domain #05 192.168.224.7
Domain #06 192.168.224.8
Domain #07 192.168.224.9
Domain #08 192.168.224.10
Domain #09 192.168.224.11
Domain #10 192.168.224.12
Domain #11 192.168.224.13
Domain #12 192.168.224.14
Domain #13 192.168.224.15
Domain #14 192.168.224.16
Domain #15 192.168.224.17
Domain #16 192.168.224.18
Domain #17 192.168.224.19
Domain #18 192.168.224.20
Domain #19 192.168.224.21
Domain #20 192.168.224.22
Domain #21 192.168.224.23
Domain #22 192.168.224.24
Domain #23 192.168.224.25
To enable the internal network nic sppp0 in a domain:
svcadm enable svc:/platform/sun4u/dscp:default
To enable the dynamic reconfiguration in a domain:
svcadm enable svc:/platform/sun4u/dcs:default
See the sppp0 nic with the address
sppp0: flags=10010008d1 mtu 1500 index 8
inet 192.168.224.6 –> 192.168.224.1 netmask ffffff00
ether 0:0:0:0:0:0
a test to see if communication is ok, from the XSCF run:
XSCF> showdevices -d 0
pull a proxy port to this server
you can run a non interactive ssh session and pull it to the local host, leave the tunnel running in the background
nohup ssh -g -L 8080:localhost:8080 root@jump -N &
save tsm pasword
to let the tsm client save its password you can add this option to /opt/tivoli/tsm/client/ba/bin/dsm.sys:
PASSWORDACCESS generate
Remove disks from vxvm control in a m9000 for dynamic reconfig
If when you want to remove a XSB from a domain you get the message that the OS disks are being used by VxVM, and you know they’re not:
XSCF> deleteboard -c disconnect 09-0 XSB#09-0 will be unconfigured from domain immediately. Continue?[y|n] :y Start unconfiguring XSB from domain. Resource Information ------------------ ------------------------- /dev/dsk/c1t0d0s2 Device being used by VxVM /dev/dsk/c1t1d0s2 Device being used by VxVM XSB#09-0 could not be unconfigured from DomainID 2 due to operating system error.
The message “Device being used by VxVM” can be a bit misleading. They are not in use by VxVM, they’re in use by VxDMP!!!!
To remove this dependency you need to remove them from dmp by doing something like:
vxdisk -o alldgs list | egrep '^c0|^c1' | awk '{ print $1 }' | while read d;do vxdmpadm -f disable path=$d; done
After this you can remove the XSB using “deleteboard -c disconnect” without the “device being used by vxvm” error message ![]()
Produce tcpdump output in pcap format
tcpdump -i bond0 -w tcpdump_`uname -n`_`date +%d_%m_%H_%M_%S_%Y`.pcap
run a xscf snapshot over ssh
snapshot -LF -t rdircio@10.80.120.58:/data -k download
Dell omreport disk status
[root@myserver tmp]# omreport storage controller Controller PERC H710P Mini (Embedded) Controllers ID : 0 Status : Ok Name : PERC H710P Mini Slot ID : Embedded State : Ready Firmware Version : 21.2.0-0007 Minimum Required Firmware Version : Not Applicable Driver Version : 00.00.06.14-rh1 Minimum Required Driver Version : Not Applicable Storport Driver Version : Not Applicable Minimum Required Storport Driver Version : Not Applicable Number of Connectors : 1 Rebuild Rate : 30% BGI Rate : 30% Check Consistency Rate : 30% Reconstruct Rate : 30% Alarm State : Not Applicable Cluster Mode : Not Applicable SCSI Initiator ID : Not Applicable Cache Memory Size : 1024 MB Patrol Read Mode : Auto Patrol Read State : Stopped Patrol Read Rate : 30% Patrol Read Iterations : 18 Abort Check Consistency on Error : Disabled Allow Revertible Hot Spare and Replace Member : Enabled Load Balance : Not Applicable Auto Replace Member on Predictive Failure : Disabled Redundant Path view : Not Applicable CacheCade Capable : Yes Persistent Hot Spare : Disabled Encryption Capable : Yes Encryption Key Present : No Encryption Mode : None Preserved Cache : No Spin Down Unconfigured Drives : Disabled Spin Down Hot Spares : Disabled Spin Down Configured Drives : Disabled Automatic Disk Power Saving (Idle C) : Disabled Time Interval for Spin Down (in Minutes) : Not Applicable Start Time (HH:MM) : Not Applicable [root@myserver tmp]# omreport storage vdisk controller=0 Virtual Disk 0 on Controller PERC H710P Mini (Embedded) Controller PERC H710P Mini (Embedded) ID : 0 Status : Ok Name : Virtual Disk 0 State : Ready Hot Spare Policy violated : Not Assigned Encrypted : No Layout : RAID-1 Size : 278.88 GB (299439751168 bytes) Device Name : /dev/sda Bus Protocol : SAS Media : HDD Read Policy : Adaptive Read Ahead Write Policy : Write Back Cache Policy : Not Applicable Stripe Element Size : 64 KB Disk Cache Policy : Disabled