dropdown menu

Basics

CONSOLE vs TERMINAL (tty, vty):

Console:
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.)

Terminal:
TTY is the name for a terminal in Unix tradition. In the past real typewriter 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:
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 ADAPTER

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)

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

WebSM
The WebSM client (which is a software run on pc, linux or AIX) makes avaliable remote access to the HMC application.

For firewall, port 9090 is needed???

------------------------

Available/Configurable CPU/RAM on HMC:

CPU:
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)

RAM:
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)

------------------------


HMC BACKUP + RECOVERY:

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

--------------------------------------------

put ssh_key to hmc (passwordless login as hscroot)


version 1:
    - scp hscroot@hmc_name:.ssh/authorized_keys2 temp_hmc
    - cat id_rsa.pub >> temp_hmc
    - scp temp_hmc hscroot@hmc_name:.ssh/authorized_keys2
    - Test it: ssh hscroot@hmc_name date


version 2:
    scp id_rsa.pub hmc9:                        <--copy your public key to hmc
    ssh hmc9                                    <--login to hmc (it will ask for a password at this time)
    KEY=`cat id_rsa.pub`                        <--put in the cat command to a variable
    mkauthkeys -a "$KEY"                        <--puts the public key into authorized_keys file
    ssh hmc9                                    <--logint without a password


--------------------------------------------

NTP configuration on a HMC


# lshmc -r -Fxntp,xntpserver                     <--check if ntp service is enabled (/var/log/ntp logfile can be checked as well)
enable,<ntp_server_name>

# chhmc -c xntp -s add -a <ntp_server_name>      <--configure ntp service and add ntp server to HMC

# chhmc -c xntp -s enable                        <--activate NTP service

--------------------------------------------

Hardware Change:

1.OS:
    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)

4. SERVER STARTUP:
    slow boot mode may needed
    Properties --> Power-ON Parameters --> Show details --> Power-on speed

5. CHANGE PROFILE IF NEEDED:
    set correct desired settings

6. LPAR STARTUP
    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.

ON THE SOURCE SYSTEM:

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

$ lsdev -Cl cd0 -F parent
ide0

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


ON THE HMC:

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.


ON THE TARGET SYSTEM:

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

21 comments:

  1. 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.

    Thanks

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

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

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

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

    ReplyDelete
  4. 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.

    ReplyDelete
  5. Very good blog for Aix knowledge
    Thankyou

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

    ReplyDelete
  7. 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.

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

    ReplyDelete
  9. 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
    date
    ls -la /hmcdump
    sleep 60
    done

    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

    ReplyDelete
  10. 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
    6100-09-03-1415
    but in HMC:Resource configuration:
    Configured
    OS version:
    AIX 6.1 6100-07-05-1228

    ReplyDelete
    Replies
    1. 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.

      Delete
  11. 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?

    ReplyDelete
    Replies
    1. 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 .

      Delete
  12. 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?

    ReplyDelete