dropdown menu



CONSOLE vs TERMINAL (tty, vty):

Some history:
A teletype (teleprinter) or TTY is an electromechanical device that can be used to send and receive typed messages. Initially they were used in telegraphy, which developed in the 1830s. More than 100 years later these machines were adapted to provide a user interface to early mainframe computers, sending typed data to the computer and printing the response on paper. Some models could also be used to create punched tape for data storage. Teleprinters have largely been replaced by fully electronic computer terminals which typically have a computer monitor instead of a printer (though the term "TTY" is still used to refer to them).

A video terminal (such as vt-100) was a data entry device that used a keyboard for input and a display screen for output. Although the display screen resembles a TV, it did not accept TV signals. Usually the keyboard had to be connected to the display screen, and the display screen to the computer (using serial connections).

The term console usually refers to a terminal attached to a computer and used to monitor the status of the system. The combination of display monitor and keyboard or other device that allows input. Another term for console is terminal.
(Terminal: A device that enables you to communicate with a computer. Generally, a terminal is a combination of keyboard and display screen.)

TTY is the name for a terminal in Unix tradition. In the past real typewriters were used as input or output (printer) for computers, and if that was not in the same room it was called teletypewriter or teletype (tty). Now screen replaced printer, although TTY refers to teleprinter in general. A terminal (or sometimes synonim console) consists of an input and output device (keyboard/monitor).

In the past people logged in and ran programs through terminals that were connected to the computer's serial ports. Later remote logins were possible via netwok. If you're logged in remotely (via SSH or remote X), you're using a pseudo-terminal, which means a personal computer runs a software that emulates the function of a terminal.

PuTTY is a terminal emulator and ssh client. If a terminal emulator is used, it is the job of the terminal emulator to set the TERM environment variable. The TERM variable helps the OS determine how to display information to your terminal. The environment variable TERM should be set to the name of terminal you are using (e.g. xterm). Type "set" at the command line to see what TERM is set to.

In the putty config options is a setting called terminal-type string. You can set your TERM there and putty instructs SSH to set that environment variable. When (via SSH) we are reaching out to the server, we are reaching out to 'getty'.

A getty is is a program (normally invoked by init) that waits for a connection and asks the person for their login name.  getty then starts login and login asks the person for their password. If the user does nothing, getty or login hang up and getty goes back to waiting.

