免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2352 | 回复: 4
打印 上一主题 下一主题

script to generate system configuration info [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-30 17:53 |只看该作者 |倒序浏览
#!/bin/sh
#
# script to generate system configuration info
#
echo "Number and speed of CPUs"
echo "------------------------"
/usr/sbin/psrinfo -v

# echo "Memory and device tree information"
# echo "----------------------------------"
# /usr/sbin/prtconf

echo "CPU,Cache,Brd,Memory,Sbus slot info "
echo "------------------------------------"
/usr/platform/`uname -i`/sbin/prtdiag


echo "Solaris HW release info in /etc/system"
echo "--------------------------------------"
cat /etc/release

echo "Install Patch info. "
echo "---------------------"
# trim the output line
#/usr/bin/showrev -p
/usr/bin/showrev
/usr/bin/showrev -p | cut -b1-256 | grep "^Patch" | awk '{print $2}'

echo "kernel parameter Info."
echo "---------------------"
echo "You do not need all info from sysdef, ignore most of the device"
echo "tree info in below. Most useful info start from the session"
echo "from System Configuration section, other dev tree info is not necessary"
/usr/sbin/sysdef

echo "Swap partition Info."
echo "---------------------"
/usr/sbin/swap -l

echo "Installed packages"
echo "---------------------"
echo "* You don't really need this to be in the report, too much datahere * "
/usr/bin/pkginfo


echo "System uptime brief"
echo "--------------------"
/usr/bin/w

论坛徽章:
0
2 [报告]
发表于 2008-06-02 11:24 |只看该作者
顶一下,收藏了。

论坛徽章:
0
3 [报告]
发表于 2008-06-02 15:01 |只看该作者
总结的不错

论坛徽章:
0
4 [报告]
发表于 2008-06-02 22:19 |只看该作者
good job. Do you also know that Sun has an explore package SUNWexplo that can collect very detailed information about the system? Normally when you call support, the first thing they ask you to do is to run the explore script and send the result to them.

论坛徽章:
0
5 [报告]
发表于 2008-06-03 00:13 |只看该作者
类似的脚本以前也写过,不过比这个好要复杂,可以在一台机器上对全网的硬软件基本信息进行管理加告警的。SUNWexplo 习惯是用于故障之后收集信息的,但不能很直观的看到一些系统错误
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP