Previous page

Next page

Locate page in Contents

Print this page

pstat

This utility is for real-time monitoring in Parallels Server Bare Metal. It displays the status and load of the system pertaining to its disk, network, CPU, and memory (including swap) parameters, updating this status with the preset time interval. It also provides a list of running virtual machines and Containers together with their resources consumption statistics, and can sort this list by a number of parameters. The utility has an interactive interface for setting the mode of displaying the information.

The syntax of the pstat utility is the following:

pstat [-l] [-d X] [-p CT_ID ] [-b|-v] [-t] [-a]

Here is the description of the command-line parameters:

-l

Print information once and exit immediately.

-d

Specify the delay between screen updates. Can be changed on the fly by the t interactive command. Default is 1 sec.

-p

Monitor only Containers with the specified CT_IDs . This flag can be given up to twenty times, in form -p CT_ID 1 -p CT_ID 2 .... This option is not available interactively.

-b

"Brief" mode. Minimal details level. Shows only one summary line about each monitoring subsystem. By default, "standard" details level is in use. Valid levels are "brief", "standard" and "verbose". Can be set on the fly by the b interactive command. See also the -v command-line option and s and v interactive commands.

-v

"Verbose" mode. Provides maximum details about all monitored subsystems. Can be set on the fly by the v interactive command. See also the -b command-line option and b and s interactive commands.

-t

Text mode, provides information once. It is printed in terse form, suitable for parsing by other programs. All output data are not aligned and numbers are not in a human readable format. In the text mode, there are no colors in the output and only the top 10 Containers sorted by their CPU usage are shown.

-a

Display the current disk input and output (I/O) statistics for virtual machines and Containers.

-i

Display the IO accounting information for virtual machines and Containers.

-m

Display disc statistics for all file system types. By default, the statistics is shown for ext2, ext3, ext4, and reiserfs.

-o

Filter the output by the specified parameters. You can specify multiple parameters and separate them by commas. The list of available parameters is given below.

-O

Filter the output by the specified parameters. Unlike the -o option, the produced output already contains some default columns (for example, Container ID and IP address). The list of available parameters is given below.

-n

Display network statistics.

-s

Filter the output by the specified keys. The list of available parameters is given below.

-c

Display I/O statistics in the specified units of measurement: B (bytes), K (kilobytes), M (megabytes), or G (gigabytes).

pstat can display the following information:

Type of Information

Description

Example

Toggling by

Uptime

This line displays the time for which the system has been up, and three "load averages" for the system. The load averages are the average number of processes ready to run during the last 1, 5, and 15 minutes. This line is just like the output of uptime(1).

1:22am, up 1:31, 2 users, load average: 0.00, 0.06, 0.33

l

Containers and processes

Total number of virtual machines and Containers and processes running at the time of the last update. The output is also broken down into the number of tasks which are running, sleeping, uninterruptable, zombie, or stopped.

CTNum 102, procs 467: running 12, sleeping 455, unint 0, zombie 0, stopped 0

p

CPU states

Shows the percentage of CPU time used by all virtual machines and Containers and by the server (shown as CT0 ), the CPU time spent in the user mode, in the system mode, and being idle, and the maximal/average scheduling latency in ms. The scheduling latency is the time spent by the processes in the system awaiting for scheduling.

CPU [ OK ]: CTs 43%, CT0 12%, user 41%, sys 13%, idle 45%, lat(ms) 3/2

c

Mem

Statistics on the memory usage, including the total available memory, free memory, and maximal/average memory allocation latency. The free memory is displayed both for the low and high memory. The low memory is the sum of the DMA and Normal zones memory and the high memory is the High zone memory. Memory allocation latency is the time required to allocate memory inside the kernel in ms. An excessive allocation latency can be a sign of server's overload.

Mem [ OK ]: total 755MB, free 671MB/0MB (low/high), lat(ms) 10/7.

m, M

Memory zones information

Information on the memory zones state. This information includes: the total size of the memory zone in MB, the size of active and inactive lists, of the free memory and zone limits.

