Linux System check in 60 seconds
$uptime
The current time,
how long the system has been running, how many users are currently logged on,
and the system load averages for the past 1, 5, and 15 minutes.
$dmesg | tail
dmesg is used to
examine or control the kernel ring buffer.
The default action
is to display all messages from the kernel ring buffer.
$vmstat 1
vmstat reports information about processes,
memory, paging, block IO, traps, disks and cpu activity.
$mpstat -P ALL 1
The mpstat command
writes to standard output activities for each available processor, processor 0
being the first one. Global average
activities among all processors are also reported. The mpstat com‐
mand can be used both on SMP and UP
machines, but in the latter, only global average activities will be printed. If
no activity has been selected, then the default report is the CPU utilization
report.
$pidstat 1
The pidstat command is used for monitoring
individual tasks currently being managed by the Linux kernel. It writes to standard output activities for
every task selected with option -p or for every task
managed
by the Linux kernel if option -p ALL has been used.
Not selecting any tasks is equivalent to specifying -p ALL but only active
tasks (tasks with non-zero statistics values) will appear in the
report.
$iostat -xz 1
The iostat command is used for monitoring
system input/output device loading by observing the time the devices are active
in relation to their average transfer
rates. The iostat
command generates
reports that can be used to change
system configuration to better balance the input/output load between physical
disks.
$free -m
free displays
the total amount of free and used
physical and swap memory in the system, as well as the buffers and caches used
by the kernel. The information is gathered by parsing /proc/meminfo.
$sar -n DEV 1
$sar -n TCP,ETCP 1
The sar command writes to standard output the
contents of selected cumulative activity counters in the operating system. The
accounting system, based on the values in the count and interval parameters,
writes information the specified number
of times spaced at the specified intervals in seconds. If the interval parameter is set to zero, the
sar command displays the average
statistics for the
time
since
the system was started. If the interval parameter is specified without
the count parameter, then reports are generated continuously. The collected data can also be saved in the
file specified by
the -o filename flag, in addition to
being displayed onto the screen. If filename is omitted, sar uses the standard
system activity daily data file (see below).
By default all the data
available from
the kernel are saved in the data file.