Monday, 29 July 2013

Download PuTTYCM

PuTTY Connection Manager-Tabbed PuTTY:

PuTTYCM is Putty Connection Manager , displays multiple PuTTY sessions in Tabs  and you can download it with the below link


1: Display Multiple PuTTY Sessions in Tab
2: Dockable Windows for PuTTY Sessions
3: Multi Command Sender (MCS)
4: Encrypted PuTTY Configuration Database
5: Automatic PuTTY Session Login
6: PuTTY Session Post-Login Commands
7:Ability to select multiple themes
8:Import and Export PuTTY sessions
9:PuTTY CM also comes as standalone executable that can be launched directly from an USB thumb drive.
10: PuTTY Connection Manager is a freeware.

I have discussed more details about these features of  PuttyCM in my previous article.... readmore

Sunday, 28 July 2013

SSH Keys SETUP -Password Less Authemtication

Getting Started

  1. First, install OpenSSH and OpenSSL on two UNIX machines, umserv1 and umserv2. This works best using DSA keys and SSH2 by default as far as I can tell. All the other HOWTOs I've seen seem to deal with RSA keys and SSH1, and the instructions not surprisingly fail to work with SSH2.
  2. On each server type ssh and make a connection with your regular password. This will create a .ssh dir in your home directory with the proper perms.
  3. On your primary machine where you want your secret keys to live (let's say umserv1), type
    ssh-keygen -t dsa
    This will prompt you for a secret passphrase. If this is your primary identity key, make sure to use a good passphrase. If this works right you will get two files called id_dsa and in your .ssh dir. Note: it is possible to just press the enter key when prompted for a passphrase, which will make a key with no passphrase. This is a Bad Idea ™ for an identity key, so don't do it! See below for uses of keys without passphrases.
  4. scp ~/.ssh/ umserv1:.ssh/authorized_keys2
    Copy the file to the other host's .ssh dir with the name authorized_keys2.
  5. Now umserv2 is ready to accept your ssh key. How to tell it which keys to use? The ssh-add command will do it. For a test, type
    ssh-agent sh -c 'ssh-add < /dev/null && bash'
    This will start the ssh-agent, add your default identity(prompting you for your passphrase), and spawn a bash shell. From this new shell you should be able to:
  6. ssh umserv2 from umserv1
    This should let you in without typing a password or passphrase. Hooray! You can ssh and scp all you want from this bash shell and not have to type any password or passphrase.

Using X Windows

Now this is all well and good, but who wants to run their whole life from a single bash instance? If you use an X window system, you can type your passphrase once when you fire up X and all sub processes will have your keys stored.
  1. In the ~/.xinitrc file, modify your line which spawns windowmaker to read:
    exec ssh-agent sh -c 'ssh-add </dev/null && exec /usr/local/bin/wmaker'
    This will prompt you for your passphrase when you start up X, and then not again. All shells you spawn from X will have your keys stored.
  2. This brings up a security issue- if someone comes upon your X session, they can spawn ssh sessions to  umserv2 and other hosts where you have put your information into the authorized_keys2file. A locking screensaver like xlock is vital.

Different usernames

By default ssh assumes the same username on the remote machine. If you have a different username on the other machine, follow the normal ssh procedure:
[sony@umserv1/]$ ssh –l gony umserv2

Thursday, 25 July 2013

PIE-Performance, Image, Exposure

You can be surprised why this post is posted on a technical  blog but I found this is very good and use-full when one want to grow in their respective carrier.

PIE-Performance, Image, Exposure

One of the most interesting concepts I came across when I was just starting out in my corporate career was the PIE model – Performance, Image, Exposure. Typically this is represented by a pyramid diagram or a pie chart, depending on how pun-driven the explainer’s sense of humor is.

In terms of an individual’s career, the 3 segments represent the following:
  • Performance: The actual work you do, the results you deliver.
  • Image: The impression that others have of you (obviously this can differ from person to person).
  • Exposure: The people who get to know about a) your results and b) your image.
At first, it was a concept that really didn’t sit well with me. It didn’t seem FAIR. Surely one’s career should really just depend on the results that you deliver? If you’re good at your job, you should do well, right?

