DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.


Installation specific commands in AIX

Below are the commands which are related to the installation in aix.


lslpp -l To see the details of installed file sets


lslpp -ha bos.net.* To list the installation history of all file set in bos.net packages


lslpp -f bos.rte To list the files in the bos.rte package


lslpp -w /etc/hosts To list the file set which contain /etc/hosts file (parent fileset)


lslpp -p bos.net.nfs.server To list the pre requisites for bos.net.nfs.server file set 


lslpp -d To show dependancies of fileset
          
installp -L -d /dev/rmt0.1 To list the installable products on the device rmt0


installp -aX -d /dev/rmt0.1 bos.net To install all filesets within bos.net and expands file system if it requires


installp -u bos.net To remove bos.net


installp -r To reject the applied software


installp -c -f To commit the applied fileset


installp -C To cleanup an incomplete installation


lppchk -c To check the fileset items and verifies that the checksum and filesize are consistent with SWVPD


lppchk -v verify that all filesets have required requisites and are completely installed


instfix -k IX9999 -d /dev/rmt0.1 To install the file set associated with fix IX9999 from rmt0


instfix -ik IX9999 To verify fix IX9999 installed


Paging space commands in AIX

Below are the commands related to the paging space in AIX.


lsps -a To list out all paging spaces


lsps hd6 To display the details of the paging space hd6


chps -a y paging00 To turn on the paging space paging00 on next reboot


chps -a n paging00 To turn off the paging space paging00 on next reboot


chps -s4 paging00 To increase the size of the paging space in 4 LP blocks


mkps -a -n -s4 newvg To create a paging space on VG newvg of 4 LP size (-s4) and activate it immediately (-n) and activate it at every restarts


rmps paging00 To remove the paging space paging00


swapon -a To invoke all entries in /etc/swapspaces file


swapon /dev/paging00 To make available swap space paging00


swapoff /dev/paging00 To disable swap space paging00



Disable telnet in AIX

The procedure to disable telnet in AIX is as follows:

#vi /etc/inetd.conf

