常用命令集 发表于 2016-11-30 | 分类于 常用 java统计服务线程状态123jstack <pid> > dump_pid.dumpgrep "java.lang.Thread.State" dump_pid.dump | awk '{print $2$3$4$5}' | sort | uniq -c 查找大文件1find . -type f -size +200M -print0 | xargs -0 du -h | sort -nr 常用tcpdump头1tcpdump -i eth1 -XlAs0 -vnn 'dst port 8000' 清除大文件123456789101112#!/bin/shfiles=`find . -type f -size +200M -print0 | xargs -0 du -h | sort -nr | awk '{print$2}'`#echo $filesfor i in $files;do echo $i > $i;done 查看进程占用123456ps -p <pid> -L -o pcpu,pid,tid,time,tname,cmd ps -p <pid> -Lfwatch -n 2 'ps -p 32270 -Lf'watch -n 2 'ps -p 10948 -Lo pcpu,pid,tid,time,tname,cmd ' to be continued.