If I’m honest, that feeling stayed for quite a long while. I resisted the concept that you needed to care about your image, about your exposure. I believed that I could just do my job and that the results I delivered would be what mattered. I wouldn’t need to care about image or about getting known by the decision-makers.

All that changed because I was asked to write some feedback for someone. The person in question was someone I actually hadn’t worked with as directly as others for whom I had written performance evaluations in the past. I realized that since I hadn’t been working directly with them, I didn’t really KNOW about their real work and their real results. Strangely, though, I still had definite opinions, both of what they were doing well and what they could improve on.

This is what made me realize that image and exposure are both important — and factors that you should ignore at your peril.

Whether you like it or not, only a limited number of people will get to work with you directly. Even those that do will get a fairly narrow view of the real results that you deliver. On the other hand, many many more people will form an image in their minds of what you’re like — perhaps that you’re a safe pair of hands, maybe that you’re very smart or very ambitious. Some may form a very negative image — that you’re a bullshitter or unreliable or untrustworthy. The combination of that image that people have of you (Image) and the groups of people that share that view of you (Exposure) can make or break your career.

The big light bulb moment for me was when I accepted that Image and Exposure were going to matter whether I cared about them or not. Of course Performance is also important and always will be — I firmly believe that folks who try to make it all about the image and the exposure are playing a dangerous game of smoke and mirrors and will eventually be caught out. But the difference between two colleagues with comparative performance, one of whom cultivates the type of image they want and makes an effort to get the right exposure and the other who ignores these facets completely … well, it can be very significant.

Wednesday, 24 July 2013

Importvg PowerHA(HACMP)

There is a slight difference when we deal with importvg  in  PowerHA(HACMP) cluster environment. We need to give additional flag  “V”  it’s  major number .

1) First get the major number 

    For the volume group  disk without a PVID
      # ls -l /dev/<volume_group_name> # to get the major number
    For the volume group  disk with a PVID
      # ls -l /dev/applvg  
crw-rw---- 1 root system 48, 0 Jul 16 23:02 applvg

Note: here  "applvg" is volume_group_name

2) Importvg

# importvg -V <major_number> -y <volume_group_name> <hdisk_number> 
# improtvg -V 48 -y applvg hdisk7 

Tuesday, 23 July 2013

PuTTYCM (PuTTY Connection Manager) alternatives

PuttyCM (Putty Connection Manager) alternatives:

This post is in continuation with my earlier post  PuttyCM , we have some alternatives to puttycm , you can try them as well.
1) SuperPutty:
This is almost similar to the PuTTY CM. Also, it uses PuTTY as the back-end program to process. You can use different tabs in the same window, here. It allows you to see multiple connections.
There is no difference between PuTTY and this. Both look similar and perform, too. If you are familiar with the former one, the transition to this will be completely effortless and allows the PuTTY SSH Client to be opened in Tabs. Additionally there is support for SCP to transfer files.


  • Docking user interface allows personalized workspace and managing multiple PuTTY sessions easy
  • Export/Import session configuration
  • Upload files securely using the scp or sftp protocols
  • Layouts
  • Supports PuTTY session configurations including Private Keys
  • Supports SSH, RLogin, Telnet and RAW protocols
  • Supports local shell via MinTTY or puttycyg
  • Supports KiTTY
Download SuperPuTTy

2) Multi-Tabbed Putty:
Multi-Tabbed putty is another free application that uses Putty or Kitty (forked version of Putty) in background. It provides clear tabbed user interfaces for each connection. The servers are grouped in a sidebar which is similar to Putty connection Manager. It also allows detaching of tabs and converting them into a general Putty window.

Multi-Tabbed Putty

3) Poderosa Connection Manager:
This is something different. This application does not add on to Putty, and works independently. Users can split the window space into multiple panes and allocate each to a different connection. Telnet and SSH are used to establish connections. Moreover, developers can enhance the functions of Poderosa by using and create new plugins.

Download Poderosa

