Disclaimer : All the postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.
 
AIX console connections(vty) displays are limited to 80 characters width(columns) and 24 characters height(rows), by default i.e. 80 x 24.
There are multiple occasions where one has to connect to the “virtual terminal” to transact on an AIX LPAR in IBM Power Systems. Some notable examples being :
a) Install Operating System on a newly created LPAR
b) Modify the network connection parameters of the LPAR e.g. IP address
c) Analyze Kernel( or Kernel extension) data/issues
d) etc …

Like most developers I need to get into AIX console connections quite often and it is quite annoying to be restricted to the “80 x 24” display view.
In this article I’ll show the use of stty command to modify vty display ( columns x rows ) on AIX

Based on the below screenshot, this is how it looks if I want to view a file e.g. /usr/include/stdio.h in the console session :
( Note : Some lines are wrapped and others not displayed because “columns X rows” are restricted to 80 x 24 )

AIX terminal view with default width/height

AIX terminal view with default width/height

 

Thankfully “stty” command comes to rescue here. Commands “stty cols x” and “stty cols y” could be used to set the width and height of console to “x” and “y” respectively.
e.g. If the terminal on your laptop/desktop is set to 132 x 43 ( width x height ) use below commands on your AIX console session to set the display accordingly :

stty command to modify display area

stty command to modify display area

 

 

 

 

After applying the stty changes based on the “width x height” of the terminal. i.e. stty cols 132; stty rows 43 the modified display view uses up all of the space of the terminal.
(Note : More text is displayed on the console terminal )

AIX_terminal_view_after_stty_changes

Display after setting stty cols and rows of the terminal

More details of the “stty” command are up for grabs from the IBM Knowledge Center : https://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.cmds5/stty.htm

 

What do you think ?

Set your Twitter account name in your settings to use the TwitterBar Section.
%d bloggers like this: