Aspersa User's Manual
The summary tool
Aspersa Manual › The summary tool
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:

ControllerDetected?Status/Config?
LSI Logic MegaRAID SASYY
Fusion-MPT SAS Y
AACRAID YY
HP Smart Array YY
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.