4)   Putty tab manager :
Windows tool for managing multiple PuTTY instances in a single tabbed window. PuTTY Tab Manager allows you to run multiple sessions of PuTTY , known ssh and telnet client for windows in one window with tabs.
  • One is an executable does not need installation.
  • Platforms  Win32 , you do not need MS. NET framework. 
  • Unlimited tabs.
  • PuTTY menu for each open session.
  • Multilingual (English, Spanish).
  • Support KiTTY  (kitty.exe), "fork" (branch) of PuTTY.
  • Portable version.
  • Send scripts
  • Automatic capture mode . Catch all PuTTY sessions open or opening.
  • Option to launch sessions from a file ( -f <file>).
  • Hotkeys  
    • Add tab [Ctrl] + [Ins] / [ Ctrl] + [+]
    • Next  tab: [Ctrl] + [Tab] / [ Ctrl] + [Page Down]
    • previous tab [Ctrl] + [Shift] + [Tab] / [Ctrl] + [Page Up]
Download PuTTYTabManager

5) AutoPutty :
AutoPuTTY is a simple connection manager / launcher -
It's written in C# so you'll need at least Microsoft .NET Framework Version 2.0
What you can do with it:
- Manage a server list and connect thru PuTTY, WinSCP, Microsoft Remote Desktop and VNC (only VNC    3.3 encryption is supported for passwords yet)
- Easily connect to multiple servers at once
- Import a list from a simple text file
- Protect the application startup with a password (note that the list is always encrypted)
Download AutoPuTTY

6) Tunnelier:
SSH and SFTP client for Windows incorporates:
  • one of the most advanced graphical SFTP clients;
  • state-of-the-art terminal emulation with support for the bvterm, xterm, and vt100 protocols;
  • support for corporation-wide single sign-on using SSPI (GSSAPI) Kerberos 5 and NTLM user authentication, as well as Kerberos 5 host authentication;
  • support for RSA and DSA public key authentication with comprehensive user keypair management;
  • powerful SSH port forwarding capabilities, including dynamic forwarding through integrated SOCKS and HTTP CONNECT proxy;
  • powerful command-line parameters which make the SSH client highly customizable and suitable for use in specific situations and controlled environments;
  • an advanced, scriptable command-line SFTP client (sftpc);
  • a scriptable command-line remote execution client (sexec) and a command-line terminal emulation client (stermc);
  • an FTP-to-SFTP bridge allowing you to connect to an SFTP server using legacy FTP applications;
  • Bitvise SSH Server remote administration features;
  • single-click Remote Desktop forwarding.
Download Tunnelier

7) SecureCRT:
SecureCRT® combines rock-solid terminal emulation with the strong encryption, broad range of authentication options, and data integrity of the Secure Shell protocol for secure network administration and end user access.

Download SecureCRT
8) mRemote:
mRemoteNG is a fork of mRemote, an open source, tabbed, multi-protocol, remote connections manager. mRemoteNG adds bug fixes and new features to mRemote.
It allows you to view all of your remote connections in a simple yet powerful tabbed interface.
mRemoteNG supports the following protocols:
  • RDP (Remote Desktop/Terminal Server)
  • VNC (Virtual Network Computing)
  • ICA (Citrix Independent Computing Architecture)
  • SSH (Secure Shell)
  • Telnet (TELecommunication NETwork)
  • HTTP/HTTPS (Hypertext Transfer Protocol)
  • rlogin
  • Raw Socket Connections
Download mRemote

Friday, 19 July 2013

Top 12 'PS' Performance Commands

I use following ps commands in order to check for performance probelms:
1) Displaying top CPU_consuming processes:
 # ps aux|head -1; ps aux|sort -rn +2|head -10