ZONE1 (Normal): size 752MB, act 29MB, inact 31MB, free 658MB (0/1/2)

m, M

Memory zones fragmentation

Information on the memory zones fragmentation. This information describes how much system memory is fragmented and which is the biggest block size possible to allocate atomically. The first number before * is a number of blocks and the second is a block size in pages.

fragm 2*1 3*2 15*4 22*8 25*16 12*32 4*64 0*128 1*256 326*512".

m, M

Memory allocation latency

Memory allocation latency is an average time spent in the kernel memory allocator for different memory type requests. Any memory type is coded as XY, where X is A for GFP_ATOMIC, K for GFP_KERNEL and U for GFP_USER, and Y denotes the allocation request order, i.e. Y=0 for order=0 and 1 for order=1.

Mem lat (ms): A0 0, K0 0, U0 1, K1 3, U1 2

m, M

Slab cache information

Slab cache information includes: the total slab cache size/real cache size divided into the inode cache size, dentry cache size, buffer heads cache size and page beancounters cache size. The real cache size is the size to which the cache can be shrunk, i.e. it is always less than the total cache size.

Slab pages: 13MB/13MB (ino 8MB, de 1MB, bh 1MB, pb 0MB)

m, M

Swap

Statistics on the used swap space, including the total swap space, the available swap space and the speed of swap-in/swap-out activity in MB/s.

Swap [ OK ]: tot 1004MB, free 1004MB, in 0.000MB/s, out 0.000MB/s

w, W

Swap latency

Swap operations latency. This includes the swap-in count, the swap-in maximal/average latency in ms, the swap-out count, the swap-out maximal/average latency in ms, and the maximal/average CPU time spent for the swap-out.

Swap lat: si 0, 0/0 ms, so 0, 0/0 ms, 0/0 cpu ms

w, W

Swap cache

Swap cache information includes the number of addition, deletion, and find operations respecting the swap cache.

Swap cache: add 0, del 0, find 0/0

w, W

Network information

Network statistics summary includes the total incoming traffic speed in MB/s and incoming packets/s, and outgoing traffic speed in MB/s and outgoing packets/s.

Net [ OK ]: tot in 1.020MB/s 267pkt/s, out 0.001MB/s 1pkt/s

n, N

Network interface information

Provides the network statistics summary for a particular Ethernet interface, including its total incoming traffic speed in MB/s and incoming packets/s, and outgoing traffic speed in MB/s and outgoing packets/s.

eth0: in 0.000MB/s 3pkt/s, out 0.001MB/s 1pkt/s

n, N

Disks statistics

Disks statistics summary including the writing and reading activity in MB/s.

Disks [ OK ]: in 0.000MB/s, out 0.000MB/s

d, D

Mounted disks statistics

Information on the mounted disks such as their mount point, free space, and free inodes left on the device.

root(/) free: 3489MB(46%), 511077ino(52%)

d, D

Disk I/O statistics

Shows disk input and output statistics for virtual machines and Containers. The following statistics is displayed:

  • IOUSED% : the percentage of time the disks are used by the virtual machine or Container.
  • IOWAIT% : the percentage of time when at least one I/O transaction in the virtual machine or Container is waiting for being served.
  • IOSPEED : the current speed of disk I/O operations in the virtual machine or Container and the I/O limit set for this virtual machine or Container, if any. The value can be displayed in bytes, kilobytes, megabytes, or gigabytes per second, depending on the units you used to set the I/O limit.

IOUSED%

5.00

IOWAIT%

0.00

IOSPEED

2/100MB/s

A

Quite a number of single-key interactive commands can be used while pstat is running to change the way the utility displays information. The commands are not available if pstat runs with the -t or -l command-line option. These interactive commands are the following:

Key

Action

h, ?

Print a help screen.

space

Update display immediately.

q

Quit.

t

Change the delay between screen updates. You will be prompted to enter new delay time, in seconds. Entering 0 causes continuous updates. See also the -d command-line parameter.

b

Set the "brief" details level. See also the -b command-line parameter.

s

Set the "normal" details level.

v