comment out telnet from this file (#telnet ... ... .. )

save it and

#refresh -s inetd

Then telnet session will be disabled in that server from now

Filesystem commands in AIX

lsfs Lists all filesystems in the /etc/filesystems entry


lsfs -a To list all filesystems (default)


lsfs -q List all filesystems with detailed info (shows size of FS and LV in it. so we can check whether size of LV=size os FS)


lsfs -l Specify the output in list format


lsfs -c Specify the output in column format


lsfs -v jfs Lists all jfs filesystems


chfs -a size=24576 /test Change size of FS /test to 24576(blocks)x 512 bytes  (12 MB)


chfs -a size=+24576 /test Add 24576(blocks)x512 byte  to FS /test


chfs -a size=+64M /test Add 64 MB to /test


chfs -a size=10G /test fix size of the FS /test to 10 GB


chfs -m /test /new Change the mount point from /test to /new


chfs -A /test To auto mount the filesystem test


chfs -d account /test Remove account attribute of /test.(from /etc/filesystems file)


chfs -a splitcopy=/backup -a copy=2 /oracle This will mount the 2nd copy of mirrored filesystem oracle to /backup in read-only mode for backup purpose


crfs -v jfs2 -g newvg -a size=100M -m /test Creates FS /test of type jfs in VG newvg of size 100 MB with default LV.


crfs -v jfs -d /dev/lv00 -m /test Create FS /test of type jfs on device /dev/lv00


rmfs /test Deletes FS /test and associated LV


rmfs -r /test Deletes FS /test its mount point and associated LV


defragfs /test To defragment the file system /test


defragfs -q /test Display the current defrag status of the file system


fsck -y n /dev/lv00 To check the filesystem associated to /dev/lv00 assuming response "yes"


fsck -p /dev/lv00 To restore superblock from backup superblock




Recreate BOOT LOGICAL VOLUME (BLV) in AIX



If a Boot Logical volume (BLV) is corrupted, a machine will not boot.
(Eg:bad block in a disk might cause a corrupted BLV)

To fix this situation, You must boot your machine in maintenance mode, from a CD or Tape. If a NIM has been setup for a machine, you can also boot the machine from a NIM master in maintenance mode.

The bootlists are set using the bootlist command or through the System Management Services Progam (SMS). pressing F1 will go to SMS Mode.

then change the bootlist for service(maintenance) mode as 1st device to CD ROM.

#bootlist -m service cd0 hdisk0 hdisk1

then start maintenance mode for system recovery,

Access rootvg,

access this volume group to start a shell,

then recreate BLV using bosboot command.

#bosboot -ad /dev/hdisk0

it's important that you do a proper shutdown, All changes need to be written from memory to disk.

#shutdown -Fr

Imp: bosboot command requires that boot logical volume hd5 exists. If you wan create a BLV ( may be it had been deleted by mistake ), do the following,

1. Boot your machine in maintenance mode,
2. Create a new hd5 logical volume, one PP size, must be in rootvg,specify boot as logical volume type,

#mklv -y hd5 -t boot rootvg 1

3. Then run bosboot command as described.

If you have an HMC, then at the time of booting select boot as SMS in the menu

Turbocharge PuTTY with 12 Powerful Add-Ons

PuTTY Logo PuTTY is hands-down the best, free, and lightweight SSH client for Windows. I have provided list of 12 powerful PuTTY add-ons with screenshots, that will solve few shortcomings of the original PuTTY.  Play around with these add-ons and choose the one that suites your need.


1. PuTTY Connection Manager

PuTTYCM gives a nice feature to arrange several PuTTY sessions in tabs . While starting PuTTYCM for the first time, you should specify the location of the original PuTTY. This requires .NET 2.0 to be installed on the windows system. Following screen-shot displays three putty sessions in tabs within the same window.
Note: If the PuTTY Connection Manager opens the original PuTTY in a separate window, instead of opening as a TAB, please go to Tools -> Options -> Select the check-box “Enable additional timing for PuTTY capture (ms)” -> set the value to 300 ms. This will open the PuTTY window inside the TAB as shown below.

Note: Refer to the PuTTY Connection Manager Tutorial for more details on the PuTTY CM features.

PuTTY Connection Manager - Multiple Tab
Fig – PuTTY Connection Manager with multiple Tabs

2. PuTTYcyg

Cygwin users will absolutely love PuTTYcyg. This lets you use PuTTY as a local cygwin terminal. If you use cygwin on your windows, I’m sure you’ll hate the default MS-DOS looking cygwin window. Using PuTTYcyg, you can run cygwin inside PuTTY. I love this add-on and use it for my cygwin on Windows.
On PuTTYcyg, click on cygterm radio button in the Connection type. Enter – (hyphen) in the “Command (use – for login shell“, to connect to the cygwin on the windows laptop using PuTTY as shown below.

PuTTYcyg Cygterm radio-button
Fig – PuTTYcyg with Cygterm option

3. PuTTYtray

Using PuTTYtray, you can minimize the PuTTY window to the system tray on windows. By default, original PuTTY stores the session information in the registry. This is painful, when you want to transfer PuTTY sessions from one laptop to another. In PuTTYtray, there is an additional radio button “Sessions from file” as shown below, that will let you store session information in a file.

PuTTYtray
Fig – PuTTYtray with “Session from file” option

4. PuttyTabs

PuttyTabs provides a floating bar, that will display the open PuTTY sessions in TABs. Clicking on one of the tabs will bring the respective PuTTY session to the foreground. While starting PuTTYTabs for the first time, you should specify location of the original PuTTY. It reads the windows registry to get all the available PuTTY sessions. This also requires .NET 2.0 to be installed on the windows system. Following screen-shot displays three putty sessions arranged in tab.


PuTTYTabs Screenshot
Fig – PuTTYTabs with multiple Tabs

5. Quest PuTTY

Quest Software modified the PuTTY to add Active Directory (GSSAPI Kerberos) single sign-on feature. Quest PuTTY uses Microsoft’s Security Service Provider Interface (SSPI), which is Microsoft’s version of the GSSAPI, with which it is wire compatible. This version of PuTTY adds a new menu-item called GSSAPI, under Connection -> SSH, as shown below.

Quest PuTTY with GSSAPI
Fig – Quest PuTTY with GSSAPI option

6. Modified PuTTY

This modified PuTTY stores the PuTTY sessions in folder instead of storing it in the registry. If you already have sessions stored in the registry, it will display those also. The sessions stored in registry will be marked as [registry] as shown below. When you create a session using this PuTTY, this creates a sub-folder called session in the same folder where putty.exe is located, to store all the sessions in the file.

Modified Putty
Fig – Modified Putty displaying both registry and file sessions

7. PocketPuTTY

PocketPuTTY runs on Windows Mobile 2003/5.0 operating system. After I got my blackberry, I have dumped my Dell Axim that was running on Windows Mobile. So, I have not tried PocketPuTTY myself. If you’ve used PocketPuTTY or other mobile version of PuTTY, please leave your feedback.

PocketPuTTY UI
Fig – PocketPuTTY for Windows Mobile

Note: If you are using blackberry phone, refer to Blackberry PuTTY Tutorial for installing and configuring PuTTY on blackberry.

8. portaPuTTY

portaPuTTY is a modified version of the PuTTY that stores the session information in a file by default, instead of storing it in the windows registry. The session files are stored under .putty/sessions folder. The .putty folder is created under the same directory where the putty.exe is located.

9. PuTTY Portable

PuTTY Portable is part of PortableApps suite. Use this to launch PuTTY from the USB drive and carry the sessions along with you.

10. PuTTY Launchy Plugin

If you are using Launchy, the open source keystroke launcher for windows, you can use Putty Launchy Plugin, to launch putty sessions from Launchy very easily. i.e you can type “ssh” or “putty” followed by tab or space to list all of your PuTTY sessions. Once you select a particular session, Launchy will automatically launch that particular PuTTY session.

PuTTY Launchy Plugin
Fig – PuTTY Launchy Plugin. Type ssh followed by tab.

11. PuTTY Session Manager

PuTTY Session Manager will let you organize the PuTTY sessions into folders and assign hotkeys. This requires Microsoft .NET 2.0. Right click on the PSM icon in the system track and select “Session Hotkeys” to assign hot-keys for PuTTY session as shown below.

PuTTY Session Manager Hot Key Assignment
Fig – PuTTY Session Manager with session hot-key
To create a folder, right click on a particular PuTTY session -> Session Management -> New Folder. To move a existing session to a folder, just drag the session and drop to the corresponding folder.

PSM Session List with folders
Fig – PuTTY Session Manager with sessions inside sub-folder

12. PuTTY Command Sender

PuTTYCS is very helpful little tool that can boost your productivity by eliminating repetitive tasks performed on different servers. Using PuTTYCS, you can send a unix command to multiple PuTTY windows at the same time. You can use this to backup files, view log files, start and stop processes, copying file etc., on multiple servers, just by executing the command once, as shown below.

PuTTY Command Sender
Fig – PuTTYCS sends unix command to multiple PuTTY session