2) Displaying top 10 memory-consuming processes:
# ps aux|head -1; ps aux|sort -rn +3|head
3) Displaying process in order of being penalized:
# ps -eakl|head -1; ps -eakl|sort -rn +5
4) Displaying process in order of priority:
# ps -eakl|sort -n +6|head
5) Displaying process in order of nice value
# ps -eakl|sort -n +7
6) Displaying the process in order of time
# ps vx|head -1;ps vx|grep -v PID|sort -rn +3|head -10
7) Displaying the process in order of real memory use
# ps vx|head -1; ps vx|grep -v PID|sort -rn +6|head -10
8) Displaying the process in order of I/O
# ps vx|head -1; ps vx|grep -v PID|sort -rn +4|head -10
9) Displaying WLM classes
# ps -a -o pid, user, class, pcpu, pmem, args
10) Determining process ID of wait processes:
# ps vg|head -1; ps vg|grep -w wait
11) Wait process bound to CPU
 # ps -mo THREAD -p
12) CPU usage with priority levels
 # topas -P

Thursday, 18 July 2013

Intorduction to topas

Intorduction to topas

Default Screen

The following screen sample is that of an idle system (running topas). Move your mouse over each item to view a description of what each means.

Topas Monitor for host:    umlpar               EVENTS/QUEUES    FILE/TTY
Thu Jul 10 15:19:50 2008   Interval:  2         Cswitch      42  Readch        0
                                                Syscall      17  Writech     158
Kernel    0.5   |#                           |  Reads         0  Rawin         0
User      0.0   |                            |  Writes        0  Ttyout      158
Wait      0.0   |                            |  Forks         0  Igets         0
Idle     99.5   |############################|  Execs         0  Namei         0
                                                Runqueue    0.0  Dirblk        0
Network  KBPS   I-Pack  O-Pack   KB-In  KB-Out  Waitqueue   0.0
en0       0.2      0.5     0.5     0.0     0.2
lo0       0.0      0.0     0.0     0.0     0.0  PAGING           MEMORY
                                                Faults        0  Real,MB     512
Disk    Busy%     KBPS     TPS KB-Read KB-Writ  Steals        0  % Comp     42.3
hdisk2    0.0      0.0     0.0     0.0     0.0  PgspIn        0  % Noncomp   7.9
hdisk1    0.0      0.0     0.0     0.0     0.0  PgspOut       0  % Client    7.9
cd0       0.0      0.0     0.0     0.0     0.0  PageIn        0
                                                PageOut       0  PAGING SPACE
Name            PID  CPU%  PgSp Owner           Sios          0  Size,MB     768
topas        229534   0.4   1.0 root                             % Used      0.7
gil           45078   0.1   0.1 root            NFS (calls/sec)  % Free     99.2
rgsr         118852   0.0   0.0 root            ServerV2       0
pilegc        32784   0.0   0.1 root            ClientV2       0   Press:
nfsSM        127040   0.0   0.1 root            ServerV3       0   "h" for help
rdpgc        131142   0.0   0.0 root            ClientV3       0   "q" to quit
Mouse over each secion in the above text to find a description of that section / item.

Command line options

To control the variable (left) side of the default topas screen
  -d x   Number of disks (x) to list in top disk section (Default: 20)
  -c x   Number of CPU lines (x) to list in top CPU section (Default: 20). Note: This section displays the CPU graph in the default display/mode and you must toggle to the top-CPU mode using the 'c' runtime option.
  -n x   Number of network interfaces (x) to list in top network section (Default: 20)
  -p x   Number of processes (x) to list in the top process section (Default: 20)
To control the content of the initial (non-default) topas screen
  -P   Display only process listing. (similar to default "top" behavior.)
  -U username   Used with the -P option to limit process listing to only those owned by username
  -D   Display only disk listing (similar to iostat)
  -L   Logical partition display
  -C   Display cross-system (multiple LPAR) statistics
  -h   Display (a more complete list of) command line options
  -i x   Number of seconds (x) in each screen refresh interval (Default: 2)

Runtime options

  a   Return to the default topas screen
  c   Toggles the CPU section between default (graph), off, and top CPU list
  C   Changes to the cross-LPAR display (same as starting with -C)
  d   Toggles the Disk section between top disks, no disk section, and summary disk statistics.
  D   Changes to the disk statistics display (same as starting with -D)
  f   Toggles the file statistic section from summary, top-3 filesystems, to off.
  h   Changes to the help screen (includes additional help information / runtime keys)
  p   Toggles the top process section on and off
  P   Changes to the process view display (same as starting with -P)
  n   Toggles the network section between top network interfaces, summary only, and off
  L   Changes to LPAR view (same as starting with -L)
  q   Quit topas

