#!/bin/bash
CPU=cat /proc/cpuinfo | grep process | wc -l
MEM=free -g | grep -i mem | awk '{print $2}'
JBS1=ulimit -n
JBS2=cat /proc/sys/fs/file-max
NET=cat /etc/sysctl.conf | grep net.nf_conntrack_max | awk '{print $3}'
echo ‘逻辑处理器数: ‘$CPU”
echo ‘内存大小: ‘$MEM”
echo ‘进程级别最大文件句柄数:’$JBS1”
echo ‘系统级别最大文件句柄数:’$JBS2”
echo ‘内核参数:’$NET”
echo ‘硬盘情况:’
df -h | sed 1d | grep -v tmpfs | awk ‘{print $6″\t”$2}’