Accessing the Data in Core Dumps

Check out this great article by Mark Ray!

http://www.ibmsystemsmag.com/aix/administrator/performance/core_dumps/

Accessing the Data in Core Dumps

http://www.ibmsystemsmag.com/aix/administrator/performance/core_dumps/

AIX Tips & tricks

SOME HANDY TIPS FROM  http://unixadminguide.blogspot.com/2013/12/aix-tips-tricks.html

AIX Tips & tricks 

Below are few of the AIX commands which will be useful for AIX admins.

1. To list machines configured in a NIM Server,
# lsnim -c machines

2. To list networks configured in a NIM Server,
# lsnim -c networks

3. To reset a machine (return to ready state)
# nim -Fo reset MachineName

4. To list core file settings for a user,
# lscore user1

The output will look like:
compression: on
path specification: default
corefile location: default
naming specification: off

5. To list the default settings for the system,

# lscore -d

The output will look like:
compression: off
path specification: on
corefile location: /corefiles
naming specification: off

6. To make any process run by root dump compressed core files and restore the location of the core files to the system default,

# chcore -c on -p default root
Note: If no default is specified, cores will dump in the current directory.

7. To enable a default core path for the system, type:

# chcore -p on -l /corefiles -d

8. To scan logical volume lv01, report the status of each partition, and have every block of each partition read to determine whether it is capableof performing I/O operations, type:

# mirscan -l lv01

9. To do the above operation in a PV,

# mirscan -p hdisk1

10. To do the above operation in a VG,

# mirscan -v vg01

11. To determine if the 64-bit kernel extension is loaded,

# genkex grep 64

12. To list all JFS file systems,

# lsjfs

13. To list all JFS2 file systems

# lsjfs2

14. To mirror a terminal1 on terminal2
a. Open terminal 1 and find the pts value (ps -ef grep pts)

b. Open terminal 2 and enter ‘portmir -t pts/1’
c. Now you will see commands and outputs from terminal 1 in terminal 2.
This is basically monitor a terminal.
d. Say “portmir -o” to end the mirroring after the use

15. To identify the current run level,

# cat /etc/.init.state

16. To list the available CD ROM drives,

# lsdev -Cc cdrom

17. To find out the speed of your network adapter,

# entstat -d ent0 grep “Media Speed”

18. To find out when your system was last installed/updated

# lslpp -f bos.rte

19. To list the status of your tape drive,

# tctl -f /dev/rmt0 status

20. How to setup anonymous ftp in AIX

Run the below script to setup anon ftp,
# /usr/lpp/tcpip/samples/anon.ftp

21. If telnet takes more time to produce a prompt, do the below checks

a. do nslookup of the client ip from the aix serverb.
b. Check the nameservers in /etc/resolv.confc.
c. Check the ‘hosts’ entry in /etc/netsvc.conf or NSORDER variable

This issue might be due to the DNS configuration issue. Pointing to a good nameserver should solve the problem.

22. How to shutdown the system to maintenance mode ?

# shutdown -Fm

23. How to log ftp accesses to a file

a. Add the below line in /etc/syslog.confdaemon.debug /tmp/daemon.log
b. # touch /tmp/daemon.log
c. # refresh syslogd
d. Modify your inetd.conf so that ftpd is called with the “-l” flag.

24. How to find a file name from inode number ?

# ncheck -i xxxx /mountpoint
where xxxx -> inode number of the file

25. How to redirect the system console to a file or tty temporarily

# swcons /tmp/console.out

or

# swcons /dev/tty5

26. How to recreate a deleted /dev/null file ?

# /bin/mknod /dev/null c 2 2

27. How to add commands that should get executed during every system shutdown ?

Add them to /etc/rc.shutdown

28. How to reduce the size or do cleanup of /var/adm/wtmp ?

# > /var/adm/wtmp

29. How to find out the fileset a file belongs to ?

# which_fileset command_name

30. In which file, the mapping of file Vs fileset stored ?

# /usr/lpp/bos/AIX_file_list

31. How to set maximum logins for a user in a system ?

Change the value of “maxlogins” under “usw” stanza in /etc/security/login.cfg

32. How to change the initial message that prints while logging in ?

Change the value of “herald” in /etc/security/login.cfg

33. How to set the # of seconds the user is given to enter their password ?

Change the value of “logintimeout” under “usw” stanza in /etc/security/login.cfg

TIPS: FLRT reports now include security and HIPER data

https://ibm.biz/BdRh6p

You’ve asked for it, and IBM delivered!

