This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat servers.csv | cut -d, -f3 | grep -v "@" | grep "^\"" | grep "oracle.com" | sed 's/"//g' | while read domain;do elasp=`ping -c 1 $domain 2>/dev/null | grep -o " time=.* ms" | egrep -o "[0-9]{1,4}"`;[[ -n $elasp ]] && echo "$domain $elasp";done | tee xxx.log | |
cat xxx.log | sort -k2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[[ $# -lt 1 ]] && echo "Pleasee give the conf name, not need the suffix(.conf)!" && exit | |
[[ -n $1 ]] && path=$1 && conf=.$1.conf | |
if [ -e $conf ];then | |
old_no=`cat $conf` | |
curr_no=$(( $old_no + 1 )) | |
else | |
old_no=0 | |
curr_no=1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modprobe scsi_debug max_luns=2 num_tgts=7 add_host=3 | |
lsscsi -s | |
sdparm -i /dev/sdc | |
/sys/bus/pseudo/drivers/scsi_debug/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tcpdump filter for HTTP GET | |
tcpdump -s 0 -A 'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420' -i wlan0 | |
# tcpdump filter for HTTP POST | |
tcpdump -s 0 -A 'tcp dst port 80 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)' -i wlan0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/sbin/dtrace -q -o graph.in -s | |
/* | |
* dot -T jpg -o callgraph.jpg graph.in | |
*/ | |
pid$1:::entry | |
{ | |
@call_stats[ufunc(ucaller), strjoin(strjoin(probemod,"`"), probefunc)] = count(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mpathadm list mpath-support | |
mpathadm show mpath-support libmpscsi_vhci.so | |
mpathadm list initiator-port | |
mpathadm show initiator-port iqn.1986-03.com.sun:01:00144fd4df78.55e515ac,4000002a00ff | |
mpathadm show initiator-port 10000000c957a469 | |
mpathadm show initiator-port w500605b0061047f0 | |
mpathadm show initiator-port 2101001b32290c3a | |
mpathadm list logical-unit | |
mpathadm show logical-unit /dev/rdsk/c0t600A0B800026D63A00001CE75565EFBEd0s2 | |
mpathadm failover logical-unit /dev/rdsk/c0t600A0B800026D63A00001CE75565EFBEd0s2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
arch="" | |
if [[ `uname -i` = "i86pc" ]];then | |
arch="i386" | |
else | |
arch="sparc" | |
fi | |
echo "Arch: $arch" | |
echo "+ +" > /root/.rhosts | |
svcadm enable svc:/network/login:rlogin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {1..9}; do dd if=/dev/zero of=/tmp/file$i bs=1G count=1 &> /dev/null; done | |
zpool create tank raidz1 /tmp/file1 /tmp/file2 /tmp/file3 raidz1 /tmp/file4 /tmp/file5 /tmp/file6 raidz1 /tmp/file7 /tmp/file8 /tmp/file9 | |
zfs set compression=lz4 tank/log | |
root@hotcat:/tank# zfs get compressratio tank/test tank/log | |
NAME PROPERTY VALUE SOURCE | |
tank/log compressratio 2.44x - | |
tank/test compressratio 1.00x - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {1..4}; do dd if=/dev/zero of=/tmp/file$i bs=1G count=1 &> /dev/null; done | |
for i in {1..4}; do losetup loop$i /tmp/file$i; done | |
mdadm -C /dev/md0 -l 0 -n 4 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 | |
pvcreate /dev/md0 | |
vgcreate tank /dev/md0 | |
lvcreate -l 100%FREE -n videos tank | |
mkfs.ext4 /dev/tank/videos | |
mkdir -p /tmp/tank/videos | |
mount -t ext4 /dev/tank/videos /tmp/tank/videos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/sbin/dtrace -s | |
#pragma D option flowindent | |
::$1:entry | |
{ | |
stack(); | |
self->in = 1; | |
/*printf("args[0]=%d args[1]=%d args[2]=%d",args[0], args[1], args[2]);*/ | |
} |