https://item.jd.com/1179011.html 读速度: 60MB/s 写速度 …
作者存档:phpor
linux 下载工具之 aria
有一种文件下载方式为: 把知道的下载源都组织到一个文件中(metalink,扩展名 meta4),这些下载源可 …
多台机器上批量执行ssh命令的小脚本
脚本:
1 2 3 4 5 6 7 8 9 10 |
#!/bin/bash #name mssh.sh #usage: ./mssh.sh host-1 host-2 host-3 'cmd' cmd="${@: -1}" #取最后一个参数,这里冒号后面的空格不能省略 hosts=("$@") for ((i=0; i < $# - 1; i++)) ;do host=${hosts[$i]} echo "#@$host" echo ssh $host "$cmd" done |
用法: [crayon …
关于nsenter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# nsenter -h 用法: nsenter [options] <program> [<argument>...] Run a program with namespaces of other processes. 选项: -t, --target <pid> 要获取名字空间的目标进程 -m, --mount[=<file>] enter mount namespace -u, --uts[=<file>] enter UTS namespace (hostname etc) -i, --ipc[=<file>] enter System V IPC namespace -n, --net[=<file>] enter network namespace -p, --pid[=<file>] enter pid namespace -U, --user[=<file>] enter user namespace -S, --setuid <uid> set uid in entered namespace -G, --setgid <gid> set gid in entered namespace --preserve-credentials do not touch uids or gids -r, --root[=<dir>] set the root directory -w, --wd[=<dir>] set the working directory -F, --no-fork 执行 <程序> 前不 fork -Z, --follow-context set SELinux context according to --target PID -h, --help 显示此帮助并退出 -V, --version 输出版本信息并退出 更多信息请参阅 nsenter(1)。 |
从 help 来看,只要使用了 -p 选项, …
syslog协议之PRI解析
syslog协议的第一部分是尖括号引用的一个数字,如: <182> 该数字大小范围为: 0 ~ 2 …
存储协议栈
参考: http://brasstacksblog.typepad.com/brass-tacks/ http …
diff by size
1 |
# diff <(cd /data1/weedfs/volume4.2; find . -type f -printf "%p %s\n" ) <(cd /mnt/weedfs/volume4.2; find . -type f -printf "%p %s\n" ) |
参考: http://stac …
不需要临时文件的diff
diff 可以比较两个文件,那么能否比较两个字符串呢(主要是懒得创建文件),其实是可以的,如: 不仅仅diff …
关于pagecache
http://mp.weixin.qq.com/s/qIYbLiOpi8PuLGU0w709Cg
ceph osd 操作
ceph osd down $id: 将osd $id 标记为down(mark down),达到不再访问的 …