FLRT continues to provide update and upgrade recommendations based on your input level, usually your current level, for Power firmware, HMC, AIX, VIOS and many more products.

Now, in addition to the recommendations, you’ll see any security or HIPER fixes that have been released ‘on top’ of those levels, including your input level.

This provides you with options. First, you will be able to see what issues reside on each level. Based on this data, and the end of service dates, you can make decisions about updating or upgrading or staying on your current level.

Here’s an example of an AIX report:

image

Notice that the information is provided for each APAR or security advisory, with direct links. Or, you can see the information in the easy to use Security APARs or HIPER APARs tables. These tables also list the service packs that the fixes will be released in, so you can plan accordingly.

The report also provides abstract information if you hover over the APAR or CVE number with your cursor.  This allows you to get a quick view before having to click on the link.  Very useful!

Here’s a quick example of a report you can try this with:  http://www-304.ibm.com/webapp/set2/flrt/report?fcn=power&plat=power&mtm=9179-MHC&fw=AM740_100&hmc=V7+R740&p1.parnm=Partition+1&p1.os=aix&p1.aix=6100-07-07&p2.parnm=Partition+2&p2.os=vios&p2.vios=2.2.2.2&reportname=&btnGo=Submit

Here’s an example for a VIOS partition:

image

I hope you enjoy this new function and please let us know what you think with our feedback button or take our FLRT survey to let us know what other options you would like to see added to FLRT.

Thanks!!!

Julie Craft

FLRT architect

Austin, TX

su to NIS user fails with error 3004-503 cannot set process credentials.

Error description

su to NIS user fails with error 3004-503 cannot set
process creditials. This happens when system is upgraded
to 6.1 Tl09 SP01
Local fix
Problem summary

**************************************************************
* USERS AFFECTED:
* Systems running the 6100-09 Technology Level with
* bos.rte.security at the 6.1.9.0 or 6.1.9.1 level.
**************************************************************
*PROBLEM DESCRIPTION:
Switching to a NIS user using the ‘su’ command will fail with:  3004-503 cannot set process creditials.

This only affects customers using NIS (Network Information Service).
**************************************************************
* RECOMMENDATION:
* Install APAR IV53944.
* Prior to fix availability, an interim fix is available from
* either
* ftp://aix.software.ibm.com/aix/ifixes/iv53944/
* https://aix.software.ibm.com/aix/ifixes/iv53944/
**************************************************************
Problem conclusion

In the processing of NIS user credentials, the logic to find
stale cached records has been corrected so that the record is
not assigned an invalid pointer.
Temporary fix

*********
* HIPER *
*********
Comments

 

APAR information  
APAR number IV53944
Reported component name AIX 610 STD EDI
Reported component ID 5765G6200
Reported release 610
Status CLOSED PER
PE YesPE
HIPER YesHIPER
Submitted date 2014-01-13
Closed date 2014-01-27
Last modified date 2014-03-28

 

APAR is sysrouted FROM one or more of the following:

IV53884

Support Lifecycle Notice for AIX6.1 TL7 & AIX7.1 TL1

Support lifecycle notice
AIX 7.1 Technology Level 1
AIX 6.1 Technology Level 7

 

https://ibm.biz/BdRvy4

IBM announces the following schedules to help you plan for future upgrades to your AIX operating system. These plans are subject to change without notice.

AIX Technology Levels are supported for how to, usage, and problem identification for the entire life of the release. However, all Technology Levels have a limited support window for corrective service. If a fix is needed, you may be required to upgrade to a more current Technology Level to receive generally available fixes or interim fixes. IBM recommends you take a moment to verify your current service level. Simply run the ‘oslevel -r’ command.

 

Boost Your Productivity with Single-Line AIX Shell Scripts

 PowerITPro

Boost Your Productivity with Single-Line AIX Shell Scripts

Learn how to create time-saving shell scripts for AIX, UNIX, or Linux that run on a single command line.

Click here to read more on the PowerITPro site

 

Difference between backing up IBM Virtual I/O server using backupios with and without -mksysb flag

From:  Technology Magazine 

http://www.techmagazinez.com/2013/11/difference-between-backing-up-ibm.html

Thursday, 14 November 2013 

Difference between backing up IBM Virtual I/O server using backupios with and without -mksysb flag 

On this article ,we just want to list the difference between backing up IBM Virtual I/O server using backupios with and without -mksysb flag . I have seen people make confusion specially in interview.

 

