IBM Support

Probably should've known this. Linux commands lparstat, lscpu, lsblk

Technical Blog Post


Abstract

Probably should've known this. Linux commands lparstat, lscpu, lsblk

Body

In the category of learning something new on a regular basis, over the last week I discovered some commands on Linux running on Power systems which were new to me.      Turns out "lparstat" has been implemented, and a colleague here in the LTC pointed out two commands "lscpu" and "lsblk" which I hadn't seen before.

Trying these out on a system with POWER7, 

 

# cat /etc/*release*
SUSE Linux Enterprise Server 11 (ppc64)
VERSION = 11
PATCHLEVEL = 2

# rpm -qf `which lscpu`
util-linux-2.19.1-6.29.3

# rpm -qf `which lsblk`
util-linux-2.19.1-6.29.3

# rpm -qf `which lparstat`
powerpc-utils-1.2.11-0.4.2.1

 

For lparstat, there is a utilization view and an informational view of the LPAR.

 

 

# lparstat

System Configuration
type=Dedicated mode=Capped smt=On lcpu=16 mem=130797952 kB cpus=0 ent=16.0 

%user  %sys %wait %idle physc %entc lbusy  vcsw phint
----- ----- ----- ----- ----- ----- ----- ----- -----
 0.00  0.00  0.00 99.99  0.00  0.00  0.00 5279201   962
# lparstat -i

Node Name                                    : testsys
Partition Name                               : lpar1
Partition Number                             : 1
Type                                         : Dedicated
Mode                                         : Capped
Entitled Capacity                            : 16.0
Partition Group-ID                           : 32769
Online Virtual CPUs                          : 16
Maximum Virtual CPUs                         : 16
Minimum Virtual CPUs                         : 1
Online Memory                                : 130797952 kB
Minimum Memory                               : 256
Desired Variable Capacity Weight             : 0
Minimum Capacity                             : 1.0
Maximum Capacity                             : 16.0
Capacity Increment                           : 1.0
Active Physical CPUs in system               : 16
Active CPUs in Pool                          : 0
Maximum Capacity of Pool                     : 0.0
Entitled Capacity of Pool                    : 0
Unallocated Processor Capacity               : 0
Physical CPU Percentage                      : 100
Unallocated Weight                           : 0
Memory Mode                                  : Shared
Total I/O Memory Entitlement                 : 134754598912
Variable Memory Capacity Weight              : 0
Memory Pool ID                               : 65535
Unallocated Variable Memory Capacity Weight  : 0
Unallocated I/O Memory Entitlement           : 0
Memory Group ID of LPAR                      : 32769
Desired Variable Capacity Weight             : 0
 

lscpu is available, although the socket calculation isn't correct in the realm of terminology that we more typically use on POWER systems.    I'll need to follow-up on that, in our thinking the two nodes are sockets, and these processors are 8-cores per socket.

 

 

# lscpu

Architecture:          ppc64
Byte Order:            Big Endian
CPU(s):                64
On-line CPU(s) list:   0-63
Thread(s) per core:    4
Core(s) per socket:    1
CPU socket(s):         16
NUMA node(s):          2
Model:                 IBM,8205-E6D
Hypervisor vendor:     pHyp
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              10240K
NUMA node0 CPU(s):     0-31
NUMA node1 CPU(s):     32-63
 

 

lsblk is available.   It provides another view of the block devices on a system.

 

 

# lsblk
NAME   MAJ:MIN RM   SIZE RO MOUNTPOINT
sdb      8:16   0 136.7G  0 
├─sdb1   8:17   0 399.5K  0 
└─sdb2   8:18   0 136.5G  0 /
sda      8:0    0 136.7G  0 
├─sda1   8:1    0     4M  0 
├─sda2   8:2    0   500M  0 
├─sda3   8:3    0     4G  0 [SWAP]
├─sda4   8:4    0     1K  0 
└─sda5   8:5    0 132.2G  0 
sdc      8:32   0 136.7G  0 
sdf      8:80   0 136.7G  0 
sdd      8:48   0 136.7G  0 
sde      8:64   0 136.7G  0 
sr0     11:0    1  1024M  0 


# lsblk -t

NAME   ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED
sdb            0    512      0     512     512    1 cfq
├─sdb1         0    512      0     512     512    1 cfq
└─sdb2         0    512      0     512     512    1 cfq
sda            0    512      0     512     512    1 cfq
├─sda1         0    512      0     512     512    1 cfq
├─sda2         0    512      0     512     512    1 cfq
├─sda3         0    512      0     512     512    1 cfq
├─sda4         0    512      0     512     512    1 cfq
└─sda5         0    512      0     512     512    1 cfq
sdc            0    512      0     512     512    1 cfq
sdf            0    512      0     512     512    1 cfq
sdd            0    512      0     512     512    1 cfq
sde            0    512      0     512     512    1 cfq
sr0            0    512      0     512     512    1 cfq
 

 

 

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"HW1W1","label":"Power ->PowerLinux"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm16171399