One of the jobs of a getty is to set the TERM environment variable to indicate the model of the terminal which is connecting (e.g. getty sets TERM to "xterm" and forks a shell process (/bin/ksh).

you can check these devices under /dev:
tty: used for any non printer device attached to a serial port (terminal, modem)
pty: used for a pseudo terminal device. It provides the appearance of a terminal, but does not have any physical port attachment. (putty)

w command shows this:
pts - pseudo terminal server (when looging in via putty)
vty - virtual terminal server (when logging in via console)

tty - this command shows the full path of the actual terminal
root@bb_lpar: / # tty
/dev/vty0                      <--from a console session you will see this
/dev/pts/0                     <--from an ssh session you will see this

you can check these (from an ssh or console session):

echo "hello" > /dev/tty        <--it sends the output to the current session (doesn't matter console or ssh)
echo "hello" > /dev/pts/0      <--it sends the output to the ssh session window
echo "hello" > /dev/vty0       <--it sends the output to the console session window
echo "hello" > /dev/console    <--it sends the output to the console (login prompt from console is enough, not necessary to be logged in)



Virtual serial adapters provide a point-to-point connection from one logical partition to another, or from the Hardware Management Console (HMC) to each logical partition on the managed system. Virtual serial adapters are used primarily to establish terminal or console connections to logical partitions.

When you create a logical partition, the HMC automatically creates two virtual server serial adapters on the logical partition. These virtual server serial adapters allow you to establish a terminal or console connection to the logical partition through the HMC.

You can also create pairs of virtual serial adapters on logical partitions so that you can access and control one logical partition directly from another logical partition

On HMC-managed systems, virtual serial adapters are created and assigned to logical partitions using partition profiles.

root@bb_lpar: / # lsdev -Cc adapter
vsa0   Available  LPAR Virtual Serial Adapter

the child device of vsa0 is vty0:
root@bb_lpar: / # lsdev -p vsa0
vty0 Available  Asynchronous Terminal


HMC (Hardware Management Console)

It is a computer (desktop or slimmer called rack-mount), which is is for managing and monitoring IBM servers. It runs customized Linux, and the user can access only the management application. The HMC uses its network connections to one or more servers to perform various management functions:
    * Creates and maintains a multiple-partitioned environment
    * Displays a virtual operating system session terminal for each partition
    * Displays virtual operator panel values for each partition
    * Detects, reports, and stores changes in hardware conditions
    * Acts as a service focal point: reports hardware errors
    * Powers managed systems on and off
    * Activates additional resources on demand


Available/Configurable CPU/RAM on HMC:

Available:              This amount can be assigned to partitions (it is not assigned yet, and it is free)
Assigned to Partitions: This amount has already been assigned to partitions
Configurable:           The sum of the above 2 (Configurable=Available + Assigned to Parttiions)
Installed:              This amount of processor is installed to the server
                        (The value of "Installed - Configurable" shows how much we can activate with CoD, this can be checked under CoD menu)

Available:              This amount can be assigned to partitions (it is not assigned yet, and it is free)
Assigned to Partitions: This amount has already been assigned to partitions
Reserved:               This amount is taken away from the Configurable amount (it is needed for the Hypervisor)
Configurable:           The sum of the above 3 (Configurable=Available + Assigned to Parttions+ Reserved)
Installed:              This amount of RAM is installed to the server
                        (The value of "Installed - Configurable" shows how much we can activate with CoD, this can be checked under CoD menu)



Recovery point: this is the point of the last upgrade or the time when HMC was installed

Back up Critical Console Data (HMC Data on v7):
it backs up everything (installed data, efixes, cutomization), it could take an hour it is not a bootable media

Save Upgrade Data:
only saves customization data, and it is used only when you will boot from recovery media or network image (before upgrades), it takes less than a minute

For recovery we need a recovery media (or a base installation image) and the Critical Console Data.


root@aix40: / # lparstat -i
Node Name                                  : aix40
Partition Name                             : aix40-APP3
Partition Number                           : 2
Type                                       : Shared-SMT      <--simultaneous Multi-threading turned on
Mode                                       : Uncapped        <--uncapped: it can use unused available capacity in the shared pool
Entitled Capacity                          : 3.75            <--the number of processing units this LPAR is entitled to receive
Partition Group-ID                         : 32770
Shared Pool ID                             : 0
Online Virtual CPUs                        : 7               <--number of virtual processors
Maximum Virtual CPUs                       : 8
Minimum Virtual CPUs                       : 3
Online Memory                              : 24575 MB
Maximum Memory                             : 32768 MB
Minimum Memory                             : 12288 MB
Variable Capacity Weight                   : 200             <--how extra (idle) capacity is allocated to it (value ranges from 0-255)
Minimum Capacity                           : 0.50            0= capped= only its entitled capacity can be consumed
Maximum Capacity                           : 4.00            other values= uncapped= distribution of unassigned capacity depends on this weight
Capacity Increment                         : 0.01
Maximum Physical CPUs in system            : 16
Active Physical CPUs in system             : 16   
Active CPUs in Pool                        : 16              <--how many CPUs are in the pool

smtctl                                    shows current SMT settings
smtctl on|off                             enable or disable SMT


Hardware Change:

    shutdown -F (LPAR: Runing --> Not Activated)

2. HMC:
    if all LPARs have been stopped server state: Operating --> Standby??
    Power off Managed System -->Fast power off
    (server state: Standby --> Power off, LPAR state: Not Activated --> Not Available)

3. HW change:
    (when server is unplugged from electricity, state: Power Off --> No Connection)

    slow boot mode may needed
    Properties --> Power-ON Parameters --> Show details --> Power-on speed

    set correct desired settings

    Partition Profile --> Activate Profile


How to move DVD-ROM or CD-ROM drive from one LPAR to another:

If you don't know which LPAR owns the CD-ROM drive, use the HMC manager or WEBSM tool.
Select the managed system and open "Properties".
Select the "I/O" tab. Look for the I/O device with the description "Other Mass Storage Controller" and read the "Owner" field. This will show the LPAR currently owning that device.


1. Find the parent adapter of the DVD or CD device:

$ lsdev -Cl cd0 -F parent

2. Find the slot containing the IDE bus:

$ lsslot -c slot
# Slot Description Device(s)
U787B.001.DNWG2AB-P1-T16 Logical I/O Slot pci1 ide0
U9133.55A.105C2EH-V7-C0 Virtual I/O Slot vsa0
U9133.55A.105C2EH-V7-C2 Virtual I/O Slot ent0
U9133.55A.105C2EH-V7-C3 Virtual I/O Slot vscsi0

so PCI1 is the slot containing the IDE adapter and CD drive.

3. Remove the slot from this host:

# rmdev -dl pci1 -R
cd0 deleted
ide0 deleted
pci1 deleted


Select the LPAR currently owning the CD-ROM, and in the Actions menu select:
Dynamic Logical Partitioning -> Physical Adapters -> Move or Remove
Select the adapter for "Other Mass Storage Controller" and move to the desired target LPAR.
This will perform a DLPAR operation on both the source and target LPAR.


Log in as root and run
# cfgmgr

The CD-ROM device should show up now
# lsdev -C | grep cd
cd0 Available 1G-19-00 IDE DVD-ROM Drive
Posted by Sharing is caring at 11:58 AM


Anonymous said...

Nice post.
Looking for help. I have Power4 machine (7038-6M2) and is not managed by HMC. Its in production environment running AIX52TL4.I would like to open the console connection. I could not find any related post. I appriciate, if you please guide me in this regard. Can I open the console connection through serial null modem cable while the machine is operating mode or It have to in shutdown state.
Your help in this regard will greatly appriciated.


aix said...

I'm sorry but I can't help you in that. Maybe someone, who is reading this blog has more experience with Power4 machines.

Anonymous said...

Great Blogs!!I really liked all ur Blogs...Keep it up!!

aix said...

Thx :)

Unknown said...

which command use to know which partition have cdrom at hmc level..............
plz help me

Anonymous said...

Yes. You can do it. You do not need to shutdown server.

Anonymous said...

Excellent blog!! Question - I have an HMC (v7.7 - 7042 CR5) and need to check (in logs) when was an lpar last "activated"?
If the same logfile contains details on when was the lpar last rebooted,that would be a bonus. Pls help. Thnx.

dearlinux said...

Very good blog for Aix knowledge

aix said...


Anonymous said...

How can we know server attached with HMC or Not?
and also how can we know we are work on LPAR or standalone machine?

Unknown said...

I got power6-550 with HMC management. I am going to do COD activation for processor. Can I do it without shutdown the server? I mean during operation.

aix said...

Yes, it can be done online.

Anonymous said...

Where are the steps to shutdown and power off/on an HMC. Might be useful in a datacenter shutdown.

Unknown said...

Using the getupgfiles and updhmc commands over slow network pathways could cause you to exceed a 30 minute download time-out built into earlier versions of HMC code.
While the HMC CLI environment is restricted, there are some common scripting commands you could use to monitor the status of network image downloads which could be constructed as hscroot.

while true ; do
ls -la /hmcdump
sleep 60

Typically the filesystem /hmcdump remains mounted until the getupgfiles command completely exits and might be able to determine if all files and correct sizes were completely downloaded using such a monitor before you proceed with the upgrade.

Found it useful while you transfer the images from IBM FTP site.

Taken from IBM Systems Magazine, thanks to Rob McNelly

aix said...

Thx for this info!

Anonymous said...

Hi Balaz, could you tell me why after a AIX TL upgrade , My HMC GUI still shows the old TL version, when I click on the lpar properties in the HMC. Thanks
oslevel -s
but in HMC:Resource configuration:
OS version:
AIX 6.1 6100-07-05-1228

aix said...

Hi, HMC needs some time to be aware of the new changes, but for me, when I saw this, after a day an HMC restart helped.

Anonymous said...

Thanks for your useful information. I have P7 server hosted some LPARs and got power outage, P7 was down. When it is on, i see all LPARs were in "Not Activated" status and I have to activate manually. I wonder why all LPARs will not activated automatically. Is it abnormal?

Anonymous said...

no it is not abnormal , power on option by default selected as user initiated , and you'd prefer this way, would you want your LPARs coming up first before the VIO? . check power system properties and power on parameter .

Anonymous said...

i can access HMC console via Putty but i want to enable access GUI mode of HMC via browser.
Can you please help here,how to enable it?

Anonymous said...

lsdev, lscfg, on your LPAR with lscfg look at the V in V11 beneath that means Virtual

{sys_lpar11} / # lsdev -Cc adapter
ent0 Available Virtual I/O Ethernet Adapter (l-lan)
vsa0 Available LPAR Virtual Serial Adapter
vscsi0 Available Virtual SCSI Client Adapter
{sys436_lpar11} / # lscfg | grep disk
* hdisk0 U8233.E8B.06B5E6P-V11-C12-T1-L8100000000000000 Virtual SCSI Disk Drive

{sys_lpar11} / # lsdev -Cc disk
hdisk0 Available Virtual SCSI Disk Drive
hdisk1 Available Virtual SCSI Disk Drive

Anonymous said...

go to browser and give "https://"

This will redirect you to HMC GUI console.

Hope this helps...