Backing up the Virtual I/O Server using backupios command without any flag to a remote file system  will create the nim_resources.tar image in the directory we specify.  When the -mksyb flag is used, the resources used by the installios command are not saved in the image. Therefore to restore a VIO server from this image can be used only with NIM. Whereas creating a “nim_resources.tar” for Virtual I/O Server allows this backup can be reinstalled from the HMC using the installios command.

 

Procedure

 

The backupios command creates a backup of the Virtual I/O server and places it onto a file system, bootable tape or DVD. You can use this backup to reinstall a system to its original state   after it   has been corrupted. If you create the backup on tape, the tape is bootable and includes the installation programs needed to install from the backup.

 

For more information http://pic.dhe.ibm.com/infocenter/powersys/v3r1m5/topic/iphcg/backupios.htm


Task 1:
Login with padmin privilege to VIO server

Task 2:
Change to root privilege using command

$ oem_setup_env

Task 3:
Create a mount directory where the backup image, will be written to

# mkdir /vios01/backup

Task 4:
Mount a filesystem from the NIM master on the mount directory /vios01/backup on VIOS01

# mount server1:/export/mksysb /vios01/backup

Task 5:
Run exit to go back to the padmin privilege for running backupios command

#exit

Task 6
. Run the backupios command with the –file option. Make sure to specify the path to the mounted directory

$ backupios –file /vios01/backup/`hostname`.mksysb -mksysb — will create a .mksyb image
$ backupios –file /vios01/backup/ — will create a “nim_resources.tar ”

 

Technology Magazine 

http://www.techmagazinez.com/2013/11/difference-between-backing-up-ibm.html

 

Technology Magazine Post: IBM AIX EXTENDING MIRRORING SYNCHRONIZING ROOTVG

From:

Technology Magazine

http://www.techmagazinez.com/2013/10/ibm-aix-extending-mirroring.html?spref=fb

IBM AIX : Extending Mirroring Synchronizing ROOTVG

 Usually we get an old_rootvg or altinst_rootvg volume group  after alt_disk backup, upgrade or migration. On this tutorial we will  detail the steps of removing altinst_rootvg , then extending rootvg  and Mirror rootvg with background synchronization.

Let’s  See

Step 1: List the PV with command lspv as below to see which PV hold the old_rootvg / altinst_rootvg  VG . On this example, you can see the altinst_rootvg on hdisk6
removing altinst_rootvg
Step 2:Now let remove  altinst_rootvg using alt_disk_install command with -X flag as below.
After removing altinst_rootvg
Step 3 : After removing altinst_rootvg  list again the PVs again now the hdisk6 become None.
Cleaning up AIX ALTINST
Step 4: Extending rootvg to include hdisk6 using extendvg( -f for force ) command as below and list PVs to verify  now it is part of rootvg. Now we can see hdisk6 is assigned to rootvg.
Cleaning up AIX ALTINST
Cleaning up AIX ALTINST
Step 5 : Now Mirror and Synchronized the rootvg VG using mirrorvg command with -S flag , which will run synchronization in background.
a) Before Mirroring LPs and PPs number is same means it is not mirrored yet.
Cleaning up AIX ALTINST
b) Mirroring using “mirrorvg –S rootvg .
Cleaning up AIX ALTINST
From the man page of mirrorvg
-S Background Sync Returns the mirrorvg command immediately and starts a background syncvg of the volume group. With this option, it is not obvious when the mirrors have completely finished their synchronization. owever, as portions of the mirrors become synchronized, they are immediately used by the operating system in mirror usage.
c) After Mirroring: It might take several minutes to sync LVs as you can see in the below lots of LVs are still in stale state
Cleaning up AIX ALTINST
d) After Full Sync The Out Put will be like below
Cleaning up AIX ALTINST
Step 6 : Re Create the boot image on both rootvg’s PV hdisk6 and hdisk7 and include in boot list.
bootlist -o -m normal
# output: hdisk7 blv=hd5

bosboot -ad hdisk7
# output: bosboot: Boot image is 22698 512 byte blocks.
bosboot -ad hdisk6
# output: bosboot: Boot image is 22698 512 byte blocks

bootlist -o -m normal   hdisk7 blv=hd5  hdisk6 blv=hd5
# output: hdisk7 blv=hd5
# output: hdisk6 blv=hd5

UPDATE: Kimber’s POWER Sys Ref Docs – 10/4/2013

Kimber has updated his POWER doc collections.

For those that will always have network connections whenever needing POWER docs:

http://pref.kimberc.com/public/p7.html