topas Tips

  • The right hand side of the default topas screen is hard-set and cannot be toggled. It will only display as many lines as fit in a default terminal size. The left hand side items can be toggled with keys for each section and (frequently) be expanded to use the entire screen with additional data not available in the default screen.
  • Columns on the left hand side of the screen (and the full screen modes) can be sorted by moving the cursor between the section headings. The current sort order can be determined by the highlighted section heading.
  • Alias the string top to topas -P to (alias top='topas -P') to have a top-like command. Another alternative that gives more data to processes but still uses the the default topas screen is topas -d 0 -n 0 (alias top='topas -d 0 -n 0').

Where to go from here


topas provides a fairly deep analysis of system CPU load. It will allow you to identify the offending process that is consuming CPU on a system. Once a system is identified as CPU bound from the main screen of topas, you only need to look at the process list to see the process that is driving the usage. topas -P will display a more complete list of top processes that are by default sorted by CPU utilization.

Finding an offending process is the easy part of the battle when diagnosing CPU issues. The next step is to determine how the CPU is consumed. Application tools (such as those found in databases) can be helpful in this area. AIX provides a number of profiling tools that tell what an application is doing. truss, ProbeVue (AIX 6), and a number of trace-based utilities (curt, pprof, locktrace).

When looking at total CPU utilization, one should watch for natural plateaus that form when a single threaded process becomes CPU bound on a multiple processor system. Symptoms of this show up as a consistent CPU utilization number that is at or near a fraction of the total CPU capacity of the system. For example, a single threaded CPU bound process will show up as 50% utilization on a 2 processor system, 33% on a 3 processor system, 25% on a four processor system, etc...

An additional issue associated with many larger / partitioned systems is the concept of processor affinity. While not directly a CPU related performance measurement, poor processor affinity on a LPARed system will cause additional CPU time as memory is accessed from remote cache or memory locations. Processor affinity can be monitored with the lparstat and mpstat tools. This can be monitored using the -d option to mpstat and looking for higher numbers in SXrd columns, where an increasing value of X represents poorer processor affinity.

Finally, it is essential to understand the underlying nature of a virtualized system. The number (or parts of) physical CPUs that back a virtual processor is key in understanding how loaded the system is. From a system point of view it may appear that a single CPU has been consumed, but in reality it may actually only be 1/10 th of a processor in a capped micro-partition. topas will tell you the Physc (number of physical CPUs consumed) and %Entc (percentage of entitled capacity) when the system is running in a micro-partition.


High memory utilization manifests itself as CPU bound, but over consumption or over-subscription of memory takes the form of paging. This is when processes have allocated and used more memory than the system physically has. To maintain the increased memory footprint of each process the system must write portions of memory to disk in a paging space.

The standard method of measuring memory is by looking for paging. Most healthy systems will page to some degree to favor more active applications and files (to cache). So when looking at paging statistics it is key to note how much paging space is in use, but how much paging activity is happening at this time.

The amount of paging space in use is visible on the main screen of topas. slightly more detailed information is available from the lsps -a and svmon commands. It should be noted that a higher value in paging space utilization may not necessarily represent memory stress. It is possible that a one time event may have pushed many unused pages to disk. It is necessary to determine if the paging is ongoing and / or if the event that is causing it is one that is persistent and repeatable.

The primary method to look for bloated processes is to start topas with the -P switch and sort the list by "PAGE SPACE" (by moving the cursor over that field). This does not tell how much of the application is paged out but how much of the application memory is backed by paging space.

It is not necessarily useful to see what application is paged out as this is not as relevant as the fact that the system is paging and how much the system is paging. (It is possible to see individual process memory usage using svmon -P <PID>) The key pieces of information are the amount of paging, the rate of paging, and who is pushing the others out (who is using more than expected).


Extended disks statistics are viewable using the D runtime or -D command line option to topas. In both the default screen and the extended disk statistics screen you can sort the disk results based upon various fields by moving the cursor over that field.