Set the "verbose" details level. See also the -v command-line parameter.

a

"Averaged" mode. Monitoring parameters will be averaged through a minute. This includes: 1. Number of uninterruptable processes; 2. Scheduling max latency; 3. Memory allocation max latency; 4. Size of free/active/inactive memory; 5. Swap-in latency; 6. UBC fail-counters absolute values.

e

Toggle display of virtual machine and Container IP addresses/hostnames.

i

Toggle display of idle virtual machines and Containers.

l

Toggle display of load average.

p

Toggle display of processes statistics.

c

Toggle display of CPU usage statistics.

w

Toggle display of swap information.

m, M

Toggle/expand display of memory information. Each subsystem, including memory, network and disk has a number of verbosity levels. In the minimal level no information is displayed. Corresponding interactive lowercase key decreases verbosity level, the same key in uppercase increases it.

n, N

Toggle/expand display of network statistics.

A

Toggle display of disk input and output statistics for virtual machines and Containers.

I

Toggle display of input and output accounting for virtual machines and Containers.

X

Toggle display of network statistics for virtual machines and Containers.

d, D

Toggle/expand display of disk usage and activity information.

0

Toggle display of statistics for the server itself.

o

Sort key. You can use one of the following sort option keys:

n

Sort by Container ID

c

Sort by CPU usage

f

Sort by UBC failure counters

r

Sort by the number of running processes

p

Sort by the total number of processes

t

Sort by virtual machine or Container status. virtual machines and Containers which probably are unusable or unstable (increasing UBC failure counters or very high scheduling latency) will be shown first.

s

Sort by the number of open sockets

m

Sort by memory latency

v

Sort by virtual memory usage

k

Sort by kernel memory usage

You can use the following parameters with the -o , -O , and -s options to filter the information related to virtual machines and Containers:

Parameter Name

Column Name

Description

id

CTID

virtual machine or Container ID

st

ST

virtual machine or Container status.

vm

%VM

Virtual memory usage, in per cent of the total memory on the Node. It's displayed in the form of "actual usage/barrier". This parameter corresponds to the PHYSPAGES VSwap parameter.

km

%KM

Kernel memory usage, in per cent of the normal zone size. It's displayed in the form of "actual usage/barrier". This parameter corresponds to the kmemsize UBC parameter.

sw

%SW

Swap space usage, in per cent of the total swap space on the Node. It's displayed in the form of "actual usage/barrier". This parameter corresponds to the SWAPPAGES VSwap parameter.

proc

PROC

Process information. It's displayed in the form of "running processes/total processes/barrier".

cpu

CPU

CPU usage. It's displayed in the form of "actual CPU usage/guaranteed PU usage".

If more than one processor is installed on the server, all processors are considered as 100%.

sock

SOCK

Sockets usage calculated as the sum of UBC numtcpsock and numothersock parameters. It's displayed in the form of "open sockets/barrier".

fcnt

FCNT

Fail counters—that is, the number of UBC fail counters for all resources.

mlat

MLAT

Maximum process scheduling latency, in milliseconds. In this case, the latency means the maximum time a process in a virtual machine or Container is waiting for the CPU.

iow

IOW

Transfer rate with which data is written to the virtual machine or Container.

ior

IOR

Transfer rate with which data is read from the virtual machine or Container.

iowt

IOWT

Total amount of data that was written to the virtual machine or Container.

iort

IORT

Total amount of data that was read from the virtual machine or Container.

ios

IOS

Synchronization rate.

iod

IOD

Flushing rate of dirty pages (pages that have been changed but are not yet written to the virtual machine or Container disk).

rx

RX

Incoming traffic rate, in megabytes per second.

tx

TX

Outgoing traffic, in megabytes per second.

rxt

RXT

Total amount of incoming traffic, in megabytes.

txt

TXT

Total amount of outgoing traffic, in megabytes.

rxp

RXP

Incoming traffic, in packets per second.

txp

TXPT

Outgoing traffic, in packets per second.

rxpt

RXPT

Total amount of incoming packets.

txpt

TXPT

Total amount of outgoing packets.