For those that are not assured of having network connectivity;  Doug Ranz has slipstreamed all the docs into standalone PDFs:

 p4:  http://www.RealityDistortionField.com/POWER4%20Install%20&%20Service%20Guides.pdf
p5:  http://www.RealityDistortionField.com/POWER5%20Sys%20Ref.pdf
p6:  http://www.RealityDistortionField.com/POWER6%20Sys%20Ref.pdf
p7:  http://www.RealityDistortionField.com/POWER7%20Sys%20Ref.pdf

 

AIX 6.1 TL7 introduced a new flag for the ‘lspv’ command which shows the unique id (UUID) of disks in additional columns of the lspv output.

AIX 6.1 TL7 introduced a new flag for the ‘lspv’ command which shows
the unique id (UUID) of disks in additional columns of the lspv
output.

This new ‘lspv -u’ is particularly useful in VIO environments using
VSCSI because the VIO client LPAR hdisk UDID contains the real UDID
from the VIO server hdisk.

For example on a client LPAR using VSCSI for the rootvg (merged
columns and spaces in the UDID are not a paste error):

Client LPAR # lspv -u
hdisk0          00000000fb8a0572                    rootvg          active      533E3E21360170E50202E5A5A0000025E50A12AB20F1746      FAStT03IBMfcp05VDASD03AIXvscsi8060a98a-0292-e2c9-0382-b5263f2a7e61

VIO1 # lspv -u
hdisk0          0000000017b33224                    rootvg          active              2A1135000C5005474B9C30BST9146853SS03IBMsas                          b98fed26-76da-f15c-45c9-b65a814e3d75
hdisk1          000000009c4ae1f9                    rootvg          active              2A1135000C500546FA9330BST9146853SS03IBMsas                          c3435ec2-3db2-6c0e-f14e-947243ba482d
hdisk2          000000000572fb8a                    None                                3E21360170E50202E5A5A0000025E50A12AB20F1746      FAStT03IBMfcp      a9be7b27-42fd-b0d6-a5ba-da61929cf4fc
hdisk3          0000000038963f05                    None                                3E21360170E50202E5A5A0000037350A526780F1746      FAStT03IBMfcp      7ed82295-3d9e-36dc-d6e9-e094d0d1a4ee

VIO2 # lspv -u
hdisk0          00000000b46edc87                    rootvg          active              2A1135000C5004CE6C7FF0BST9146853SS03IBMsas                          a36f5dae-8281-4df7-7fa7-e9fbf619c7d5
hdisk1          00000000605de1f9                    rootvg          active              2A1135000C5004CE6CF8F0BST9146853SS03IBMsas                          d1148dc8-ea98-a255-bf34-2921a56e8ca1
hdisk2          000000000572fb8a                    None                                3E21360170E50202E5A5A0000025E50A12AB20F1746      FAStT03IBMfcp      a9be7b27-42fd-b0d6-a5ba-da61929cf4fc
hdisk3          0000000038963f05                    None                                3E21360170E50202E5A5A0000037350A526780F1746      FAStT03IBMfcp      7ed82295-3d9e-36dc-d6e9-e094d0d1a4ee

Our client UDID contains the UDID from the VIO server with a prefix
and suffix:

client hdisk0: 533E3E21360170E50202E5A5A0000025E50A12AB20F1746      FAStT03IBMfcp05VDASD03AIXvscsi
vio1   hdisk2: ^^^^3E21360170E50202E5A5A0000025E50A12AB20F1746      FAStT03IBMfcp^^^^^^^^^^^^^^^^^

where ^ indicates the prefix and suffix added by the VIO server.

Using UDIDs the client can be cross referenced to the server quickly
with the most significant bytes of the UDID, in this case the middle
15 digits.

Historically to find the real LUN that a client is using in a VIO
environment would require the following steps for each VIO server:

– Obtain client hdisk parent vscsi device hardware location code and
LUN number
– Lookup on HMC which VIO server and slot the client vscsi device is
linked to
– Lookup vhost adapter on VIO server by slot number
– Lookup VSCSI mappings for vhost adapter to location hdisk on VIO server

A client with dual VIO would have to repeat the procedure twice. PVIDs
can also shortcut the process, but they may not show up on the VIO
server’s lspv output until after they are written to by the client and
the VIO server is rebooted. If the client rewrites the PVID, the VIO
server can also be out of date. Thus UDID’s are the preferred method
because they are static values.

The output can stretch the columns until they merge and spaces in the
UDID break the columns, which I hope is fixed in a future release.

 

——————————————————————
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3