omreport -?
用途:列出帮助
omreport storage controller
用途:查Raid controller model, cache memory size等
pathlookup() { | |
# a basedir aware 'type -P' (or which) for executables | |
# $1: binary to find | |
local path= | |
local -a paths= | |
IFS=: read -r -a paths <<< "$PATH" | |
for path in "${paths[@]}"; do |
auto_modules() { | |
# Perform auto detection of modules via sysfs. | |
local mods= | |
IFS=$'\n' read -rd '' -a mods < \ | |
<(find /sys/devices -name modalias -exec sort -u {} + | | |
# delimit each input by a newline, expanded in place | |
xargs -d $'\n' modprobe -d "$BASEDIR" -aRS "$KERNELVERSION" | | |
sort -u) |
set nocompatible | |
set autoindent | |
set smartindent | |
set cindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set cinoptions=(0,:0,l1,t0 | |
filetype plugin indent on | |
au FileType make setlocal noexpandtab |
function main(cmd) | |
local f = assert(io.popen(cmd, 'r')) | |
--local f = assert(io.open('a', 'r')) | |
local cur_station = '' | |
local result = {} | |
for line in f:lines() do | |
fst_char = string.sub(line, 0, 1) | |
if fst_char == "S" then |
#!/bin/bash | |
additional_strace_args="$1" | |
MASTER_PID=$(ps auwx | grep php-fpm | grep -v grep | grep 'master process' | cut -d ' ' -f 6) | |
while read -r pid; | |
do | |
if [[ $pid != $MASTER_PID ]]; then | |
nohup strace -r -p "$pid" $additional_strace_args >"$pid.trc" 2>&1 & |
(( $(curl -I facebook.com 2>/dev/null | grep -c X-FB-Debug) )) && echo 'succeed' || echo 'failed' |
syntax on | |
set tag=~/tags | |
autocmd! BufNewFile,BufReadPre,FileReadPre *.rb set nu et ts=2 sw=2 | |
autocmd! BufNewFile,BufReadPre,FileReadPre *.coffee so ~/.vim/ftplugin/coffee.vim |
#!/bin/bash | |
[[ $# -lt 2 ]] && exit 1 | |
DEV="$1" | |
OUTDIR="$2" | |
[[ -d $OUTDIR ]] || mkdir -p $OUTDIR | |
BLOCK_SIZES="512 4K 8K 256K" |
#!/bin/bash | |
if [ $# -lt 2 ]; then | |
echo "usage:$0 dev output_dir" | |
exit 1 | |
fi | |
DEV="$1" | |
OUTDIR="$2" | |
DATASIZE="500" # in MB |
omreport -?
用途:列出帮助
omreport storage controller
用途:查Raid controller model, cache memory size等