The most important fields to look for on a disk is the transfer rate and the % Busy. Neither of these items alone will tell the story of disk I/O. A low transfer rate may be a disk operating at full capacity handling less optimal I/O requests as opposed to the relatively quiet disk that it appears to be. A poorly performing disk, such as a disk array that is rebuilding, will go to 100% busy but may not be transferring much data at all.

The transfer rate is an indication of how much data is moving between the disk and the system. This number can vary based upon the kind of I/O that the system is doing. Random I/O will generate less of a transfer rate because the disk will be forced to seek to new locations between I/Os. This time spent seeking will subtract from the amount of data that can be transfered. If the system is processing larger, more sequential I/O then it will tend to have a larger transfer rate.

Reading the % Busy rate tells how busy the system considers the disk. It is a measurement of how much time the system spent waiting for I/O requests to that disk. It is not a measurement of how much the disk is actually transferring or how efficient the disk is. When used with the transfer rate it can be used to determine what the maximum transfer rate is. A disk may not go 100% busy if the system lacks the processing power to support the I/O.

When looking for data beyond what topas gives the next place to look is to the iostat command. This is a rather comprehensive tool in terms of data that it provides for disk statistics. Once a hot disk has been found, filemon can be used to watch what files are being accessed and fileplace can be used to look for fragmentation in individual files.


topas does not display more networking information than what is available on the default screen. Additional information is available from the netstat or XXXstat (where XXX is the interface type - such as entstat, tokstat, etc...).

entstat (and its variants) work on the device layer (ent0) while netstat works on the upper layer (en0). The following command will display a screen full of detailed device statistics every second:
  while [ 1 ] ; do clear ; entstat ent0 ; sleep 2 ; done
A similar command for en0 is:
  netstat -I en0 2

There are a number of application specific tools, diagnostic aids, and trace based tools for network analysis. These include, but are not limited to: nfsstat, netpmon, iptrace, ipreport, ipfilter.

Thursday, 11 July 2013

Day-2-Day Unix Admin Tools


  Putty A free telnet/ssh client Download Putty
  Putty Connection Manager (Putty CM) A free telnet/ssh client with Tabbed windows - Download-PuttyCM
    More info about PuttyCM  
  SuperPutty Almost similar to PuTTYCM Download SuperPuTTy
  Multi-Tabbed Putty Multi-Tabbed putty Download-Multi-Tabbed Putty
  Poderosa Connection Manager Telnet and SSH client Download Poderosa
  Putty tab manager Windows tool for managing multiple PuTTY instances in a single tabbed window Download PuTTYTabManager
  AutoPutty AutoPuTTY is a simple connection manager / launcher Download AutoPuTTY
  Tunnelier SSH and SFTP client for Windows Download Tunnelier
  SecureCRT   Download SecureCRT
FTP/File sharing:
  WinSCP Free SFTP, SCP and FTP client for Windows Download
  FileZilla  Free SFTP and FTP client for Windows Download
  SSH Secure Shell Free SFTP and SSH client for Windows Download

Saturday, 6 July 2013

PowerVM QuickStart VII-Advanced VIOS Management

PowerVM QuickStart VII-Advanced VIOS Management

Performance Monitoring:

Retrieve statistics for ent0
entstat -all ent0
Reset the statistics for ent0
entstat -reset ent0
View disk statistics (every 2 seconds)
viostat 2
Show summary for the system in stats
viostat -sys 2
Show disk stats by adapter (useful to see per-partition (VIOC) disk stats)
viostat -adapter 2
Turn on disk performance counters
chdev -dev sys0 -attr iostat=true
• The topas command is available in VIOS but uses different command line (start) options. When running, topas uses the standard AIX single key commands and may refer to AIX command line options.
View CEC/cross-partition information
topas -cecdisp

Performance Monitoring:

