shell-100主要是用于练习! #!/bin/bash # 统计内存的使用量(这里用ps统计) # 第一步:不打印第一行,这里的sed ‘1d’ 去掉 for n in `ps aux |sed '1d'` # 第二步:获取内存那一列的数值 # 第三步:最后用循环相加! sum= for n in `ps aux |sed '1d'|awk '{print $6}'` do sum=$[$sum+$n] done # 知识点:for循环,sum的函数相加!比如1-100的相加 # 简单的
polysh简介 polysh 是一个交互式命令,可以在一台服务器上批量的对一批服务器进行处理,运行交互式命令.官方的简介如下: Polysh is a tool to aggregate several remote shells into one. Itis used to launch an interactive remote shellon many machines at once. It is written in Python and requires Python ≥ 2.4.
近期,公司线上tomcat常常无缘无辜宕机.总结了一下定位问题的方法,仅供參考: 报错信息: Maximum number of threads (200) created for connector with address null and port 9443 # There is insufficient memory for the Java Runtime Environment to continue. # Cannot create GC thread. Out of system