from: http://aspersa.googlecode.com/svn/html/summary.html
svn checkout http://aspersa.googlecode.com/svn/trunk
# Download and run:
wget http://aspersa.googlecode.com/svn/trunk/summary
bash summary
------------------------
The
summary
tool is a convenient way to summarize the status and configuration of a server, so that you can learn about it at a glance. It is not a tuning tool or diagnosis tool; expert humans are better at that. It produces a report that is easy to 'diff,' and can be pasted into emails without losing the formatting. This tool works well on Linux at this time; other Unix-like operating systems might be supported later.
Command-Line Options and Environment Variables
There are no command-line options. The tool uses environment variables instead of command-line options, because it supports a one-step method of execution that prevents command-line options from working. The ASPERSA_SKIP environment variable can be used to disable specific sections of the tool. This environment variable is a comma-separated list of any or all of the following values: MOUNT,NETWORK,PROCESS. See below for how these affect the output.
How it Works
This tool runs a large variety of commands to inspect system status and configuration, saves the output into files in /tmp, and then runs Unix commands on these results to format them nicely. It works best when executed as a privileged user, but will also work without privileges, although some output might not be possible to generate without root.
Example Usage
This tool can be run one of two different ways:
# Download and run:
wget http://aspersa.googlecode.com/svn/trunk/summary
bash summary
# Or, download and run in a single step:
wget -O- http://aspersa.googlecode.com/svn/trunk/summary | bash
The following is a sample report from the
summary
tool. Each section is followed by explanatory text.
# Aspersa System Summary Report ##############################
Date | 2010-09-22 18:11:34 UTC (local TZ: PDT -0700)
Hostname | server1
Uptime | 14 days, 22:08, 1 user, load average: 0.00, 0.00, 0.00
System | Dell Inc.; PowerEdge R610; vNot Specified ()
Service Tag | B0ZNVH8
Release | CentOS release 5.2 (Final)
Kernel | 2.6.18-92.1.22.el5
Architecture | CPU = 64-bit, OS = 64-bit
Threading | NPTL 2.5
Compiler | GNU CC version 4.1.2 20071124 (Red Hat 4.1.2-42).
SELinux | Disabled
Virtualized | No virtualization detected
The first section shows the current date and time, and a synopsis of the server and operating system.
# Processor ##################################################
Processors | physical = 2, cores = 8, virtual = 16, hyperthreading = yes
Speeds | 16x2261.089
Models | 16xIntel(R) Xeon(R) CPU E5520 @ 2.27GHz
Caches | 16x8192 KB
This section is derived from /proc/cpuinfo.
# Memory #####################################################
Total | 31.42G
Free | 447.26M
Used | physical = 30.99G, swap = 288.00k, virtual = 30.99G
Buffers | 141.09M
Caches | 23.52G
Dirty | 4280 kB
Used | 6.82G
Swappiness | vm.swappiness = 0
DirtyPolicy | vm.dirty_ratio = 40, vm.dirty_background_ratio = 10
Locator Size Speed Form Factor Type Type Detail
========= ======== ================= ============= ============= ===========
DIMM_A2 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
DIMM_A3 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
DIMM_A5 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
DIMM_A6 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
DIMM_B2 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
DIMM_B3 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
DIMM_B5 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
DIMM_B6 4096 MB 1066 MHz (0.9 ns) DIMM {OUT OF SPEC} Synchronous
DIMM_A1 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
DIMM_A4 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
DIMM_B1 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
DIMM_B4 {EMPTY} Unknown DIMM {OUT OF SPEC} Synchronous
Information about memory is gathered from
free
. The
Used
statistic is the total of the rss sizes displayed by
ps
. The Dirty statistic for the cached value comes from /proc/meminfo. On Linux, the swappiness settings are gathered from
sysctl
. The final portion of this section is a table of the DIMMs, which comes from
dmidecode
.
# Mounted Filesystems ########################################
Filesystem Size Used Type Opts Mountpoint
/dev/mapper/VolGroup00-LogVol00 62G 56% ext3 (rw) /
/dev/mapper/VolGroup01-MySQLData00 67G 20% ext3 (rw) /var/lib/mysql
/dev/sda2 190M 11% ext3 (rw) /boot
tmpfs 7.9G 0% tmpfs (rw) /dev/shm
The mounted filesystem section is a combination of information from
mount
and
df
. If the ASPERSA_SKIP environment variable includes "MOUNT", then this section is skipped.
# Disk Schedulers And Queue Size #############################
sda | [cfq] 128
sdb | [cfq] 128
sr0 | [cfq] 128
The disk scheduler information is extracted from the /sys filesystem in Linux.
# Disk Partioning ############################################
Device Type Start End Size
============ ==== ========== ========== ==================
/dev/sda Disk 299439751168
/dev/sda1 Part 1 13 98703360
/dev/sda2 Part 14 36404 299317939200
/dev/sdb Disk 429523992576
/dev/sdb1 Part 1 52219 429507671040
Information about disk partitioning comes from
fdisk -l
.
# Kernel Inode State #########################################
dentry-state | 52867 47869 45 0 0 0
file-nr | 3570 0 3211611
inode-nr | 42968 59
These lines are from the files of the same name in the /proc/sys/fs directory on Linux. Read
man proc
to learn about the meaning of these files on your system.
# LVM Volumes ################################################
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
LogVol00 VolGroup00 -wi-ao 269.00G
LogVol01 VolGroup00 -wi-ao 9.75G
This section shows the output of
lvs
.
# RAID Controller ############################################
Controller | Fusion-MPT SAS
The
summary
tool can detect a variety of RAID controllers by examining
lspci
and
dmesg
information. If the controller software is installed on the system, in many cases it is able to execute status commands and show a summary of the RAID controller's status and configuration:
Controller
Detected?
Status/Config?
LSI Logic MegaRAID SAS |
Y |
Y |
Fusion-MPT SAS |
Y |
|
AACRAID |
Y |
Y |
HP Smart Array |
Y |
Y |
3Ware |
Y |
|
If your RAID controller is not supported, please contribute information about it so we can add support for it to this tool.
# Network Config #############################################
Controller | Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
Controller | Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
Controller | Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
Controller | Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
FIN Timeout | net.ipv4.tcp_fin_timeout = 60
Port Range | net.ipv4.ip_local_port_range = 32768 61000
The network controllers attached to the system are detected from
lspci
. The TCP/IP protocol configuration parameters are extracted from
sysctl
. If the ASPERSA_SKIP environment variable includes "NETWORK", then this section is skipped.
# Interface Statistics #######################################
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
========= ========= ========== ========== ========== ========== ==========
lo 1608579960 14405424 0 1608579960 14405424 0
eth0 148784272 307574175 0 2642073200 343143727 0
eth1 0 0 0 0 0 0
eth2 0 0 0 0 0 0
eth3 0 0 0 0 0 0
Interface statistics are gathered from
ip -s link
. The columns are received and transmitted bytes, packets, and errors. If the ASPERSA_SKIP environment variable includes "NETWORK", then this section is skipped.
# Network Connections ########################################
Connections from remote IP addresses
10.1.12.30 1
10.1.202.243 6
74.125.127.82 1
Connections to local IP addresses
10.1.251.31 8
Connections to top 10 local ports
22 1
32832 1
38709 1
40537 1
52169 1
58109 1
807 1
976 1
States of connections
ESTABLISHED 2
LISTEN 10
TIME_WAIT 6
This section shows a summary of network connections, retrieved from
netstat
and
fuzzy-rounded
. There are two sub-sections showing how many connections there are per origin and destination IP address, and a sub-section showing the count of ports in use. In this case, none of the ports has a count greater than 1, but in examples such as MySQL or web servers, you will see many incoming connections to a single port. Finally, the section ends with the count of the network connetions' states. If the ASPERSA_SKIP environment variable includes "NETWORK", then this section is skipped.
# Top Processes ##############################################
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 15 0 10332 700 588 S 0 0.0 0:03.05 init
2 root RT -5 0 0 0 S 0 0.0 0:00.03 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0
4 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/0
5 root RT -5 0 0 0 S 0 0.0 0:00.27 migration/1
6 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
7 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/1
8 root RT -5 0 0 0 S 0 0.0 0:00.01 migration/2
9 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/2
This section is just the top few lines of
top
so that you can see what processes are actively using CPU time. If the ASPERSA_SKIP environment variable includes "PROCESS", then this section is skipped.
# Simplified and fuzzy rounded vmstat (wait please) ##########
procs ---swap-- -----io---- ---system---- --------cpu--------
r b si so bi bo ir cs us sy il wa st
0 0 0 0 8 10 125 175 2 1 100 1 0
1 0 0 0 0 0 90 100 0 0 100 0 0
1 0 0 0 0 50 225 250 1 1 100 3 0
0 0 0 0 0 0 60 100 0 0 100 0 0
1 0 0 0 0 0 225 250 1 1 100 0 0
# The End ####################################################
This section is a trimmed-down sample of
vmstat 1 5
, so you can see the general status of the system at present. The values in the table are
fuzzy-rounded
, except for the CPU columns. If the ASPERSA_SKIP environment variable includes "PROCESS", then this section is skipped.
分享到:
相关推荐
高效Linux工具使用 • Part 1: Overview and Logistics • Part 2: Basics • Part 3: Streams, pipe and redirection • Part 4: Classic Tools: find, grep, awk, sed • Part 5: Session Management: tmux • ...
- **Selecting the Backup Tool**: Recommends tools for different backup needs. - **Simple Backups**: Explains basic backup techniques using tools like `tar`. - **Multilevel Backups**: Describes more ...
* --leak-check=no|summary|full:搜索内存泄露的方式 * --leak-resolution=low|med|high:内存泄露检测的精度 * --show-reachable=no|yes:是否显示可达的块 * --undef-value-errors=no|yes:是否检测未定义的值...
Summary of CGAL's Configuration Variables gives information about which CMake variables can be used to help resolve missing dependencies while using the cmake command line tool. Building CGAL ...
"COLSUM"这个名字很可能来源于“Column Summary”的缩写,表明其核心功能是对列数据进行汇总。这款工具可能提供了诸如求和、平均值、最大值、最小值等统计计算,同时也可能支持自定义函数和复杂的数学运算。由于它是...
Valgrind是一款广泛应用于Linux下的内存调试工具,主要用于帮助开发者发现程序中的内存泄漏、内存访问错误等问题。它通过模拟程序运行过程中的内存操作,从而定位潜在的问题。Valgrind支持多种工具,包括Memcheck、...
PHPMaker is a powerful automation tool that can generate a full set of PHP scripts quickly from MySQL, PostgreSQL, Microsoft Access, Microsoft SQL Server, Oracle and SQLite databases. Using PHPMaker ...
博客访问地址: 或者直接打开_posts目录下的markdown文件 模板来源: Jekyll theme by ...profile_tool_summary系统分析工具总结 simple_ip_stack简单的IP协议栈的实现 linux_timerLinux平台定时器的用法
If you are using the nmon2rrd or nmon Analyser, please also check these tool accept the new data files generated by nmon 11. Please feedback any problems to the developer Nigel Griffiths at nag@uk....
Tcl (Tool Command Language) 是一种非常灵活且强大的脚本语言,而Tk则是用于创建图形用户界面的工具包。通过学习本书,读者将能够掌握Tcl/Tk的基本概念、语法以及高级技巧。 #### 描述:不错的一个关于介绍Tcl/Tk...
==6742== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 12 from 1) ==6742== malloc/free: in use at exit: 40 bytes in 1 blocks. ==6742== malloc/free: 1 allocs, 0 frees, 40 bytes allocated. ``` #...
Summary of changes for version 20061109: 1) ACPI CA Core Subsystem: Optimized the Load ASL operator in the case where the source operand is an operation region. Simply map the operation region ...
- 功能:pt-diskstats 是一个用于监控 Linux 系统磁盘 I/O 统计的交互式工具。它类似于 iostat,但提供更详细的信息。 - 用法:`pt-diskstats` 可以用来查看所有磁盘或指定磁盘的状态。例如,`pt-diskstats` 显示...
- **Using a Shebang Line on Unix/Linux:** For Unix/Linux users, the book explains how to use the shebang line (`#!/usr/bin/env ruby`) at the beginning of a Ruby script file. This line tells the system...
6 5 6 TOOL:应用程序或工具名字的SDES数据项(TOOL: Application or Tool Name SDES Item) 6 5 7 NOTE:通知/状态的SDES数据项(NOTE: Notice/Status SDES Item) 6 5 8 PRIV:私有扩展的SDES数据项(PRIV: ...
##### 1.5.3 设置差异工具(Your Diff Tool) Git内置了一个基本的差异查看工具,但对于更复杂的比较需求,可以设置外部差异查看工具。 ##### 1.5.4 检查设置(Checking Your Settings) 可以通过`git config --...
#### Tool Interface Standards (TIS) **ELF**, or **Executable and Linkable Format**, is a standard file format used for executables, object code, shared libraries, and core dumps. It was originally ...
In summary, the UPnP Programming Guide for the Linux SDK for UPnP Devices version 1.4 is a comprehensive resource for developers looking to build applications that interact with UPnP devices....