Create a mksysb file of the system on a NFS mount
backupios -file /mnt/vios.mksysb -mksysb
Create a backup of all structures of (online) VGs and/or storage pools
savevgstruct vdiskvg (Data will be saved to /home/ios/vgbackups)
List all (known) backups made with savevgstruct
restorevgstruct -ls
Backup the system (mksysb) to a NFS mounted filesystem
backupios -file /mnt
• sysplan files can be created from the HMC per-system menu in the GUI or from the command line using mksysplan.
• Partition data stored on the HMC can be backed up using (GUI method): per-system pop-up menu -> Configuration -> Manage Partition Data -> Backup

VIOs Security:

List all open ports on the firewall configuration
viosecure -firewall view
To view the current security level settings
viosecure -view -nonint
Change system security settings to default
viosecure -level default
To enable basic firewall settings
viosecure -firewall on
List all failed logins on the system
Dump the Global Command Log (all commands run on system)

PowerVM QuickStart Series:

PowerVM QuickStart I-Overview
PowerVM QuickStart II-VIOS Setup & Management
PowerVM QuickStart III-Virtual Disk Setup & Management
PowerVM QuickStart IV-Virtual Network Setup & Management
PowerVM QuickStart V-VIOS Device Management
PowerVM QuickStart VI-Key VIOS Commands
PowerVM QuickStart VII-Advanced VIOS Management

PowerVM QuickStart VI-Key VIOS Commands

PowerVM QuickStart VI-Key VIOS Commands

VIOS commands are documented by categories on this InfoCenter page.

The lsmap command:

•Used to list mappings between virtual adapters and physical resources.
List all (virtual) disks attached to the vhost0 adapter
lsmap -vadapter vhost0
List only the virtual target devices attached to the vhost0 adapter
lsmap -vadapter vhost0 -field vtd
This line can be used as a list in a for loop
lsmap -vadapter vhost0 -field vtd -fmt :|sed -e "s/:/ /g"
List all shared ethernet adapters on the system
lsmap -all -net -field sea
List all (virtual) disks and their backing devices
lsmap -all -type disk -field vtd backing
List all SEAs and their backing devices
lsmap -all -net -field sea backing
Additional lsmap information

The mkvdev command:

• Used to create a mapping between a virtual adapter and a physical resource. The result of this command will be a "virtual device".

Create a SEA that links physical ent0 to virtual ent1
mkvdev -sea ent0 -vadapter ent1 -default ent1 -defaultid 1
›››   The -defaultid 1 in the previous command refers to the default VLAN ID for the SEA. In this case it is set to the VLAN ID of the virtual interface (the virtual interface in this example does not have 802.1q enabled).
›››   The -default ent1 in the previous command refers to the default virtual interface for untagged packets. In this case we have only one virtual interface associated with this SEA.
Create a disk mapping from hdisk7 to vhost2 and call it wd_c1_hd7
mkvdev -vdev hdisk7 -vadapter vhost2 -dev wd_c1_hd7

Remove a virtual target device (disk mapping) named vtscsi0
rmvdev -vtd vtscsi0

• Additional mkvdev information

PowerVM QuickStart Series:

PowerVM QuickStart I-Overview
PowerVM QuickStart II-VIOS Setup & Management
PowerVM QuickStart III-Virtual Disk Setup & Management
PowerVM QuickStart IV-Virtual Network Setup & Management
PowerVM QuickStart V-VIOS Device Management
PowerVM QuickStart VI-Key VIOS Commands
PowerVM QuickStart VII-Advanced VIOS Management

PowerVM QuickStart V-VIOS Device Management

PowerVM QuickStart V-VIOS Device Management

3.Low Level Redundancy Configuration
4.Best Practices / Additional Notes


Determine if SCSI reserve is enabled for hdisk4
lsdev -dev hdisk4 -attr reserve_policy
Turn off SCSI reserve for hdisk4
chdev -dev hdisk4 -attr reserve_policy=no_reserve
Re-enable SCSI reserve for hdisk4
chdev -dev hdisk4 -attr reserve_policy=single_path
Enable extended disk statistics
chdev -dev sys0 -attr iostat=true
List the parent device of hdisk0
lsdev -dev hdisk0 -parent
List all the child devices of (DS4000 array) dar0
lsdev -dev dar0 -child
List the reserve policy for all disks on a DS4000 array
for D in `lsdev -dev dar0 -child -field name | grep -v name`
  lsdev -dev $D -attr reserve_policy


Discover new devices
›››   This is the VIOS equivalent of the AIX cfgmgr command.
List all adapters (physical and virtual) on the system
lsdev -type adapter
List only virtual adapters
lsdev -virtual -type adapter
List all virtual disks (created with mkvdev command)
lsdev -virtual -type disk
Find the WWN of the fcs0 HBA
lsdev -dev fcs0 -vpd | grep Network
List the firmware levels of all devices on the system
lsfware -all
›››   The invscout command is also available in VIOS.
Get a long listing of every device on the system
lsdev -vpd
List all devices (physical and virtual) by their slot address
lsdev -slots
List all the attributes of the sys0 device
lsdev -dev sys0 -attr
List the port speed of the (physical) ethernet adapter eth0
lsdev -dev ent0 -attr media_speed
List all the possible settings for media_speed on ent0
lsdev -dev ent0 -range media_speed
Set the media_speed option to auto negotiate on ent0
chdev -dev ent0 -attr media_speed=Auto_Negotiation
Set the media_speed to auto negotiate on ent0 on next boot
chdev -dev ent0 \
      -attr media_speed=Auto_Negotiation \

Turn on disk performance counters
chdev -dev sys0 -attr iostat=true

3. Low Level Redundancy Configuration:

 • Management and setup of devices requiring drivers and tools not provided by VIOS (ie PowerPath devices) will require use of the root shell available from the oem_setup_env command.
• Tools installed from the root shell (using oem_setup_env) may not be installed in the PATH used by the restricted shell. The commands may need to be linked or copied to the correct path for the restricted padmin shell. Not all commands may work in this manner.
• The mkvdev -lnagg and cfglnagg commands can be used to set up and manage link aggregation (to external ethernet switches).
• The chpath, mkpath, and lspath commands can be used to manage MPIO capable devices.

4.Best Practices / Additional Notes

• Virtual Ethernet devices should only have 802.1Q enabled if you intend to run additional VLANs on that interface. (In most instances this is not the case).
• Only one interface should be configured to "Access External Networks" on a VLAN, this should be the virtual interface used for the SEA on the VIOS and not the VIOC. This is the "gateway" adapter that will receive packets with MAC addresses that are unknown. (This is also known as a "Trunk adapter" on some versions of the HMC.)
• VIOS partitions are unique in that they can have virtual host adapters. Virtual SCSI adapters in VIOC partitions connect to LUNs shared through VIOS virtual host adapters.
• An organized naming convention to virtual devices is an important method to simplifying complexity in a VIOS environment. Several methods are used in this document, but each represents a self-documenting method that relates what the virtual device is and what it serves.
• VIOS commands can be run from the HMC. This may be a convenient alternative to logging into the VIOS LPAR and running the command.
• Power 6 based systems have an additional LPAR parameter called the partition "weight". The additional RAS features will use this value in a resource constrained system to kill a lower priority LPAR in the event of a CPU failure.
• The ratio of virtual CPUs in a partition to the actual amount of desired / entitled capacity is a "statement" on the partitions ability to be virtualized. A minimal backing of actual (physical) CPU entitlement to a virtual CPU suggests that the LPAR will most likely not be using large amounts of CPU and will relinquish unused cycles back to the shared pool the majority of the time. This is a measure of how over-committed the partition is.
• multiple profiles created on the HMC can represent different configurations such as with and without the physical CD/DVD ROM. These profiles can be named (for example) as _prod and _cdrom.
• HMC partition configuration and profiles can be saved to a file and backed up to either other HMCs or remote file systems.
• sysplan files can be created on the HMC or the SPT (System Planning Tool) and exported to each other. These files are a good method of expressing explicit configuration intent and can serve as both documentation as well as a (partial) backup method of configuration data.
• vhost adapters should be explicitly assigned and restricted to client partitions. This helps with documentation (viewing the config in the HMC) as well as preventing trespass of disks by other client partitions (typically due to user error). 



PowerVM QuickStart Series: