Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. 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.

Saturday 18 June 2011

AIX-Definitions

Definitions
Examples What it means
PHYSICAL PARTITION (PP) Smallest unit a PV is divided into (4 MB partition size)
LOGICAL PARITITION (LP) One or more PPs. LP represents a mirrored copy of a PP. Up to two copies of a PP can be mirrored resulting in a LP count of three (2 mirrors plus original).
LOGICAL VOLUME (LV) One or more PPs. A file system resides on top of an LV. Only one LV is mapped to a file system. A LV can't span across a VG. Up to 255 LVs in a VG
VOLUME GROUP (VG) One or more PVs. A collection of PVs that users view as a single oversized PV. A VG can consist of any mixture of physical disk types (size=320,355,400,670,800,857 MB), though performance is most consistent if devices of the same size are used in a single VG. Up to 32 VGs per system.
PHYSICAL VOLUME (PV) One or more LVs. Represents a hard disk (hdisk0).
AREA (VGDA) Information about all the LVs and PVs within a VG. First 64K of a PV is reserved for this area - defined in . The VGDA consists of
• BOOTRECORD: - first 512 bytes. Allows the Read Only System (ROS) to boot system
• BAD BLK DIRECTORY - found in
• LVM RECORD - found in
AREA (VGSA) Informations about which PPs are stale and which PVs are missing within a VG. The LVM and SCSI driver reserves somewhere between 7-10% of the available disk space for LVM maps, etc.
Logical Volume Set-up
All system LVs (hd1..hd8, hd9var) should reside in the VG named rootvg, under one PV if possible. This will allow complete re-installation of the system from your 'mksysb' tape without affecting the application data that resides on your other VGs.
There is no difference in response time between a single or multiple VGs. When an LV is accessed
• The ODM database (/etc/objrepos/*) is searched to determine which VG the LV belongs to.
• Then the VGDA for that VG is read to determine the physical placement of the LV on that PV and ultimately the physical track and sector where the data resides.
A few notes about Mirroring
Mirrored LVs that generate lots of write I/O calls, will cause a disk performance penalty (such as paging LVs). For LVs that encounter heavy read I/O calls, disk performance is increased. Since the LVM (logical volume manager) driver keeps track of the location of each disk head, the disk arm closest to the data being requested will be issued the read request. Further, mirroring can only be performed within a single VG. NFS mounted file systems cannot be mirrored.
top of page

Steps required to re-import VG's after a system re-install
When a system is re-installed, the disk drives may not be named in the same order as they originally appeared. If the system halts with the message 'performing Auto varyon of Volume Groups' on the console, perform these steps:
1. Press CTRL-C to continue and login as root
2. Export ALL non-root volume groups export
3. Shutdown and reboot the system shutdown -Fr
4. Re-import non-root volume groups importvg -y
top of page

Steps required to replace a failing PV from a non-root VG
1. Backup all filesystems found on the failing PV.
2. lspv -l (lspv -l hdisk2) To determine which filesystem(s) are found on the PV in question.
3. Find out how the LVs are laid-out on the PV so you will know how to re-create them when the time comes.
4. lslv -m (lslv -m oracle) You will use the output of the lslv command to serve as a template for creating a map file for this LV later on.
5. Unmount all filesystems on that PV. umount to unmount each filesystem from the PV in question.
6. Remove all LVs found on that PV. rmlv (rmlv /oracle)
7. Remove the questionable PV from the system. reducevg
8. Remove the PV entry from the ODM database. rmdev -l -d (rmdev -l hdisk2 -d)
9. Shutdown the system: Shutdown -F
10. Remove the bad PV and install the new PV
11. Add the new PV to the VG in question. extendvg (eg., extendvg datavg hdisk2)
12. Re-create the LVs removed from the OLD PV to the NEW PV.
mklv -y -m (mklv -y oracle -m oracle.map oraclevg 200 hdisk2)
The map file is assembled from the output generated from the lslv -m command in step 2 above. Do this for each LV that existed on the removed PV.
13. Re-size the filesystems on the new PV. mkfs /dev/ (mkfs /dev/oracle) Do this for each file system that existed on the removed PV.
14. Perform a filesystem check before mounting it. fsck -f /dev/ (fsck -f /dev/oracle)
15. Mount all filesystems on that PV. mount (mount /oracle)
16. Now restore the data you backed up
top of page

How to perform mirroring
1. mklv
2. mklvcopy
3. synvg -l
top of page

How to move a PV to another SCSI controller
As long as all your doing is moving a PV to another SCSI adapter and not placing that PV in another VG, then just move the PV to the other SCSI adapter and reboot. When the machine comes back up and finds that the disk is no longer located in its previous slot, it finds the exact PVID of the disk on the other adapter and assumes the disk was moved. It then changes the ODM accordingly, and your back in business again.
top of page

How to mirror a boot logical volume
Each hard drive is a potential boot device. The bosboot command creates a bootable image in the BLV (boot logical volume), which is used to boot AIX. The first block (sector) on the disk is called the boot block or IPL record. In addition, NVRAM contains a list of boot devices which can be specified by the bootlist command. The boot device can be changed by using the bosboot and bootlist commands. The format for these commands follows:
bootlist -m normal hdisk0 for normal operations
bootlist -m service fd0 rmt0 hdisk0 for service operations
bosboot -u -d /dev/hdisk0 bootable image in BLV on hdisk0
The bosboot command puts a bootable image in the BLV that is used to boot the system. Also, the bosboot command puts the physical sector number of the beginning ofthe bootable image on this disk, into the boot block of the disk. Since only one PSN (that of the primary copy of the BLV) is stored, therefore all copies of the BLV must reside on the SAME physical partitions of their respective devices.
An example of a mirrored BLV with 3 copies follows:
blk XXX, where XXX is the starting physical sector number in hex, within the specified physical partition (PP) number.
Copy 1 Copy 2 Copy 3
hdisk0 hdisk1 hdisk2
LP 1: PP 1(blk 200 ) LP 1: PP 6(blk C200) LP 1: PP 4(blk 8200)
LP 2: pp 2(blk 2200) LP 2: PP 7(blk E200) LP 2: PP 5(blk A200)
To use hdisk0 as the boot device, specify the following: bosboot -a -u -d /dev/hdisk0
The IPL record on hdisk0 indicates the boot image starts at PSN (physical sector number) 200. Now, the system can be booted using drive hdisk0.
To use hdisk1 as the boot device, issue the following: bosboot -a -u -d /dev/hdisk1
Because the bosboot program only looks for the PSN of the first copy, the IPL record indicates the starting PSN for the boot image as 200 instead of the correct C200. Attempts to boot with hdisk1 as the boot device will fail.
To mirror the BLV and get around this problem, do the following. Insure that all the copies occupy the same physical partitions on each device. It is not important which partitions the BLV uses, but all copies must use the same relative positions on the disk device. So, the configuration should be:
Copy 1 Copy 2 Copy 3
hdisk0 hdisk1 hdisk2
LP 1: PP 10(blk 20200) LP 1: PP 10(blk 20200) LP 1: PP 10(blk 20200)
LP 2: pp 11(blk 22200) LP 2: PP 11(blk 22200) LP 2: PP 11(blk 22200)
To move individual partitions around and keep them in sync, use the lmigratepp command.
To find available physical partitions on a disk, use lspv -m hdisk? Take the output of this command and choose two physical partition that are allocated/free on all the target disks and use these partitions to create your BLV image on multiple disk drives.
If your mirroring, make sure that PTF U407433 is installed. This allows you to disable the QUORUM feature. When one disk dies, the other disk will take over without checking to see if the quorum is still meet. (chvg -Qn rootvg)
When a write is performed to a disk containing mirrored copies, all copies are written simultaneously in parallel mode, and each is written sequentially in sequential mode.
Should the system crash while parallel writes are being performed to mirrored copies of the data, inconsistencies may exist between the data which was actually written to the different copies. To protect against this, the Mirror Write Consistency Cache was developed to write a record to the disk each time a mirrored write is in progress, so that when the system is rebooted, a record will show that possible inconsistencies may exist, and the data from the first physical partition is rewritten to all other physical partition copies. However, by enabling the Write Consistency Check, the penalty you pay is having to do an extra read/write when doing I/O. When this feature is disabled, if the system goes down because of power failure or system crash, you will need to MANUALLY perform a syncvg when the system is rebooted.
The jfslog is used to keep a record of file system metadata (superblock, inode, directories, etc) and also ensures the integrity of the file system.
The impact of losing the PV containing the jfs log will be quite serious. All file systems using that log will become unavailable.
top of page

bootinfo
Examples What it does
/usr/sbin/bootinfo -b Displays the boot PV device (hdisk0). The boot PV does NOT always refer to hdisk0. The boot PV will ALWAYS be the PV that contains the LV named hd5. The LV hd5 contains the boot logical volume (BLV), which contains the information needed to boot the system into a single/multi-user state
bootinfo -a hdisk1 320 4 8 00-01-00-00
top of page

chlv
Changes the attributes for an LV
Examples What it does
chlv -x 256 hd1 When creating large LVs or extending an existing LV to over 512 MB (assuming PP SIZE=4) in size, the following error message will be displayed: 516-787 extendlv: Maximum allocation for logical volume h1 is 128. To resolve this problem, perform the above command where 256 represents the MAXIMUM number of logical partitions that can be allocated for that LV. This command can be executed while the file system (residing on top of the LV) is mounted.
chlv -n informixlv lv00 Changes the name of LV from lv00 to informixlv. If there is a filesystem mounted on top of that LV, the file system must be unmounted and the LV must be in a closed state for this command to work.
chlv -n
top of page

cplv
Copy the contents from one LV to a new or existing LV
Examples What it does
cplv -e newroot hd4 Copies the LV hd4 to an LV named newroot. If newroot doesn't exist, it will be created. If newroot is smaller than hd4, the extra PPs from hd4 won't be copied to the desintation LV newroot
top of page

chpv
Change the characteristics of a physical volume
Examples What it does
chpv -a n hdisk2 Prohibits the allocation of additional PPs on PV hdisk2
chpv -vr hdisk2 Temporarily removes a PV from a VG (normally used for maintenance) This command removes the VGDA and VGSA copies from the PV, thereby affecting the number of copies required for a quorum.
chpv -va hdisk2 Returns an inactive PV back to the VG
top of page

chvg
Examples What it does
chvg -Qn rootvg This will turn quorum checking off (default is on). Afterwords, the volume group must be varied off and back on again to cause the change to take effect. In the case of rootvg, this means a reboot.
top of page

exportvg
Used to export a VG from one system so that it can be imported by another. This command will erase all data referencing the VG being exported from the ODM database, but won't remove this information from the VGDA (undefines the VG on the system). The information deleted from the ODM but not the VGDA is the LV and VG entries.
To manually transport a VG between systems, the normal process is to varyoff and export the volume group on System A:
varyoffvg VG
exportvg VG
Then move the drives to System B followed by importing them and finally varying them on:
importvg -y VG PV
varyonvg VG
exportvg vg2
importvg -y vg2 hdisk1 #hdisk1 is PV that belongs to VG named vg2
varyonvg vg2
The above steps can be used to correct the ODM when it is not in sync with the VGDA
top of page

extendvg
Add a new physical drive to a volume group
Examples What it does
extendvg datavg hdisk3 Adds the PV hdisk3 to VG datavg. This increases the size of the VG by adding one or more PVs.
top of page

getlvodm
Examples What it does
getlvodm -u rootvg Will determine whether the ODM or VGDA has the correct copy of the VGDA. If the above command returns the character 'y' for the VG specified, then the ODM database is correct and the VGDA is out-of-sync. To correct the situation when the VGDA doesn't have a good copy, perform the following steps:
1. importvg -y vg2 -f hdisk1 use force option
2. varyonvg -f vg2 use force option
3. copy data off drive
4. reducevg vg2 hdisk1
5. rmdev -l hdisk1 -d
6. cfgmgr
7. extendvg vg2 hdisk1
8. add file systems
9. restore data previously backed off to tape
top of page

importvg
Used to import a VG from a system that exported it. This command will restore the ODM database from information read from the VGDA. When a VG is imported, /etc/filesystems will be updated with any entry points needed for those LV's and mount points not currently defined.
top of page

ipl_varyon
Examples What it does
ipl_varyon -i Indicates which PV is your BOOT drive
top of page

lqueryvg
Examples What it does
lqueryvg -p hdisk0 -v List the VG id in which the PV hdisk0 resides
lqueryvg -p hdisk0 -L List all the LV ids/names in the VG where PV hdisk0 resides
lqueryvg -p hdisk3 -P Lists all the PV ids that reside in the VG where hdisk3 resides
top of page

lslv
List characteristics about a logical volume
Examples What it does
lslv hd3 Display attributes of the LV hd3
lslv -l hd3 List distribution of where LV hd3 resides on PV hdisk1
lslv -m hd3 List distribution of PPs where LV hd3 resides on PV hdisk1
• MAX Lps: If LV created is larger than 512 MB (128 * 4), then this field needs to be upped by the following formula: (LV size in megabytes) / PP size = MAX LP count 900 MB / 4 = 225 The command to change the LP count to 225 for an LV named pick is: chlv -x 225 pick
• COPIES:
o value is 1= original copy
o value is 2= first mirrored copy
o value is 3 = second mirrored copy
• STALE PPs: If COPIES > 1 and STALE PPs > 0, means that a mirrored LP is not available or current with other LPs.
• INTER-POLICY:
o If set to MIN, an LV will only reside on 1 drive
o If set to MAX, an LV can span multiple LVs. Distributes an LV among more than 1 PV.
• INTRA-POLICY: Has 3 values (edge, middle, center). When an LV is created, it will be assigned 1 of the 3 allocation strategies listed above.
• EFFICENCY: Represents the efficency with which PPs are allocated based on the 3 possible states of the intra-policy.
• RELOCATABLE : If yes, then the 'reorgvg' command is allowed to move the LV to a new position on the current PV or be placed on another PV.
• SCHEDULING POLICY: If set to PARALLEL, insures writes to mirrored copies are performed to seperate PVs in parallel.
• WRITE-VERIFY: If set to NO, will not perform a follow-up read to each write for verification.
• MIRROR WRITE CONSISTENCY: When enabled, suffer a 20% performance penality. Use the syncvg -v command to resync disk drives in a VG that loses a PV.
top of page

lsps
List characteristics of paging space(s).
PAGING SPACE LOW messages will be generated when 512 pages remain free in the pool of free pages. Processes will be terminated when only 128 pages of free memory are left.
AIX determines which users have the most page space allocated to them and selects those processes for termination. All real memory allocated to a process will have a backing store of equal size (for every page of real memory allocated, there will be a page of disk space from paging space allocated)
Its recommended that the first paging space (/dev/hd6) be larger, since this one is brought on sooner than the rest, resulting in being more full than the others.
Thrashing should not be confused with the problem of low paging space. Low paging space is the condition in which the amount of paging space is insufficient. Thrashing is the condition in which the amount of RAM is insufficient. Low paging space involves the consumption of disk space; thrashing involves the consumption of RAM and disk I/O.
Example: lsps -a (Display attributes of all paging spaces)
LV hd6 is the default paging space. If more than one paging LV is defined, hd6 will always have a higher percentage of utilization since this is the first paging LV turned on at boot time. Once all the other paging LVs have been swapped on, paging is allocated on a round robin basis - four pages (pagesize is 4k ) at a time.
80% (MAXPERM) of real memory is to be used by persistent storage. Persistent storage is information that is not paged to the page space (/dev/hd6) but rather is paged to the physical volume where that file resides.
top of page

lspv
List charactertistics of a physical volume
Examples What it does
lspv hdisk0 Stale partitions refers to mirroring. If the PV has no mirrored LPs, then the value for this field is zero.
lspv -l hdisk0 Display distribution of what LVs reside on the PV named hdisk0
lspv -p hdisk0 Display distribution of PPs for each LV that resides on the PV named hdisk0
top of page

lsvg
List characteristics about volume groups
Examples What it does
lsvg rootvg Display attributes for VG rootvg
lsvg -p rootvg Display PV distribution about VG rootvg
lsvg -o Lists all active VGs in the system
top of page

migratepv
Moves one or more LVs to one or more PVs. If '/dev/hd5' is moved to another drive, a spcial step is required, else the system will not boot the next time it's rebooted.
Examples What it does
migratepv hdisk0 hdisk1 Moves all LVs from hdisk0 to hdisk1
migratepv -l hd1 hdisk2 hdisk1 Copies all PPs for LV hd1 from hdisk2 and places them on a PV named hdisk1
top of page

mklv
Creates a logical volume on a physical volume
Examples What it does
1) mklv -y hd7 -t sysdump -a e rootvg 2 hdisk0
2) sysdumpdev -P -p /dev/hd7 The first command will create a LV dump device named hd7 that consists of 2 PPs located on the edge of PV hdisk0. The second command will assign the system dump device to LV /dev/hd7.
1) mklv -y hd5 -t boot -a e rootvg 2 hdisk2
OR
1) migratepv -l hd5 hdisk0 hdisk2
2) bosboot -a -l /dev/hd5 -d /dev/hdisk2
3) bootlist -m normal hdisk2 Creates and updates a new boot logical volume (hd5) on PV hdisk1. When you move the /blv (boot) file system, you MUST change the disk from which the system tries to boot from to NORMAL mode.
top of page

mklvcopy
Makes a mirrored copy of an LV. Note that this command will allocate PPs for the next copy, but the data within is not updated. This must be performed by the syncvg command.
Examples What it does
1) mklvcopy hd1 2 hdisk1
2) mklvcopy hd2 2 hdisk1
3) mklvcopy hd3 2 hdisk1
4) mklvcopy hd4 2 hdisk1
5) mklvcopy hd5 2 hdisk1
6) mklvcopy hd6 2 hdisk1
7) mklvcopy hd7 2 hdisk1
8) mklvcopy hd8 2 hdisk1
9) syncvg -v rootvg Will mirror the operating system so that the system may be booted from either disk in the case of a disk drive failure. The syncvg command will insure that all LVs just copied will be in synchronized with each other.
• The third parameter ('2') means make a copy of the original LV (hd?) on the PV named hdisk1.
• If the third parameter was a '3', then each LV would have 3 copies total - 2 mirrored copies and the original.
1) mklvcopy -m lv00.map lv00 2
2) syncvg -l lv00 When creating the LV named lv00, use the map file named lv00.map. Using the syncvg command will update the mirror copy.
top of page

putlvodm
Reads LV data from the command line and writes it to appropriate ODM (Object Data Manager) class fields.
Examples What it does
putlvodm -K `getlvodm -v rootvg` Unlocks a VG so that the LVM commands can access or change information about a particular LVM device.

If the message 0516-366 lsvg: Volume group rootvg is locked is ever seen, the above command will unlock the VG in question.
top of page

redefinevg
Determines which PVs belong to the specified VG and re-enters this information into the ODM. This command is typically used to fix inconsistencies in the ODM database by reading a copy of the VGDA and recreating the ODM entries as needed.
Examples What it does
redefinevg -d hdisk0 rootvg Updates the ODM for a specific VG with the information stored in the VGDA
top of page

reducevg
Removes one or more PVs from a VG
Examples What it does
reducevg rootvg hdisk1 Removes the PV hdisk1 from the VG rootvg.
reducevg -df rootvg hdisk2 Removes hdisk2 from the VG rootvg and all LVs on that PV that weren't previously removed.
top of page

restbase
Reads the base customized information from the boot image and restores it in the ODM
top of page

rmlv
Removes a logical volume from a volume group
Examples What it does
rmlv lv00 Removes the LV lv00 from a VG and restores that space back to the free DASD list. The amount of free disk space returned can be verified by executing the lsvg rootvg command before the rmlv command is executed and after it.
• If there is a file system associated with the LV to be deleted, it first must be unmounted.
• Further, the references to that file system will not be removed from the /etc/filesystems. The rule when removing a file system is to first umount the file system and then use the 'rmfs' command to remove all references of this file system and it's associated LV.
top of page

rmlvcopy
Removes logical partition (mirrored) copies. If no PV named is included with this command, the last copy created will be removed first.
Examples What it does
rmlvcopy lv00 2 Removes both copies of the LV lv00
rmlvcopy lv00 1 hdisk2 Only the copy (LV:lv00) that exists on PV hdisk2 is removed.
top of page

savebase
Reads the base customized information from the ODM and restores it to the boot device (hd5).
top of page

schedtune
A memory load algorithm that detects when the system is thrashing and suspends active processes and delays the initiation of new processes for a period of time. Since the suspended processes are not scheduled, their pages in RAM are not being referenced, and are freed for other processes to use.
When thrashing stops, the suspended processes are gradually activated again. The result is that the performance is much more predictable and constant when RAM is in demand. Schedtune is part of the lpp named 'bosadt.lib.obj' or PTF U412059. AIX does't allocate a page until you actually attempt to use it.
Examples What it does
schedtune -h 0 Disables memory load control. Memory load control is ENABLED by default.
schedtune Determine current settings for load control.
schedtune -D Resets memory load control to its default characteristics
top of page

syncvg
Synchronizes stale partitions within VG. syncvg is automatically run when the VG is varied on ('varyonvg' command).
Examples What it does
syncvg -v rootvg Synchronizes stale partitions on any PV that belongs to VG rootvg.
syncvg -l lv00 Synchronizes the LV lv00 so that all copies are identical
top of page

synclvodm
Will read the VGDA from the PV specified and update the ODM database. This command is typically used to fix inconsistencies in the ODM database, by reading a copy of the VGDA and recreating the ODM entries as needed.
Examples What it does
synclvodm rootvg hd1 Rebuilds the ODM database for a LV hd1, by reading the VGDA.
top of page

sysdumpdev
Operations performed on the system dump device
Examples What it does
sysdumpdev -p sysdumpnull Turns off the dump device
sysdumpdev -p hd7 Reactives the dump device
updatevg rootvg Resynchronizes the VG information in the ODM
top of page

varyoffvg
Takes off-line a VG and all associated file systems and LV's. If a file system or LV is still mounted or open when this command is executed, the command will fail. A VG that has an active paging LV cannot be varied off or exported.
Use the chps -an to disable the paging LV followed by rebooting the system.
Must umount all file systems on each PV that belongs to a VG before it can be varyed-off
Examples What it does
1) umount /oracle
2) varyoffvg oracle Varys-off ALL PVs associated with the VG named oracle. Essentially makes that VG inaccessible
top of page

varyonvg
Activates a VG. Takes the information stored in the ODM database and updates the kernel.
Examples What it does
varyonvg oracle Activates the VG named oracle and makes accessible any LV and/or file system that belongs in that VG
varyonvg -m1 oracle Will insure the ODM database matches the attributes stored in the VGDA (syncs VGDA to ODM) and reports the status of all PVs.
varyonvg -f oracle Used if the VG attempting to be varied on was not properly exported from another system, due to a system crash or some similiar instance. This force option is only needed when there is a problem with the VGDA on the imported VG

AIX-CMD 2

AIX Commands
AIX commands
faq52-4668
Posted: 20 june
SANDEEP TANTI

***********************************************************************************

1. Useful commands
Note All AIX commands reference can be found under
http //www.austin.ibm.com/doc_link/en_US/a_doc_lib/aixgen/wbinfnav/CmdsRefTop.htm
1.1 Memory
bootinfo –r shows how much RAM does my machine has (as root)
lsattr –E –l sys0 –a realmem shows how much RAM does my machine have (as non root)
rmss -c 512
rmss -r sets the memory size to 512 MB
resets the memory size to the original one
1.2 Devices

lsattr -El en0 displays en0 driver params
lsattr -El ent0 displays ent0 HW params
lsattr -El rmt0 displays tape params
lscfg -vp -l rmt0 (all information about a tape drive)
lsattr -El sys0 displays system type, firmware, etc driver params
lscfg –v lists all system HW config (NVRAM)
lsdev –Csscsi list all scsi devices
lsdev –Cspci list all pci devices
lsparent –Ck scsi list all scsi adapters
lsdevfc list fiberchannel devices
cfgmgr Configures devices
lsdev -Ccdisk Shows all disks
lsdev -Cctape Shows all tapes
cfgmgr -v -l device –v Specifies verbose output. The cfgmgr command writes information about what it is doing to standard output.
cfgmgr -v -l device Name Specifies the named device to configure along with its children.
If you only turned on a disk tower at e.g. scsi2 cfgmgr -v -l scsi2 will only configure this with detailed output.
lsdisp To check which graphic adapter is installed.
lscfg -vp -l mga0 (all information about a adapter)
lscfg -vp -l hdisk0 | grep Machine gives info about the disk manufacture type
lsslot -c pci For 6F1 only !!!! Lists all slots ,voltage,boards,etc !!!!
bootlist -m normal cd0 rmt0 hdisk0 Changes the default bootlist
lsmcode -c display the system firmware level and service processor
lsmcode -r -d scraid0 display the adapter microcode levels for a RAID adapter scraid0
lsmcode -A display the microcode level for all supported devices


1.3 System info

/usr/bin/uname -m Get machine ID
/usr/bin/uname -M Get platform type
oslevel Displays current AIX level
oslevel -r Displays current AIX maintenance level
oslevel -g List filesets at levels later than maintenance level !!!
lsps -a Paging space settings.
lscfg -vp -l proc0 (1,2,3) (all information about a processor[s])
lscfg -vp -l mem0 |pg (all information about memory modules installed)
env ulimit Environment setings - show user ulimit
bootinfo –s hdisk0 Displays disk size
lsattr -El sys0 -a systemid Determines the system serial number
lscfg –vp|grep ROM|grep -v CD Determines the system Firmware level
1.4 System issues

TERM=vt100 -If you execute a command/application and it responds with msg
‘ The type of your terminal is unknown to the system’,run those commands (In ‘ksh’)
set term=vt100 -Same (In tcsh’)
rcp -rp /dataVolumes/brisque1.1.0/jobs/flower.job sciroot@ripro3:/dataVolumes/ripro3.3.0/jobs/ -Copying a file from one Unix machine (Brisque) to another (Server) the assumption is that both machines know each other’s names (in hosts file)
dd if=/dev/fd0 of=/temp/diskimage bs=4096 -Duplicate a diskette copy from diskette to hard drive
dd if=/temp/diskimage of=/dev/fd0 bs=4096 -copy diskette image onto diskette
/usr/lpp/X11/bin/xset -display unix 0 s off -Kill display timeout
lsfs -v jfs -List of Filesystem items.
lsfs -q -v jfs -you can see also the parameter of a filesystem and thus see if e.g. /backup was or is a big_filesystem_enabled one.
Important for the 2GB File limit.
lsuser –f root Shows all user parameters (max .file size,etc)
sysdumpdev -L Check last system dump status
sysdumpdev -l Check system dump device settings
lslpp -f Upd_Timna_DTM.obj List contents of the package
1.5 Networking

ksh
for ENT in ` lsdev –Cs pci|grep ent | awk '{ print $1 }'|cut –c 1,2,4 `;do
mktcpip –S $ENT
done
exit -Shows all interfaces IP config+mask+router+DNS !
host timna1 displays station default IP address – works ONLY in DNS environment
ifconfig en0 displays en0 driver params
netstat -i displays network interfaces setting
mktcpip -S en0 #host:addr:mask:_rawname:nameserv:domain:gateway:type:start
syslab18:192.9.100.1:255.255.255.0:en0:10.4.2.12:csil.creoscitex.com:10.4.30.1:N/A:no
GREAT TCPIP info in one command !!!
showmount –e displays all exported volumes
showmount -a show who's got my filesystemsses mounted over IP !
lssrc –g tcpip displays all IP oriented processes status
entstat -drt ent0 |grep –i error display any communication errors on etn0
entstat -r Resets all the statistics back to their initial values.
arp -a shows a local arp cache
cd /usr/local/es/;res restarts appletalk
netstat -ptcp shows IP statistics
netstat -pudp shows UDP statistics
netstat -c
-s
-m client only;
server only
NFS mount
netstat -I en0 10 Trace en0 every 10 seconds
netstat -rn Display routing info with IP address (10.4.27.182)
netstat -in Shows the state of all configured interfaces
netstat -r Display routing info with full hostnames (timna2.csil.creoscitex)
nfsstat –z ;to reset NFS stats without reboot
cat /etc/resolv.conf Check DNS settings
stopsrc –g NFS To stop NFS services on a client
startsrc –g NFS To start NFS services on a client
traceroute 149.115.39.1 Trace all hobs (interconnections=routers) to the destination IP
netpmon -o netpmon.out
trcstop Traces all network processes activity into a logfile. Must be preceede by a trcstop command !
nslookup hostname Shows the DNS server name and address
ping -R -c 1 bnc2 Ping with displaying the routing info
namerslv -s | grep domain | awk '{ print $2 }' Displays a fully qualified domain name of a host
rup Shows the status of a remote host on the local network
nmonnfs Traces all NFS processes activity
mount hostname:/filesystem /mount-point Mount an NFS filesystem
mknfsexp -d /directory Creates an NFS export directory
mknfsmnt Creates an NFS mount directory
rmnfs Stops and un-configures NFS services
mknfs Configures and starts NFS services
exportfs -u (filesystem) Un-exports a filesystem
exportfs Lists all exported filesystems
exportfs -a Exports all fs's in /etc/exports file
1.6 Disks

synclvodm -vP svg3 synchronizes ODM and the disk VG info.
redefinevg svg3 Redfined VG definition in ODM
lqueryvg -p hdisk0 –Avt -reads logical volumes info from disk
bootinfo -s hdiskx Shows Megabytes available even if no volume group is assigned.
lspv -p hdiskx (PP's used, location on disk, mount point)
lscfg -vp -l hdiskx (all information about a disk/raid)
1.7 Filesystem

chfs -a size=+200000 /var increases /var FS by 100MB
du -sk /john shows directory used space in kb !!!!
mount all mounts all FS
umount /dataVolumes/rtest9.1.0 unmounts a FS
fuser -k /dev/cd0 Releases a CD that will not unmount !
fuser –c /dataVolumes/rtest9.1.0 -Find out which process_id lock the FS
istat Shows when the file was last created/modified/accessed !!!!
1.8 System monitoring

istat Shows create/modify/access file info
alog -o -t boot | more displays system boot log
w Lists login users and their programs.
who Identifies the users currently logged in
/usr/local/es/swho Identifies the Ethershare users currently logged in
last |more shows last logins
last –20 Shows recent 20 lines
last root Shows username ‘root’ login/logout record
last ftp Shows all FTP session in the record
mount shows all mounted filesystems (nfs+local)
ps -ef show all running processes
ps -ef |grep Scitex show all scitex running processes
du -ak /scitex|sort -n -r|head –10 -Display 10 biggest directories on the volume by size
find /scitex -xdev -size +2048 -ls|sort -rn +6|head –10 -to find 10 top files in the root (/) directory larger than 1 MB.”-xdev” helps searching ONLY in “/” !!!!!!!!!
history Last commands run on the system by this user
alog -ot boot Lists a log of all boot operations
grep TX /etc/environment Verify daylight settings
1.9 Performance issues

nmon a nice monitor - runs only on AIX5 and up
topas a nice monitor - runs only on AIX 4.3.3 and up
monitor -top 10 -s 2 monitors system 10 top processes with 2 seconds
iostat 2 displays disks activity every 2 seconds refresh interval
iostat –a 2 AIX5 ONLY !!!!
displays disks and ADAPTER !!!! activity every 2 seconds refresh interval
vmstat 2 ;monitors virtual memory statistics every 2 seconds (see appendix A)
sar –P ALL 2 2 Show all CPU’s activity on an SMP machine
svmon –i 2 Monitors real and virtual memory
ps auxw | sort –r +3 |head –10 -Shows top 10 memory usage by process
ps auxw | sort –r +2 |head –10 -Shows top 10 CPU usage by process
ps –auw | grep defunct Shows zombies processes (to kill – reboot or kill the parent)
filemon –O all –o filemon.out ; find / -name core ; trcstop Traces FS,LV,disks,files activityof a “find” command into a logfile (filemon.out). Must be preceded by a trcstop command.
tprof –x find / -name core ; trcstop Traces CPU activityof a “find” command Severall logfile are created. Must be preceded by a trcstop command.
tprof -ske -x "sleep 30" -Trace CPU activity for next 30 seconds.Results in file sleep.tprof

lvmstat –ev svg1
lvmstat –v svg1 2 AIX5 ONLY !!!!
enable gathering the VG statistics
Display VG logical volumes statistics every 2 seconds
1.10 Remote issues (working over the modem)

pdelay tty0; pdisable tty0 >/dev/null ;penable tty0
-Resets tty0
stty erase '^?' Makes bakespace to work
/scitex/version/utils/modem/kermit -l /dev/ttyx –c atdt {phone #} Use Unix to Dail-out (for any reason) ttyx is the serial port the cable is connected
/scitex/version/utils/modem/kermit -s /u/d0/ripro_messages -i Sends a file to a remote desktop in binary mode
/scitex/version/utils/modem/kermit –r
-Receives a file to from remote desktop
1.11 Browsing errlog with errpt

errpt -a -s 0604090601 -e 0605090901 browse the errlog in detail for all errors within a timeframe
errpt -a -N SYSPROC |more
errpt -a -N SYSPROC > /tmp/err.log Browse the errlog for the SYSPROC resource, can be into the file
errpt -j 5DFED6F1 -Browse the errlog by the identifier
errpt –A -AIX5 ONLY !!!! Shows less detailes then errpt -a
errpt –D -AIX5 ONLY !!!! eliminates double entries
1.12 Security issues

chmod -s Filename Remove Sticky Bit to a file or directory

chmod +r+w+x+t Filename Add Read+Write+Execute+Temp mode to a file or directory.
This is a ‘blanket’ change for all owner, user & group.
Numeric Access Modes
0 (---) - no access
1 (--x) - execute permissions; search permissions for directories
2 (-w-) - write access
3 (-wx) - execute/search permission and write access
4 (r--) - read access
5 (r-x) - execute/search permission and read access
6 (rw-) - read and write access
7 (rwx) - execute/search permission and read and write access
mkpasswd -f rebuild the /etc/passwd indexes in case of suspected corruption
1.13 Miscellaneous
ksh
find / -type f|xargs grep "10.4.27.181" 2> /dev/null
-Find all files containing my IP address
compress -c file > file.Z Compresses the files while keeps the original
whereis Returms full path of program

AIX-FAQ


AIX FAQ

Creation: 18 june 2011
Update: 18 june 2011
Version: aix 5.3


SANDEEP TANTI

Table of Contents
1. configuration
• 1.1. How to know the main characteristics of a server?
• 1.2. how to know when the last reboot?
• 1.3. Getting the settings of the machinery?
• 1.4. How to tell if the server runs 32-bit?
• 1.5. How to identify the type of server used?
• 1.6. How to display devices available?
• 1.7. How to display devices installed?
2. Boot
• 2.1. What is the boot disk?
• 2.2. What is the boot order?
• 2.3. How to determine which drives are bootable?
3. mksysb
• 3.1. how to remove a disk image sandwich?
• 3.2. how to clone the current rootvg on a disk?
• 3.3. How to install the image of a mksysb in mirroirsur 2 discs?
• 3.4. How to generate a mksysb?
• 3.5. How to list the files in a mksysb?
• 3.6. How to restore a file or directory from a mksysb?
4. odm
• 4.1. How to get the ID for a disc?
• 4.2. how to remove an object of the MDGs?
• 4.3. how to list an object of the MDGs?
• 4.4. What is LMVCB?
• 4.5. How do I check the block volume control logic
• 4.6. How to find a sub-system in the odm?
• 4.7. How to find a package in the odm?
5. Partitioning
• 5.1. how to list the slots occupied by a partition?
• 5.2. how to find the slot for a disc?
6. network
• 6.1. Upgrade network interfaces?
• 6.2. How to know the parameters of a network interface?
• 6.3. How to activate or deactivate a card?
• 6.4. Getting the characteristics of a map?
• 6.5. How to know the speed and type of negotiating a map?
• 6.6. How to check the routing tables?
• 6.7. How to add a route?
• 6.8. How to check the performance of a map?
7. nfs
• 7.1. Quickly add an NFS mount?
8. nim
• 8.1. how to verify that a customer is supported by NIM?
• 8.2. how to clone a rootv of a client via NIM?
• 8.3. How to restore the status of a customer to zero?
• 8.4. How to know the status of a customer?
• 8.5. How to know the mksysb associated with a server?
• 8.6. How to check the files installed on a client server?
• 8.7. How to alt_disk_install NIM on a client?
• 8.8. How do I change the mksysb associated with a client NIM?
9. Memory
• 9.1. What is the available memory (all inclusive)?
• 9.2. What is the available memory (all inclusive)?
• 9.3. how to eliminate the CPI of a given user?
• 9.4. What is the status of memory?
• 9.5. how to know if I have 32-bit or 64-bit?
• 9.6. How to know the real size of memory?
• 9.7. know how the available memory (primary and secondary) and its distribution?
• 9.8. how to eliminate "ls * The parameter list is too long?
10. process
• 10.1. how to test if a process is this?
11. Discs
• 11.1. how to verify a disc?
• 11.2. know how the occupation of a disc or a lv?
• 11.3. how to get the list of disks?
• 11.4. know how rootvg disks and disks rotated?
• 11.5. How to know the size of a disk PPsize and its occupancy rate?
• 11.6. How to know the size of a disk PPsize and its occupancy rate?
• 11.7. how to retrieve a disc already used in a vg?
12. lvm
• 12.1. How to get the VGDA?
• 12.2. that contains LVM?
• 12.3. Or is the copy in memory of VGDA?
• 12.4. how to get the LVCB?
• 12.5. How to know the allocation policy?
• 12.6. How to check the consistency of the volume of rootvg logical (/ tmp, ...)?
• 12.7. What are the codes allocation policy?
• 12.8. How to know the characteristic of a logical volume?
• 12.9. How do I know what volume group found a disc?
• 12.10. How to fix a volume group?
• 12.11. how to create a volume group?
• 12.12. How to get a complete list of filesystem csv format?
• 12.13. How Domain corrrespondances volume between physical and logical?
• 12.14. How to determine the block size of a filesystem and / or type?
• 12.15. How do filesystem jfs2 create a logical volume with its partner?
• 12.16. know how the size and fragmentation of a file?
13. filesystems
• 13.1. How to know the characteristics (inodes, nbpi ...) a filesystem?
• 13.2. How to list all the filesystems big file format?
• 13.3. know how users loquent a filesystem?
• 13.4. how to remove the process utilisteurs which loquent a filesystem?
• 13.5. How to create and filesystem size in a given volume group?
14. paging space
• 14.1. how to check the paging space?
• 14.2. how to check the paging spaces activated at startup?
• 14.3. how to create a paging space on a disc
• 14.4. how to activate a paging space?
• 14.5. how a mirror paging space
• 14.6. how to increase the size of paging space?
• 14.7. how to reduce the size of paging space?
15. users
• 15.1. how to verify that users are correct?
• 15.2. how to verify that the groups are correct?
• 15.3. how to verify that the password of users are correct?
• 15.4. how to change an attribute on all local users?
• 15.5. How to display all users?
• 15.6. How to display the attributes of a user?
• 15.7. How to change the attributes of a user?
• 15.8. How to create a user?
• 15.9. How to change the id of a local user?
• 15.10. How to find the attributes associated with password?
• 15.11. How do I know which attempts to log on invalid took place?
16. rights
• 16.1. How to use the sticky-bit?
• 16.2. how to read the acl of a file or directory?
• 16.3. how to save files in a lcd read?
• 16.4. how to fix the acl a file or directory?
• 16.5. What do the leaves extended?
17. packages
• 17.1. know how the level of the operating system?
• 17.2. how to make a list of lpi to reinstall the same?
• 17.3. how to display the list of installed packages?
• 17.4. how to know what files in a lpi?
• 17.5. Domain lpi how a product?
• 17.6. how to install a product or fixpak?
• 17.7. how to identify the missing packages to reach a technical level?
• 17.8. how to uninstall a package?
18. License
• 18.1. Where is the directory containing the tools of verification and licensing management?
• 18.2. Where is the database licenses
• 18.3. How to save / restore licensing basis?
19. printers
• 19.1. How to list all the tail configured?
• 19.2. How to create a print queue pointing to remote printer driven by a Windows server or Novell?
• 19.3. How to print multiple copies of several files?
• 19.4. How to send a file to print?
• 19.5. How to list the contents of printing queues?
20. CD and tape
• 20.1. how to know if the automatic mounting cdrom is available?
21. trace and debug
• 21.1. How to launch a trace of MQSeries?
• 21.2. How to extract a trace on MQSeries?
22. dump
• 22.1. how to check the status of a dump?
• 22.2. When was the last dump?
• 22.3. How to list the space dump?
• 22.4. How to fix the space dump?
• 22.5. How to estimate the necessary space to dump?
• 22.6. How to enable compression for the dump?
• 22.7. LED status code dump
• 22.8. How not know the size in GB of compressed dump?
• 22.9. How to extract the vmcore a snap?
• 22.10. How to examine a dump?
• 22.11. What are the first orders of KDB?
23. Errors
• 23.1. how to list the errors?
• 23.2. how to list the errors so detailed?
• 23.3. how to display an error in detail with your ID?
• 23.4. how to display an error according to its label?
• 23.5. show how the errors between two dates?
24. cpu
• 24.1. how to get information on processors?
• 24.2. how to get information on processors csv format?
• 24.3. examine how the larger process?
• 24.4. how to know if your processor is in SMT (Simultaneous multithreading)?
• 24.5. how to switch your CPU mode SMT (Simultaneous multithreading)?
25. tuning
• 25.1. how to monitor a disc regular interval?
• 25.2. tuner how a disc?
• 25.3. how to lvmstat permit?
• 25.4. how to enable / remove the tuning of a volume group?
• 25.5. see how the input / output of a volume group?
26. shell
• 26.1. How to recover form shell orders from smit?
• 26.2. How to get the result of a transaction with bc in a variable?
• 26.3. How to deal with perl command mode and return the result in a variable?
• 26.4. How to file a copy with a timestamp?
• 26.5. How to create a file size?

1. configuration
1.1. How to know the main characteristics of a server?
In particular the speed and type of processor, memory, primary and secondary available, the network features ...
# prtconf | head-n 27

System Model: IBM .7040-671
Machine Serial Number: 8384F0C
Processor Type: PowerPC_POWER4
Number Of Processors: 3
Processor Clock Speed: 1500 MHz
CPU Type: 64-bit
Kernel type: 64-bit
LPAR Info: 4 hermes
Memory Size: 10,240 MB
Good Size Memory: 10240 MB
Firmware Version: IBM, RG050215_d79e02_r
Console Login: enable
Self Restart: true
Full Core: true

Network Information
Host Name: hermes
IP Address: 170.247.102.1
Sub Netmask: 255.255.255.0
Gateway: 170,247,102,250
Name Server: 170.247.241.15
Domain Name: getima.mutuagri.tm.fr

Paging Space Information
Total Paging Space: 23040MB
Percent Used: 1%
prtconf may well provide more information.
1.2. how to know when the last reboot?
last reboot

wtmp begins May 30 23:10

1.3. Getting the configuration parameters of the machine?
getconf-for all parameters.
You can also obtain the parameters one by one, example:
getconf BOOT_DEVICE
hdisk0
getconf KERNEL_BITMODE
64
getconf REAL_MEMORY
3932160
etc ...
1.4. How to tell if the server runs 32-bit?
# prtconf-k
Kernel type: 32-bit
prtconf provides other information such as:
-c
Displays cpu type, for example, 32-bit or 64-bit

-k
Display the kernel in use, for example, 32-bit or 64-bit

-L Displays LPAR partition partition number and name if this is an LPAR partition, otherwise returns "-1 NULL"
-m Displays system memory

-s
Displays processor clock speed in MegaHertz

v
Displays the VPD found in the Customized VPD object class for devices


1.5. How to identify the type of server used?
lscfg-pl sysplanar0 | Model grep | awk '(print $ 2)'
IBM ,7038-6M2

1.6. How to display devices available?

lsdev-P
3DX 03000008 usbif USB 3D mouse
PCM fcpother friend AIX SCSI / FCP Disk Path Control Module
PCM scsiscsd friend AIX SCSI / FCP Disk Path Control Module
AT97SC3201_r adapt chrp N / a

1.7. How to display devices installed?

# lsdev-C
L2cache0 Available L2 cache
Available aio0 Asynchronous I / O (Legacy)
en0 Available 02-08 Standard Ethernet Network Interface
en1 Defined 02-09 Standard Ethernet Network Interface
ent0 Available 02-08 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent1 Available 02-09 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
and0 Defined 02-08 IEEE 802.3 Ethernet Network Interface
and1 Defined 02-09 IEEE 802.3 Ethernet Network Interface


2. boot
2.1. What is the boot disk?
Bootinfo-b
hdisk0

2.2. What is the boot order?
bootlist-o-m normal
hdisk0
hdisk1
we can change the mode (normal service).

2.3. How to determine which drives are bootable?
ipl_varyon-i


PVNAME BOOT DEVICE VOLUME GROUP ID PVID
hdisk0 YES 00xxxxxda382b4670000000000000000 00xxxxxd00004c00
hdisk1 YES 00xxxxxdb73f8bf20000000000000000 00xxxxxd00004c00
hdisk2 YES 00xxxxxdca772e380000000000000000 00xxxxxd00004c00
hdisk3 NO 00xxxxxd71463a600000000000000000


3. mksysb
3.1. how to remove a disk image sandwich?
lspv | head -2
hdisk1 00384f0c2dcfdd0b altinst_rootvg
hdisk0 00384f0c6b17258c active rootvg


# Alt_disk_install-X
Bootlist is set to the boot disk: hdisk0

lspv | head -2
None hdisk1 00384f0c2dcfdd0b
hdisk0 00384f0c6b17258c active rootvg


3.2. how to clone the current rootvg on a disk?
We must use alt_disk_install-C, taking care that there are more than old_rootvg.
# lspv
hdisk0 00ccd2cde83c037c old_rootvg
hdisk1 active 00ccd2cd26257aa4 datavg

alt_disk_install-X old_rootvg

lspv # | head-n 4
None hdisk0 00ccd2cde83c037c
hdisk1 active 00ccd2cd26257aa4 datavg
hdisk2 none None
hdisk3 none None
alt_disk_install-O-C hdisk3
Calling mkszfile to create new / Image.dat file.


....
A new rootvg is on hdisk3
3.3. How to install the image of a mksysb in mirroirsur 2 discs?
alt_disk_install-d mksysb_machine-O hdisk0 hdisk1
3.4. How to generate a mksysb?
# mksysb / datafs/mksysb_aix_53TL05_base

Creating list of files to back up.
Backing up files ..... 41,166
41,166 of 41,166 files (100%)
0512-038 mksysb: Backup completed successfully.

3.5. How to list the files in a mksysb?
restore-TQF mksysb_serveur

3.6. How to restore a file or directory from a mksysb?
restore-xqvf mksysb_heracles_140807_0645 / var / spool / cron / crontabs / root
more / var / spool / cron / crontabs / root
For a directory should be complete by the name.

4. odm
4.1. How to get the ID for a disc?
getlvodm-v VG01
00c7ab6e00004c0000000107dbc83173

4.2. how to remove an object of the MDGs?
odmdelete-value = q-o 00c7ab6e00004c0000000107dbc83173 Cuat
0518-307 odmdelete: 1 deleted objects.

4.3. how to list an object of the MDGs?
odmget-q = name VG01 Cuat

Cuat:
name = "VG01"
attribute = "pv"
value = "00c7ab6edbc814f90000000000000000"
type = "R"
generic = ""
rep = "sl"
nls_index = 0

Cuat:
name = "VG01"
attribute = "timestamp"
value = "438c3be50f9650fe"
type = "R"
generic = "TO"
rep = "s"
nls_index = 0

Cuat:
name = "VG01"
attribute = "quorum"
value = "n"
type = "R"
generic = ""
rep = "sl"
nls_index = 0
or
odmget-q = name VG01 CuDv

CuDv:
name = "VG01"
status = 0
chgstatus = 1
DDINS = ""
location = ""
parent = ""
connwhere = ""
PdDvLn = "logical_volume / vgsubclass / vgtype"

4.4. What is LMVCB?
The control block logical volume.
4.5. How do I check the block volume control logic

getlvcb # AT-HD5
AIX LVCB
intrapolicy = e
Copies = 1
interpolicy = m
lvid = 00ccd2cd00004c000000010681212188.1
HD5 = lvname
label = None
id = machine CD2CD4C00
lps number = 3
n = relocatable
y = strict
stripe width = 0
stripe size in exponent = 0
type = boot
upperbound = 32
fs =
time created = Wed Mar 24 00:28:22 2007
time modified = Wed Mar 24 00:28:22 2007


4.6. How to find a sub-system in the odm?
odmget-q = subsysname routed SRCsubsys

SRCsubsys:
subsysname = "routed"
synonym = ""
cmdargs = ""
path = "/ usr / sbin / routed"
uid = 0
auditid = 0
Standin = "/ dev / console"
standout = "/ dev / console"
standerr = "/ dev / console"
action = 2
multi = 0
contact = 3
svrkey = 0
svrmtype = 0
priority = 20
signorm = 0
sigforce = 0
display = 1
waittime = 20
grpName = "tcpip"
It is then possible to remove or lemodifier.
4.7. How to find a package in the odm?
odmget lpi
odmget-q = name bos.acct lpi


5. Partitioning
5.1. how to list the slots occupied by a partition?
# lsslot-c slot
Slot # Description Device (s)
U7311.D20.65A5DDA-P1-C07 Logical I / O Slot pci7 fcs2
U7879.001.DQD2P2G-P1-C1 Logical I / O Slot pci5 fcs0
U7879.001.DQD2P2G-P1-C2 Logical I / O Slot pci6 fcs1
U7879.001.DQD2P2G-P1-T6 Logical I / O Slot pCI4 ent0 ent1
U7879.001.DQD2P2G-P1-T14 Logical I / O Slot pci3 sisscsia0
U9117.570.65CD2CD-V4-C0 Virtual I / O Slot Unknown


5.2. how to find the slot for a disc?
We must use lsparent.
# lsparent-C-l hdisk0
scsi0 Available 02-08-00 PCI-X bus Ultra320 SCSI Adapter
scsi1 Available 02-08-01 PCI-X bus Ultra320 SCSI Adapter
Phebe root @: / # lsparent-C-l scsi0
02-08 Available sisscsia0 PCI-X Ultra320 SCSI Adapter
# lsslot slot-c | grep sisscsia0
U7879.001.DQD2P2G-P1-T14 Logical I / O Slot pci3 sisscsia0


6. network
6.1. Upgrade network interfaces?
ifconfig-l
en0 EN10 EN20 lo0

6.2. How to know the parameters of a network interface?

ifconfig en0
en0: flags = 5e080863, 80
inet 208.128.11.12 netmask 0xffffff00 broadcast 208.128.11.255

6.3. How to activate or deactivate a card?

ifconfig down en0

ifconfig up en0

6.4. Getting the characteristics of a map?

# Lsattr-hel ent0
attribute value description user_settable

alt_addr 0x000000000000 Alternate ethernet address True
busintr 305 Bus interrupt level False
busmem 0xffe80000 Bus memory address False
chksum_offload yes Enable hardware transmit and receive checksum True
No compat_mode Gigabit Backward compatibility True
copy_bytes 2048 Copy packet if this many or less bytes True
failover mode failover disable Enable True
flow_ctrl yes Enable Transmit and Receive True Flow Control
intr_priority 3 Interrupt priority False
intr_rate rate of 10,000 Max interrupts generated by adapting True
No jumbo_frames Transmit jumbo frames True
large_send yes TX Enable hardware TCP resegmentation True
media_speed Auto_Negotiation speed True Media
rom_mem 0xfff00000 ROM memory address False
rom_mem_amt 0x40000 ROM memory size False
Max rx_hog 1000 RCV buffers processed per RCV interrupt True
rxbuf_pool_sz 2048 RCV buffer pool, make 2X rxdesc_que_sz True
rxdesc_que_sz 1024 RCV descriptor queue size True
slih_hog 10 High Interrupt events processed per interrupt True
tx_que_sz 8192 Software transmit queue size True
txdesc_que_sz 512 TX descriptor queue size True
No alternate use_alt_addr Enable ethernet address True

6.5. How to know the speed and type of negotiating a map?

# Lsattr-El ent0-a media_speed
media_speed Auto_Negotiation speed True Media

6.6. How to check the routing tables?


# Netstat-nr
Routing tables
Gateway Destination Flags Refs Use If Exp Groups

Route Tree for Protocol Family 2 (Internet):
default 170.247.2.250 UG 2 21023 en0 - --
127 / 8 127.0.0.1 U 5 465 lo0 - --
170.247.2.0 170.247.2.64 UHSb 0 0 en0 - - =>
170.247.2/24 170.247.2.64 U 1 415194 en0 - --
170.247.2.64 127.0.0.1 UGHS 6 118 lo0 - --
170.247.2.255 170.247.2.64 UHSb 0 0 en0 - --

Route Tree for Protocol Family 24 (Internet v6):
:: 1: 1 UH 0 0 lo0 - --

6.7. How to add a route?

6.8. How to check the performance of a map?

Entstat-d # ent0
-------------------------------------------------- -----------
ETHERNET STATISTICS (ent0):
Device Type: 4-Port 10/100/1000 Base-TX PCI-X Adapter (14101103)
Hardware Address: 00:11:25: bc: fa: 8c
Elapsed Time: 4 days 19 hours 53 minutes 29 seconds

Transmit Statistics: Receive Statistics:
-------------------- -------------------
Packets: Packets 435,995: 1749629
Bytes: 57686410 Bytes: 1267561572
Interrupts: 0 Interrupts: 1724725
Transmit Errors: 2155 Receive Errors: 0
Dropped packets: 1 Dropped Packets: 0
Bad Packets: 0
Max Packets on S / W Transmit Queue: 13
S / W Transmit Queue Overflow: 0
Current S / W + H / W Transmit Queue Length: 1

Broadcast Packets: 337 Broadcast Packets: 910,525
Multicast Packets: 3 Multicast Packets: 9
No Carrier Sense: 0 CRC Errors: 0
DMA underrun: 0 DMA Overrun: 0
Lost CTS Errors: 0 Alignment Errors: 0
Max Collision Errors: 0 No Resource Errors: 0
Late Collision Errors: 2155 Receive Collision Errors: 0
Deferred: 152,541 Packet Too Short Errors: 0
SQE Test: 0 Packet Too Long Errors: 0
Timeout Errors: 0 Packets Discarded by Adapter: 0
Single Collision Count: 123 Receiver Start Count: 0
Multiple Collision Count: 18,153
Current HW Transmit Queue Length: 1

General Statistics:
-------------------
No mbuf Errors: 0
Adapter Reset Count: 0
Adapter Data Rate: 100
Driver Flags: Running Up Broadcast
Simplex 64BitSupport ChecksumOffload
PrivateSegment LargeSend DataRateSet

4-Port 10/100/1000 Base-TX PCI-X Adapter (14101103) Specific Statistics:
-------------------------------------------------- ----------------------
Link Status: Up
Media Speed Selected: Auto negotiation
Media Running Speed: 100 Mbps Half Duplex
PCI mode: PCI-X (100-133)
PCI Bus Width 64-bit
Latency Timer: 144
Cache Line Size: 128
Jumbo Frames: Disabled
TCP Segmentation Offload: Enabled
TCP Segmentation Offload Packets Transmitted: 7351
TCP Segmentation Offload Packet Errors: 0
Transmit and Receive Flow Control Status: Disabled
Transmit and Receive Flow Control Threshold (High): 45,056
Transmit and Receive Flow Control Threshold (Low): 24,576
Transmit and Receive Storage Allocation (TX / RX): 16/48


7. nfs
7.1. Quickly add an NFS mount?
1. Add server side in / etc / exports a line like this:
2. echo "/ sec = export/mksysb/client1-sys: krb5p: krb5i: krb5: dh, rw = client1, root = client1">> / etc / exports
You can check with the export exportfs-a.
3. Client side, mount the filesystem and check the assembly and place that remains:
4. # mkdir / mksysb
5. # mount server: / export/mksysb/client1 / mksysb
6. df-g / mksysb
7. GB filesystem blocks Free% Used Iused% Mounted on Iused
8. server: / export/mksysb/client1 9.00 4.25 53% 7 1% / mksysb
The link is close, you might fair un mksysb via nfs:
mksysb / mksysb/mksysb_client1_140607_1500


8. nim
8.1. how to verify that a customer is supported by NIM?
# l-lsnim Phebe
Phebe:
class = machines
type = standalone
connect = shell
CHRP platform =
netboot_kernel = mp
network1 Phebe IF1 = 0
net_settings1 = 100 full
cable_type1 = N / A
CSTAT = ready for a NIM operation
prev_state = ready for a NIM operation
Mstate = running currently

8.2. how to clone a rootv a client via NIM?
alt_disk_install nim-o-a source = rootvg-a disk = hdisk1 Phebe

8.3. How to restore the status of a customer to zero?
On the master server kerberos type:

nim-F-o reset darkstar

8.4. How to know the status of a customer?
On the master server kerberos type:

# lsnim info-a-a CSTAT darkstar
darkstar:
CSTAT = ready for a NIM operation

8.5. How to know the mksysb associated with a server?
lsnim-l mksysb_darkstar
mksysb_darkstar:
class = resources
type = mksysb
Rstate = ready for use
prev_state = unavailable for use
location = / export/MKSYSB/darkstar/mksysb_darkstar_200307_0610
version = 5
release = 2
mod = 0
oslevel_r = 5200-08
alloc_count = 0
server = master

8.6. How to check the files installed on a client server?
# nim-o-lppchk a lppchk_flags = "-c" darkstar

8.7. How to alt_disk_install a client NIM?

alt_disk_install nim-o-a source = mksysb-a mksysb = mksysb_darkstar-a disk = hdisk1 darkstar

# lsnim info-a-a CSTAT darkstar
darkstar:
CSTAT = alt_disk_install operation is being performed
info = Creating cloned rootvg volume group and associated logical volumes.

# lsnim info-a-a CSTAT darkstar
darkstar:
CSTAT = alt_disk_install operation is being performed
info = Restoring mksysb to alternate disk image (s).
# lsnim info-a-a CSTAT ceto
ceto:
CSTAT = ready for a NIM operation


8.8. How do I change the mksysb associated with a client NIM?

nim-o-N remove mksysb_darkstar
nim-o define mksysb_darkstar-N-t-s master mksysb-l '/ export/MKSYSB/darkstar/mksysb_darkstar_100707_0610'


9. Memory
9.1. What is the available memory (all inclusive)?
Bootinfo-m
134217804

9.2. What is the available memory (all inclusive)?
Bootinfo-r
33554432

9.3. how to eliminate the CPI of a given user?
ipcs | db2ins grep | awk '(system ( "ipcrm -" $ 1 "" $ 2))'

9.4. What is the status of memory?
svmon
size inuse free virtual pin
memory 1,048,576 680,659 367,917 65,396 246,254
pg space 131072 37362

people work CLNT lpage
Pine 65396 0 0 0
in use 214,957 465,702 0 0

9.5. how to know if I have 32-bit or 64-bit?
Use Bootinfo or prtconf.
Bootinfo-K
64
prtconf-k
Kernel type: 64-bit

9.6. How to know the real size of memory?
lsattr-El sys0-a realmem
realmem 10485760 Amount of usable physical memory in Kbytes False
svmon

9.7. know how the available memory (primary and secondary) and its distribution?
mÚmoire total
svmon | memory grep | awk '(print $ 2 / 256 "MB")'

mÚmoire occupÚe
svmon | memory grep | awk '(print $ 3 / 256 "MB")'

MÚmoire available
svmon | memory grep | awk '(print $ 4 / 256 "MB")'

swap svmon | grep "pg space" | awk '(print $ 3 / 256 "MB")'

paging space
svmon | grep "pg space" | awk '(print $ 4 / 256 "MB")'


9.8. how to eliminate "ls * The parameter list is too long?
You can change the setting ncargs. This setting controls the maximum length of the command line. It includes the environment variables. By default this parameter is 6 blocks of 4K or 24K. The following will list and change this setting.
lsattr-El sys0-a ncargs
chdev-l-sys0 a ncargs = 8


10. process
10.1. how to test if a process is this?
It is ps and extract the value of a column.
if [ "` ps-ef | grep [t] race | awk '(print $ 8)' `! =" trace "]
then
echo "demon trace is present"
fi


11. Discs
11.1. how to verify a disc?
lsattr-hel hdisk1
attribute value description user_settable

PCM PCM / friend / scsiscsd False Path Control Module
True fail_over algorithm Algorithm
hcheck_interval 0 Health Check Interval True
hcheck_mode nonactive Health Check Mode True
max_transfer 0x40000 Maximum TRANSFER True Size
Physical volume pvid 001adfcf8e65c3200000000000000000 identify False
queue_depth 3 Queue DEPTH False
reserve_policy single_path Reserve Policy True
size_in_mb 36,400 Size in Megabytes False

11.2. know how the occupation of a disc or a lv?
lslv-p hdisk0
hdisk0:::
USED FREE FREE FREE FREE FREE FREE FREE FREE FREE 1-10
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 11-20
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 21-30
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 31-40
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 41-50
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 51-60
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 61-70
FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 71-80
USED USED USED USED USED USED USED USED USED USED 81-90
USED USED USED USED USED USED USED USED USED USED 91-100
USED USED USED USED USED USED USED USED USED 101-109

USED USED USED USED USED USED USED USED USED USED 110-119
USED USED USED USED USED USED USED USED USED USED 120-129
USED USED USED USED USED USED USED USED USED USED 130-139
USED USED USED USED USED USED USED USED USED USED 140-149
USED USED USED USED USED USED USED USED USED USED 150-159
You can also lslv-p hdisk0 hd2

11.3. how to get the list of disks?
# lspv
hdisk0 00c1719e64ded2fa active rootvg
hdisk1 00c1719e74e1d549 altinst_rootvg
None hdisk2 00c1719eae51856d
You can also limit the list with lspv | head -10 for example.
11.4. know how rootvg disks and disks rotated?
lspv # | head -3
hdisk0 00c1719e64ded2fa active rootvg
hdisk1 00c1719e74e1d549 altinst_rootvg
None hdisk2 00c1719eae51856d

11.5. How to know the size of a disk PPsize and its occupancy rate?
# lspv hdisk0
PHYSICAL VOLUME: hdisk0 VOLUME GROUP: rootvg
PV IDENTIFIER: VG 00ccd2cde80bd90c IDENTIFY 00ccd2cd00004c000000010beb5cdfa1
PV STATE: active
STALA SCORES: 0 ALLOCATE: yes
PP SIZE: 128 megabyte (s) Logical Volume: 10
Pps TOTAL: 546 (69888 megabytes) VG DESCRIPTORS: 2
FREE MAP: 443 (56704 megabytes) HOT SPARE: no
MAP USED: 103 (13184 megabytes) MAX REQUEST: 256 kilobytes
FREE DISTRIBUTION: 109 .. 41 .. 75 .. 109 .. 109
USED DISTRIBUTION: 01 .. 68 .. 34 .. 00 .. 00

11.6. How to know the size of a disk PPsize and its occupancy rate?

# lspv-l hdisk0
0516-320: Physical volume 005b178f13b64dfb0000000000000000 is not assigned to
a volume group.
ereb root @: / root / bin # lspv-l hdisk1
hdisk1:
LV NAME LPs PPS DISTRIBUTION MOUNT POINT
lg_dumplv 32 32 00 .. 32 .. 00 .. 00 .. 00 N / A
lrootsy0101 9 9 00 .. 09 .. 00 .. 00 .. 00 / var / adm / ras
hd2 31 31 00 .. 00 .. 31 .. 00 .. 00 / usr
HD4 5 5 00 .. 00 .. 05 .. 00 .. 00 /
hd8 1 1 00 .. 00 .. 01 .. 00 .. 00 N / A
HD6 256 256 00 .. 08 .. 49 .. 108 .. 91 N / A
hd10opt 2 2 00 .. 00 .. 02 .. 00 .. 00 / opt
hd1 8 8 00 .. 00 .. 08 .. 00 .. 00 / home
hd3 9 9 00 .. 00 .. 09 .. 00 .. 00 / tmp
hd9var 4 4 00 .. 01 .. 03 .. 00 .. 00 / var
HD5 1 1 01 .. 00 .. 00 .. 00 .. 00 N / A
11.7. how to retrieve a disc already used in a vg?
We must put pv to clear, then force (option ) The establishment of vg.
chdev-l-a hdisk6 pv = clear
mkvg-f-y 'vg_data2' hdisk6


12. lvm
12.1. How to get the VGDA?
lqueryvg-p-At hdisk0
Max LVs: 256
PP Size: 26
Free PPS: 430
LV count: 11
Minutes count: 2
VGDAs Total: 3
Conc Allowed: 0
MAX PPS per PV 1016
MAX PVs: 32
Conc Autovaryo 0
Varied on Conc 0
Logical: 001adfcf00004c00000001028cc13cbc.1 HD5 1
001adfcf00004c00000001028cc13cbc.2 HD6 1
001adfcf00004c00000001028cc13cbc.3 hd8 1
001adfcf00004c00000001028cc13cbc.4 HD4 1
001adfcf00004c00000001028cc13cbc.5 hd2 1
001adfcf00004c00000001028cc13cbc.6 hd9var 1
001adfcf00004c00000001028cc13cbc.7 hd3 1
001adfcf00004c00000001028cc13cbc.8 dumplv 1
001adfcf00004c00000001028cc13cbc.9 hd10opt 1
001adfcf00004c00000001028cc13cbc.10 LV00 1
001adfcf00004c00000001028cc13cbc.11 paging00 1
Physical: 001adfcf8cc13254 2 0
001adfcf8e65c320 1 0
Pps Total: 1084
LTG size: 128
HOT SPARE: 0
AUTO SYNC: 0
VG PERMISSION: 0
SNAPSHOT VG: 0
IS_PRIMARY VG: 0
PSNFSTPP: 4352
VARYON MODE: 0

12.2. that contains LVM?
1. Volume Group Descriptor Area (VGDA)
2. Volume Group Status Area (VGSA)
3. Logical Volume Control Blocks (LVCB) 512 first byte of each logical volume

12.3. Or is the copy in memory of VGDA?
/ etc / v / vgGDID

12.4. how to get the LVCB?
getlvcb-AT hd2
AIX LVCB
intrapolicy = c
Copies = 2
interpolicy = m
lvid = 001adfcf00004c00000001028cc13cbc.5
lvname = hd2
label = / usr
id = machine ADFCF4C00
number = 71 lps
relocatable = y
y = strict
stripe width = 0
stripe size in exponent = 0
type = jfs
upperbound = 32
fs = log = / dev/hd8: mount = automatic type = bootfs: vol = / usr: free = false
time created = Thu Mar 10 13:57:18 2005
modified time = Tue Mar 29 15:55:52 2005


12.5. How to know the allocation policy?
getlvcb-AT hd3

AIX LVCB
intrapolicy = c
Copies = 2
interpolicy = m
lvid = 00ca332d00004c000000010506cb0974.7
lvname = hd3
label = / tmp
id = machine A332D4C00
lps number = 8
relocatable = y
y = strict
stripe width = 0
stripe size in exponent = 0
type = jfs
upperbound = 32
fs =
time created = Mon Jul 11 16:47:11 2005
time modified = Mon Jul 11 16:47:11 2005

12.6. How to check the consistency of the volume of rootvg logical (/ tmp, ...)?
Check the list of physical maps (option-m), then logic (-l).
lslv-m hd3 (for tmp)

hd3: / tmp
PV IN BAND COPIES DISTRIBUTION
hdisk0 008:000:000 100% 000:000:008:000:000
hdisk1 008:000:000 100% 000:000:008:000:000

lslv-l hd3
hd3: / tmp
LP PP1 PV1 PP2 GP2 PP3 PV3
0001 0315 hdisk0 0315 hdisk1
0002 0316 hdisk0 0316 hdisk1
0003 0317 hdisk0 0317 hdisk1
0004 0318 hdisk0 0318 hdisk1
0005 0319 hdisk0 0319 hdisk1
0006 0320 hdisk0 0320 hdisk1
0007 0321 hdisk0 0321 hdisk1
0008 0322 hdisk0 0322 hdisk1


Discs to check are:
1. hd3 / tmp
2. HD4 /
3. HD5 / boot
4. hd8 jfslog

12.7. What are the codes allocation policy?
PP Alocation policy:
1. m = middle
2. c = center
3. e = edge
4. ie = inner edge
5. im = inner middle
12.8. How to know the characteristic of a logical volume?
In particular its type and its location disc.
N = `getlvodm-l` hd3; getlvodm $ n-c

12.9. How do I know what volume group found a disc?
lsvg-n dlmfdrv201
VOLUME GROUP: prd_data_vg01 VG IDENTIFIER: 00ca332d00004c00000001059c34246a
VG STATE: inactive PP SIZE: 32 megabyte (s)
VG PERMISSION: read / write TOTAL PPS: 34080 (1090560 megabytes)
MAX LVs: ??????? FREE MAP: 17253 (552096 megabytes)
LVs: 16 USED PPS: 16827 (538464 megabytes)
OPEN LVs: 0 QUORUM: 17
Pvs TOTAL: 32 VG DESCRIPTORS: 32
STALA pvs: 0 STALA PPS: 0
ACTIVE PVs: 0 AUTO ON: yes
MAX PPS per PV: 2032 MAX PVs: 16

12.10. How to fix a volume group?
redefinevg-d dlmfdrv101 prd_data_vg01
varyonvg prd_data_vg01
synclvodm prd_data_vg01

12.11. how to create a volume group?
we create the volume group datavg using the hard hdisk2. It could provide a list of disc.
# mkvg it datavg hdisk2
datavg
Phebe root @: / # lsvg
rootvg
altinst_rootvg
datavg
Sometimes we have to force the creation with the-f option when the disc belonged to another volume group:
# mkvg-f-y appsvg01 hdisk1
appsvg01

12.12. How to get a complete list of filesystem csv format?
lsfs q> what are the allocation policies?
12.13. How Domain corrrespondances volume between physical and logical?
lsvg-M vsystsy01

vsystsy01
hdiskpower15: 1 lsystsy0119: 27
hdiskpower15: 2 lsystsy0119: 28
hdiskpower15: 3 lsystsy0119: 29
hdiskpower15: 4 lsystsy0119: 30

12.14. How to determine the block size of a filesystem and / or type?
for example filesystem in jfs2
lsfs-q / environments / production / foo
Nodename name Mount Pt VFS Size Options Auto Accounting
/ dev/lapplpr0109 - / environments / production / rw toto jfs2 786,432 yes no
(lv size: 786,432, fs size: 786,432, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, reserved: 0, reserved: 0, DMAPS: No, VIX: no)
for example filesystem in jfs
lsfs-q / environments / production / test Name nodename Mount Pt VFS Size Options Auto Accounting / dev/lapplpr0110 - / environments / production / test jfs 524,288 rw yes yes (lv size: 524,288, fs size: 524,288, frag size: 4096 , Nbpi: 4096, compress: no, bf: true, ag: 64)

12.15. How do filesystem jfs2 create a logical volume with its partner?
Beforehand we will have created a volume group:
# mkvg it appsvg01 hdisk1
The volume is appsvg01 group, the logical volume is lapps0101, the point of assembly / apps / websphere, the block size is 4096 and it is accessible mode read / write (-p 'rw'), with automatic mounting reboot (option A-y).
# mklv it lapps0101 Does jfs2 appsvg01 1
lapps0101
# CRFs jfs2-v-d lapps0101-m / apps / websphere A-y-p 'rw'-a agblksize ='4096 '
File system created successfully.
65,328 kilobytes total disk space.
New File System size is 131,072
# mount / apps / websphere
We can then cutting the right size with:
CHFS-a size = 4G / apps / websphere
Same procedure for a filesystem jfs:
# mklv-y-t lsystsy0111 jfs vsystsy01 1 lsystsy0111 A-y-p 'rw'-a agblksize ='4096 '
Based on the parameters chosen, the new / root / JFS file system test
is limited to a maximum size of 134,217,728 (512 byte blocks)

New File System size is 65,536
# mount / root / test
# CHFS-a size = 3G / root / test

12.16. know how the size and fragmentation of a file?
Use the fileplace:
fileplace smit.log

File: smit.log Size: 6165 bytes Vol: / dev/hd4
Blk Size: 4096 Frag Size: 4096 Nfrags: 2 Compress: no

Logical Fragment
----------------
0006496 1 Frags 4096 Bytes, 50.0%
0006509 1 Frags 4096 Bytes, 50.0%



13. filesystems
13.1. How to know the characteristics (inodes, nbpi ...) a filesystem?

lsfs-q / tmp
Nodename name Mount Pt VFS Size Options Auto Accounting
/ dev/hd3 - / tmp jfs 1,048,576 - yes no
(lv size: 1048576, fs size: 1048576, frag size: 4096, nbpi: 4096, compress: no, bf false, ag: 8)

13.2. How to list all the filesystems big file format?
for i in `lsfs | awk '(print $ 3)'`
do

lsfs `r = $ q-i | grep" bf: true "`
if [ "$ r! =" "]
then
echo $ i
fi
done

13.3. know how users loquent a filesystem?
fuser-u / apps / products / ctmagent / REEL
/ apps / products / ctmagent / REEL: 598266c (mahe)

13.4. how to remove the process utilisteurs which loquent a filesystem?
fuser-k / apps / products / ctmagent / REEL
/ apps / products / ctmagent / REEL: 598266c

13.5. How to create and filesystem size in a given volume group?
• is looking for a free disk
• # lspv
• hdisk0 00ccd2cde83c037c old_rootvg
• None hdisk1 00ccd2cd26257aa4
If it is a bay, verify that it is not tied to a hdiskpower
# powermt display dev = all | grep hdisk1
1 fscsi1 hdisk105 SP B0 active alive 0 0
1 fscsi1 hdisk102 SP B0 active alive 0 0
1 fscsi1 hdisk103 SP B0 active alive 0 0
1 fscsi1 hdisk104 SP B0 active alive 0 0
0 fscsi0 hdisk10 SP B1 active alive 0 0
1 fscsi1 hdisk101 SP B0 active alive 0 0
0 fscsi0 hdisk19 SP B1 active alive 0 0
0 fscsi0 hdisk11 SP B1 active alive 0 0
0 fscsi0 hdisk14 SP B1 active alive 0 0
0 fscsi0 hdisk13 SP B1 active alive 0 0
0 fscsi0 hdisk17 SP B1 active alive 0 0
1 fscsi1 hdisk100 SP B0 active alive 0 0
0 fscsi0 hdisk12 SP B1 active alive 0 0
0 fscsi0 hdisk16 SP B1 active alive 0 0
0 fscsi0 hdisk18 SP B1 active alive 0 0
0 fscsi0 hdisk15 SP B1 active alive 0 0
• create the volume group named datavg. The-f force the creation because the disk hdisk1 had an ID or pvid (00ccd2cd26257aa4).
• mkvg-s 128-f-y datavg hdisk1
• datavg
The size of a PP was set to 128 MB could put a small value, but we must take into account the size of the disc. By putting 1MB would be this:
mkvg # 1-s-f-y datavg hdisk1
0516-1208 mkvg: Warning, The Physical Partition Size of 1 requires the
creation of 70,006 partitions for hdisk1. The system limitation is 16,256
physical partitions per disk at a factor value of 16. Specify a larger
Physical partition size or a larger factor value in order create a
volume group on this disk.
0516-862 mkvg: Unable to create volume group.
An interesting option is mkvg of option-B to create Big volume.
• We check the vg
• # lsvg data
• 0516-306: Unable to find volume group data in the Device
• Configuration Database.
• ceto root @: / root # lsvg datavg
• VOLUME GROUP: datavg VG IDENTIFIER: 00ccd2cd00004c0000000111925b7951
• VG STATE: active PP SIZE: 128 megabyte (s)
• VG PERMISSION: read / write PPS TOTAL: 546 (69888 megabytes)
• MAX LVs: 256 pps FREE: 546 (69888 megabytes)
• LVs: 0 USED PPS: 0 (0 megabytes)
• OPEN LVs: 0 QUORUM: 2
• TOTAL pvs: 1 VG DESCRIPTORS: 2
• STALA pvs: 0 STALA PPS: 0
• ACTIVE PVs: 1 AUTO ON: yes
• MAX PPS per PV: 1016 MAX PVs: 32
• LTG size: 128 kilobyte (s) AUTO SYNC: no
• HOT SPARE: no BB POLICY: relocatable
• Then we create the filesystem. There are two possible methods:
o create a filesystem and let the system create the logical volume associated with it.
o create by giving a logical volume name
o mklv it datalv Does jfs2 datavg 1
o CRFs jfs2-v-d-m data datalv-A'' `locale yesstr | awk-F: '(print $ 1 }'`''-p' rw '-a agblksize ='4096'
o CHFS-a size = 40G / data
o Filesystem size changed to 83886080
o ceto root @: / # lsfs data
o Nodename name Mount Pt VFS Size Options Auto Accounting
o / dev / datalv - / rw data jfs2 83886080 yes no


14. paging space
14.1. how to check the paging space?
LSPs-a
Page Space Physical Volume Volume Group Size% Used Active Auto Type
HD6 hdisk0 rootvg 10240MB 2 yes yes lv

14.2. how to check the paging spaces activated at startup?
Cat / etc / swapspaces
* / Etc / swapspaces
*
* This file lists all the paging spaces that are automatically put into
* Service on each system restart (the 'swapon-a' command executed from
* / Rc swaps on every device listed here).
*
* WARNING: Only paging space devices should be listed here.
*
* This file is modified by the chps, and RMPS mkps commands and referenced
* By the LSPs and swapon commands.

HD6:
dev = / dev/hd6


14.3. how to create a paging space on a disc
mkps-s 1 rootvg hdisk1
LSPs-a
Page Space Physical Volume Volume Group Size% Used Active Auto Type
paging00 hdisk1 rootvg 64MB 1 yes yes lv
HD6 hdisk0 rootvg 10240MB 2 yes yes lv

add-n for the immediate activation and is adding at startup.
14.4. how to activate a paging space?
Activation of the paging space / dev/paging01:
Swapon / dev/paging01

14.5. how a mirror paging space
1. check the logical volume that contains the paging space
2. lslv-m paging00
3. paging00: N / A
4. LP PP1 PV1 PP2 GP2 PP3 PV3
5. 0001 0339 hdisk1
6. verify that the disk mirror is the same volume that the disk group already paginated. Extending the volume group otherwise.
7. Lsvg-p rootvg
8. rootvg:
9. PV_NAME PV STATE TOTAL pps pps FREE FREE DISTRIBUTION
10. hdisk1 active 542 133 00 .. 00 .. 00 .. 94 .. 39
11. hdisk0 active 542 134 00 .. 00 .. 00 .. 95 .. 39
12. Activation of all paging spaces defined in / etc / swapspaces:
swapon-a
13. mirror logical volume
14. Mklvcopy paging00 2 hdisk1 hdisk0
15. check that the number of PV for paging00 is 2.
16. Lsvg-l rootvg
17. rootvg:
18. LV NAME TYPE LPs PPS PVs LV STATE MOUNT POINT
19. HD5 boot 1 2 2 closed / Syncd N / A
20. HD6 paging 160 320 2 open / Syncd N / A
21. hd8 jfslog 1 2 2 open / Syncd N / A
22. HD4 jfs 16 32 2 open / Syncd /
23. hd2 jfs 80 160 2 open / Syncd / usr
24. hd9var jfs 32 64 2 open / Syncd / var
25. hd3 jfs 8 16 2 open / Syncd / tmp
26. paging00 paging 1 2 2 open / stale N / A
27. hd10opt jfs 8 16 2 open / Syncd / opt
28. lg_dumplv sysdump 102 204 2 open / Syncd N / A
29. check the disk main mirror.
30. lslv-m paging00
31.
32. LP PP1 PV1 PP2 GP2 PP3 PV3
33. 0001 0339 hdisk1 0339 hdisk0

14.6. how to increase the size of paging space?
# LSPs Page-Space Physical Volume Volume Group Size% Used Active Auto Type paging00 hdisk93 rootvg 3072MB No. 1 yes lv HD6 hdisk93 rootvg 7680MB 98 yes yes lv chps-s # 1 # paging00 LSPs Page-Space Physical Volume Volume Group Size% Used Auto Type Active paging00 hdisk93 rootvg 3200MB No. 1 yes lv HD6 hdisk93 rootvg 7680MB 98 yes yes lv

14.7. how to reduce the size of paging space?
Attention must be some disk space!
LSPs-a
Page Space Physical Volume Volume Group Size% Used Active Auto Type
paging00 hdisk1 rootvg 2112MB 1 yes yes lv
HD6 hdisk0 rootvg 10240MB 2 yes yes lv
chps-d 1 paging00
shrinkps: Temporary paging space paging01 created.
shrinkps: Paging space paging00 removed.
shrinkps: Paging space paging00 recreated with new size.
LSPs-a
Page Space Physical Volume Volume Group Size% Used Active Auto Type
paging00 hdisk1 rootvg 2048MB 1 yes yes lv
HD6 hdisk0 rootvg 10240MB 2 yes yes lv


15. users
15.1. how to verify that users are correct?
usrck-n ALL
3001-654 The group has no gdb2adm stanza in / etc / security / group.
3001-654 The group has no gfence stanza in / etc / security / group.
3001-654 The group has no gipief01 stanza in / etc / security / group.
3001-654 The group has no GR6 stanza in / etc / security / group.
3001-654 The group has no mi_group stanza in / etc / security / group.
3001-654 The group has no sasgrp stanza in / etc / security / group.
3001-664 The account for user daemon has expired.
3001-664 The account for user bin has expired.
3001-664 The account for user system has expired.
3001-664 The account for user nobody has expired.
3001-664 The account for user lpd has expired.
3001-612 User LT has a non-existent
or inaccessible home directory / var / spool / lp.
3001-648 The user has no LT stanza in / etc / security / user.
3001-648 The user has no LT stanza in / etc / security / user.
3001-612 User imnadm has a non-existent
or inaccessible home directory / home / imnadm.
3001-662 User sshd is locked.

15.2. how to verify that the groups are correct?
grpck-n ALL
3001-227 User name "printq" not found in password file.
3001-233 Invalid value in admin / etc / security / group for "gusasqta"
3001-239 Missing stanza for "gusasqta" in / etc / security / group.
3001-238 Missing stanza for "gusas" in / etc / group.

15.3. how to verify that the password of users are correct?
pwdck-n ALL
3001-402 The user "imnadm" has an invalid password field in / etc / passwd.
3001-414 The stanza for "imnadm" was not found in / etc / security / passwd.
3001-402 The user "invscout" has an invalid password field in / etc / passwd.
3001-414 The stanza for "invscout" was not found in / etc / security / passwd.
3001-402 The user "ipsec" has an invalid password field in / etc / passwd.
3001-414 The stanza for "ipsec" was not found in / etc / security / passwd.
3001-402 The user "lp" has an invalid password field in / etc / passwd.
3001-414 The stanza for "LT" was not found in / etc / security / passwd.
3001-421 The user "lp" does not have a stanza in / etc / security / user.
3001-402 The user "nuucp" has an invalid password field in / etc / passwd.
3001-414 The stanza for "nuucp" was not found in / etc / security / passwd.
3001-402 The user "Snapper" has an invalid password field in / etc / passwd.
3001-414 The stanza for "Snapper" was not found in / etc / security / passwd.
3001-402 The user "sshd" has an invalid password field in / etc / passwd.
3001-414 The stanza for "sshd" was not found in / etc / security / passwd.

15.4. how to change an attribute on all local users?
for use in awk-F ":"'/^.*:.*: 0 / (print $ 1) '/ etc / passwd
do
echo "$ user account .. \ c"
chus rlogin = false $ user
check_status $?
echo "modified"
done

15.5. How to display all users?
lsuser ALL

15.6. How to display the attributes of a user?
# lsuser f-root
root:
id = 0
pgrp = system
groups = system, bin, system, security, cron, audit, lp
home = / root
shell = / usr / bin / ksh
auditclasses general =
login = true
su = true
rlogin = true
daemon = true
admin = true
sugroups = ALL
admgroups =
tpath = nosaka
ttys = ALL
expires = 0
auth1 = SYSTEM
auth2 = NONE
umask = 22
registry files =
Compat = SYSTEM
loginTime =
loginretries = 0
pwdwarntime = 0
account_locked = false
mining = 0
maxage = 0
maxexpired =- 1
minalpha = 0
minother = 0
mindiff = 0
maxrepeats = 8
minlen = 0
histexpire = 0
HISTSIZE = 0
pwdchecks =
dictionlist =
fsize = 2097151
cpu =- 1
data = 262144
stack = 65536
core = 2097151
rss = 65536
Nofila = 2000
time_last_login = 1180684403
time_last_unsuccessful_login = 1173802995
tty_last_login = / dev/pts/0
tty_last_unsuccessful_login = / dev/vty0
host_last_login = syst0001.getima.mutuagri.tm.fr
host_last_unsuccessful_login = localhost
unsuccessful_login_count = 0
roles =
Without the-f option to display low in bulk.
15.7. How to change the attributes of a user?
resetting the number of attempted connection WRONG
chus unsuccessful_login_count # foo = 0
changes the description of a
chus GECOS # = "Jean-Louis Bicquelet" foo
password user authentication mode LDAP
chus registry = # LDAP LDAP SYSTEM = foo
Lock an account
chus account_locked # foo = false

15.8. How to create a user?
mkuser id = 2014 = GECOS user system 'unix_user
Account settings can be added.
15.9. How to change the id of a local user?
Edit / etc / passwd and change the id of the user. In the example, changing the user oracle id = 207 in oracle id = 216.
Start then find the track a user chown (possibly with Oracle: Oracle).
find. user-207-Oracle exec chown () \;

15.10. How to find the attributes associated with password?
pwdadm user-q
user:
lastUpdate = 1188172800
flags = NOCHECK
the attributes can be:
NOCHECK no verification
Admin password only be changed by the user
ADMCHG password will be changed by the user at its next connection.

15.11. How do I know which attempts to log on invalid took place?
# who / etc / security / failedlogin
root pts / 0 Apr 23 22:05 (170,249,106,223)
UNKNOWN_ pts / 1 Apr 23 23:02 (170,249,103,117)
UNKNOWN_ pts / 1 Apr 23 23:03 (170,249,103,117)
UNKNOWN_ pts / 2 Apr 24 00:26 (170,249,106,223)
root pts / 1 Apr 24 17:23 (c920001074.cncimafap.msanet)
UNKNOWN_ ssh Apr 25 01:32 (170.249.101.31)
UNKNOWN_ ssh Apr 25 01:32 (170.249.101.31)
UNKNOWN_ ssh Apr 25 01:32 (170.249.101.31)
vty0 root Apr 25 18:34



16. rights
16.1. How to use the sticky-bit?
Normally (without 't') anyone who says that the permission to a list of addresses can delete any files in the address list regardless of who owns, even though he can not read or write to the file.
With 't' set, only the owner of a file can be deleted.
1. chmod + t directory to set the sticky-bit
2. chmod does anul directory for the sticky-bit

16.2. how to read the acl of a file or directory?
aclget rep
attributes:
basic permissions
owner (APP): rwx
group (cft): rwx
others: rx
extended leaves
enabled
rwx specify u: user

16.3. how to save files in a lcd read?
aclget-o memo.txt REP

16.4. how to fix the acl a file or directory?
aclput-i memo.txt file

16.5. What do the leaves extended?
Expanded permissions allow the owner of a file to define access to that file more precisely. The leaves change permissions Expanded basic file (the owner, group, others) by allowing, deleting, or specifying access modes for specific individuals, groups or combinations of group and user . The leaves are modified by using keywords.
keywords permit, deny, and specify defined like this:
1. permissions granted to the user or group access to the file specified
2. deny prevents the user or group to use access to the file indicated
3. specify precisely defines access to the file to the user or group


17. packages
17.1. know how the level of the operating system?
oslevel-r
5200-08
It is an AIX 5.2 TL 08 (since this version because we speak of technical level).
With the technical level, to determine the level of service pack, use the-s.
# oslevel-s
5300-05-01


17.2. how to make a list of lpi to reinstall the same?
1. memorize the list of lpi:
2. copy all lpi in a directory lslpp-Jl> liste_AIX
3. install the same: geninstall-cgNQqwXY-I-J-Z-d. f-liste_AIX 2> & 1

17.3. how to display the list of installed packages?
# lslpp-l
bos.txt.tfs.data 5.2.0.0 COMMITTED Text Formatting Data Services
devices.common.IBM.modemcfg.data
5.2.0.0 COMMITTED Sample Processor Modem Service
Configuration Files
mqm.man.en_US.data 5.3.0.13 APPLIED WebSphere MQ Man Pages - U.S.
English
The packages can be COMMITTED mode or applied. APPLIED mode, you can make a reject to go back or commit to validate the instalaltion. After a test period and before the assembled levels, it is better to make a COMMIT.
17.4. how to know what files in a lpi?
lslpp-f xlC.aix50.rte
Fileset File
-------------------------------------------------- --------------------------
Path: / usr / lib / objrepos
xlC.aix50.rte 6.0.0.13
/ usr/lpp/xlC/lib/profiled/libC128_r.a -> / usr/lpp/xlC/lib/profiled/aix51/libC128_r.a
/ usr/lpp/xlC/lib/aix50/libC.a
/ usr/lpp/xlC/lib/libC128_r.a -> / usr/lpp/xlC/lib/aix51/libC128_r.a
/ usr / lpp / XLC / lib / libc.a -> / usr/lpp/xlC/lib/aix51/libC.a
/ usr/lpp/xlC/lib/profiled/aix52/libC.a -> / usr/lpp/xlC/lib/profiled/aix50/libC.a
/ usr/lpp/xlC/lib/profiled/aix53/libC128.a -> / usr/lpp/xlC/lib/profiled/aix50/libC128.a
/ usr/lpp/xlC/lib/profiled/aix51/libC128.a -> / usr/lpp/xlC/lib/profiled/aix50/libC128.a
...
/ usr/lpp/xlC/lib/aix53/libC128_r.a -> / usr/lpp/xlC/lib/aix50/libC128_r.a
/ usr/lpp/xlC/lib/aix50
/ usr/lpp/xlC/lib/aix51
/ usr/lpp/xlC/lib/aix52
/ usr/lpp/xlC/lib/aix53
/ usr/lpp/xlC/lib/profiled/aix52/libC128_r.a -> / usr/lpp/xlC/lib/profiled/aix50/libC128_r.a
/ usr/lpp/xlC/lib/aix53/libC128.a -> / usr/lpp/xlC/lib/aix50/libC128.a

17.5. Domain lpi how a product?
lslpp-L | grep MQ
mqm.Client.Bnd 5.3.0.2 FC WebSphere MQ Client Bundle
mqm.Server.Bnd 5.3.0.2 FC WebSphere MQ Server Bundle
mqm.base.runtime 5.3.0.8 FC Runtime for WebSphere MQ
mqm.base.samples FC Websphere MQ 5.3.0.8 Samples
mqm.base.sdk 5.3.0.8 FC WebSphere MQ Base Kit for
mqm.client.rte 5.3.0.8 FC WebSphere MQ Client for AIX
mqm.java.rte 5.3.0.8 FC WebSphere MQ Client and Java
mqm.keyman.rte 5.3.0.8 FC WebSphere MQ Support for GSKit
mqm.man.en_US.data 5.3.0.8 FC WebSphere MQ Man Pages - U.S.
mqm.msg.en_US 5.3.0.8 FC WebSphere MQ messages - U.S.
mqm.server.rte 5.3.0.8 FC WebSphere MQ Server

17.6. how to install a product or fixpak?
To update the list of products to install:
cd / root/fixpack_13
inutoc.
Then go to Smitty
Smitty
-> Software Installation and Maintenance
-> Install and Update Software
-> Update Installed Software to Latest Level (Update All)
And then: input device.
17.7. how to identify the missing packages to reach a technical level?
# instfix IEV-5200-10_AIX_ML | grep not

17.8. how to uninstall a package?
The easiest way is to use the installp-u.
example:
installp-u xlopt.tools
You can also list a file and to verify that it will remove anything too (all that is in Japanese):
lslpp-JL | grep-i JP | awk '(print $ 1)'
And remove it with xargs:
lslpp-JL | grep-i JP | awk '(print $ 1)' | xargs installp-u


18. License
18.1. Where is the directory containing the tools of verification and licensing management?
/ usr / opt / ifor / bin /
18.2. Where is the database licenses
/ var / ifor
18.3. How to save / restore licensing basis?
Use scripts db_back.sh b_recov.sh found in / var / ifor / scripts

19. printers
19.1. How to list all the tail configured?
/ usr / bin / lsallq
# PRINT QUEUE PRINTER DESCRIPTION
Printer1 @ server1 Remote Printer
printer2 @ server2 Remote Printer
The-c option allows a display fashion smit.
/ usr / bin / lsallq-c
Printer1
Printer1: @ server1
printer2
printer2: @ server2

19.2. How to create a print queue pointing to remote printer driven by a Windows server or Novell?
/ usr / lib / lpd / pio / etc / piomisc_ext mkpq_remote_ext-q 'printer3'-h
'server3'-r 'HP2400_003'-t 'bsd' C 'FALSE'

19.3. How to print multiple copies of several files?
Go through the files and cat pipez in lpr using the - # followed by the number of copies.
Cat fichier1.c fichier2.c | lpr - # 2
You can also combine names like this:
cat `ls *. pl` | lpr

19.4. Comment envoyer un fichier à l'impression ?
Il existe plusieures manières de faire:
enq -P printer2 fichier
lpr -P printer 2 fichier

19.5. Comment lister le contenu des queues d'impression?

# enq -A
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- ----- --- ---
p207 @verd READY
p207: R_HP2300_B240 status: Idle
018608 @opal READY
018608: R_HP4200N_018608 status: Idle
018609 @opal READY
018609: R_HP4200N_018609 status: Idle


20. cdrom et bandes
20.1. comment savoir si le montage automatique du cdrom est disponible?
#lssrc -s cdromd
Subsystem Group PID Status
cdromd inoperative


21. trace et debug
21.1. Comment lancer une de trace de MQseries ?
trace -a -j30D,30E -L 268435368 -o $TRACE
L'option -L sert à définir une trace rotative.
21.2. Comment extraire un rapport de trace concernant MQseries ?
trcrpt -t /usr/mqm/lib/amqtrc.fmt trc > trc.txt


22. dump
22.1. comment vérifier l'état d'un dump?
# sysdumpdev -L
0453-039

Device name: /dev/lg_dumplv
Major device number: 10
Minor device number: 10
Size: 448727040 bytes
Uncompressed Size: 2888377946 bytes
Date/Time: Tue Jun 19 08:39:14 DFT 2007
Dump status: 0
dump completed successfully
Le dump status à 0 indique que cela s'est bien passé.
22.2. Quand a eu lieu le dernier dump ?
#sysdumpdev -L |grep Date
Date/Time: Wed Jul 11 04:00:31 DFT 2007

22.3. Comment lister les espace de dump ?
sysdumpdev -l
primary /dev/lg_dumplv
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump TRUE
dump compression ON

22.4. Comment fixer les espaces de dump ?
Pour désactiver le premier dump device temporairement:
sysdumpdev -p /dev/sysdumpnull
Pour changer le second dump device de manière permanente.
sysdumpdev -p /dev/sysdumpnull

22.5. Comment estimer l'espace nécessaire au dump ?
sysdumpdev -e
0453-041 Estimated dump size in bytes: 264870297

22.6. Comment activer la compression pour le dump?
sysdumpdev -C
-c désactive la compression du dump.
22.7. LED status code du dump
c0 The dump completed successfully. Go to Copying a System Dump.
0c1 An I/O error occurred during the dump. Go to System Dump Facility.
0c2 A user-requested dump is not finished. Wait at least 1 minute for the dump to complete and for the operator panel display value to change. If the operator panel display value changes, find the new value on this list. If the value does not change, then the dump did not complete due to an unexpected error.
0c4 The dump ran out of space . A partial dump was written to the dump device, but there is not enough space on the dump device to contain the entire dump. To prevent this problem from occurring again, you must increase the size of your dump media. Go to Increase the Size of a Dump Device.
0c5 The dump failed due to an internal error.
0c7 A network dump is in progress, and the host is waiting for the server to respond. The value in the operator panel display should alternate between 0c7 and 0c2 or 0c9. If the value does not change, then the dump did not complete due to an unexpected error.
0c8 The dump device has been disabled. The current system configuration does not designate a device for the requested dump. Enter the sysdumpdev command to configure the dump device.
0c9 A dump started by the system did not complete. Wait at least 1 minute for the dump to complete and for the operator panel display value to change. If the operator panel display value changes, find the new value on the list. If the value does not change, then the dump did not complete due to an unexpected error.
0cc An error occured dumping to the primary device; the dump has switched over to the secondary device. Wait at least 1 minute for the dump to complete and for the three-digit display value to change. If the three-digit display value changes, find the new value on this list. If the value does not change, then the dump did not complete due to an unexpected error.
c20 The kernel debugger exited without a request for a system dump. Enter the quit dump subcommand. Read the new three-digit value from the LED display.

22.8. Comment connaitre la taille non compresse en Go du dump?
#sysdumpdev -L | grep Uncompressed |awk '{print $3/1024/1024}' 2754.57
22.9. Comment extraire le vmcore d'un snap ?
savecore -d /root/nfs
0481-183 Saving 1740395520 bytes of system dump in /root/nfs/vmcore.

22.10. Comment examiner un dump ?
savecore génère un fichier vmcore.OZ qui dévompréssé peut être examiner par kdb .
savecore -d /tmp
df -g /tmp
uncompress vmcore.0.Z
kdb /tmp/vmcore.0 /unix

22.11. Quelles sont les premières commandes de kdb ?
1.
2. stat
3. SYSTEM_CONFIGURATION:
4. CHRP_SMP_PCI POWER_PC POWER_4 machine with 2 available CPU(s) (64-bit registers)
5.
6. SYSTEM STATUS:
7. sysname... AIX
8. nodename.. serveur
9. release... 2
10. version... 5
11. build date Oct 12 2005
12. build time 11:30:28
13. label..... yes
14. machine... 00XXXX0C4C00
15. nid....... XXXX0C4C
16. time of crash: Mon Jul 9 16:40:22 2007
17. age of system: 9 day, 23 hr., 52 min., 11 sec.
18. xmalloc debug: disabled
19.
20. CRASH INFORMATION:
21. CPU 0 CSA 02020E00 at time of crash, error code for LEDs: 70000000
22. pvthread+01EC00 STACK:
23. [000B0268]v_jfscorruption+000068 (000000005D0C6080, FFFFFFFF08000003,
24. 0000000002020440, 0000000002020E00, 0000000032223080 [??])
25. ...
26. Except :
27. csr FFFFFFFF00A001FF dsisr 0000000042000000 bit set: DSISR_PFT DSISR_ST
28. esid 00000001FE379080 dar FFFFFFFF00A001FF dsirr 0000000000000106
29. [0000B67C].umem_move+00007C (??, FFFFFFFF00A001FF,
30. F00000002FF38FF0, ??, 0000000000000000, 0000000000000000,
31. ??, 0000000000000000, 0000000000000001, ??,
32. F10000E3208E6E00, F100000040000000, ??, 0000000000000000,
33. 0000000000000000, ??)
34. [00185ECC]vmpcopy+0004B4 (??, ??, ??, ??, ??, ??, ??)
35. [00186D9C]vmfcopyin+00052C (??, ??, ??, ??, ??, ??)
36. [00186670]vm_uiomove+0003EC (??, ??, ??, ??)
37. [006D9E58]writei+000140 (??, ??, ??, ??, ??)
38. [0073C9C8]iextend+000090 (??, ??, ??)
39. status
40. (0)> status
41. CPU TID TSLOT PID PSLOT PROC_NAME
42. 0 1EC09F 492 15B086 347 oracle
43. 1 1BB079 443 AF0A0 175 maragent
44. 2-31 Disabled
45. f Affiche la stack courrantepour le processus ou le thread
46. lke (modules chargés)
47. (0)> lke
48. ADDRESS FILE FILESIZE FLAGS MODULE NAME
49.
50. 1 082F5800 08C31000 00001218 00080272 /etc/pw-syscall.64bit_kernel
51. 2 082F5900 08C54000 00001580 00180248 /unix
52. 3 082F5700 0897C000 00004320 00080262 bpf64/usr/lib/drivers/bpf
53. 4 082F5500 08BD8000 0000AE28 00080272 random64/usr/lib/drivers/random
54. 5 082F5600 08C04000 000014D8 00180248 /unix
55. 6 082F5400 08B93000 00044CA8 00080262 /sbin/comp.uext64
56. 7 082F5300 083FB000 00000408 00080262 comp.kext64/sbin/comp.kext
57. 8 082F5100 08ACC000 000849D8 00080272 nfs.ext64/usr/lib/drivers/nfs.ext
58. 9 082F5200 08714000 000014D8 00180248 /unix
59. ...
60. vfs analyse de la table vfs
61. vfs 1
62. GFS DATA TYPE FLAGS
63.
64. 1 F10000E31D34F470 007127F0 F10000E31D350990 JFS DEVMOUNT
65. ... /dev/hd4 mounted over /
66.
67. vfs_next..... F10000E31D34F4D0 vfs_gfs...... 00000000007127F0
68. vfs_mntd..... F10000E30862DF10 vfs_mntdover. 0000000000000000
69. vfs_vnodes... F10000E3049E7380 vfs_count.... 00000001
70. vfs_data..... F10000E31D350990 vfs_number... 00000001
71. vfs_mdata.... F10000E31E685500 vfs_bsize.... 00001000
72. vfs_lock@.... F10000E31D34F4C0 vfs_lock..... 0000000000000000
73. vmt_revision. 00000001 vmt_length... 00000078 vmt_vfsnumber 00000001
74. vmt_fsid..... 8000000A00000004 0000000000000003
75.
76. dla recherche de dead lock
77. dla
78. Component Dump Table Cache (10000 entries) OVERFLOW
79. Component Dump Table Cache resized from 10000 to 20000 entries
80. [kdb_read_mem] no real storage @ F10000E3206F3410
81. [kdb_read_mem] no real storage @ F10000E3208E6E30
82. [kdb_read_mem] no real storage @ F10000E3208E6E30
83. [kdb_read_mem] no real storage @ F10000E3208E6E30
84. [kdb_read_mem] no real storage @ F10000E3208E6E30
85. ...
86. cdt
87. cdt
88. 1) CDT head name dmp_minimal, len 00000108, entries 5
89. 2) CDT head name proc entries 2473
90. 3) CDT head name thrd entries 6833
91. 4) CDT head name ldr, len 00000078, entries 2
92. 5) CDT head name errlg, len 000000A8, entries 3
93. 6) CDT head name lfs, len 00000048, entries 1
94. 7) CDT head name bos, len 00000078, entries 2
95. 8) CDT head name ipc, len 00000168, entries 7
96. 9) CDT head name vmm, len 00000438, entries 22
97. 10) CDT head name alloc entries 267
98. 11) CDT head name rtastrc, len 00000198, entries 8
99. 12) CDT head name sscsidd, len 00000048, entries 1
100. 13) CDT head name aixpcm, len 00000108, entries 5
101. 14) CDT head name efcdd, len 00000588, entries 29
102. 15) CDT head name scdisk, len 00000228, entries 11
103. 16) CDT head name lvm, len 00000078, entries 2
104. 17) CDT head name tty, len 000000D8, entries 4
105. 18) CDT head name efscsi, len 00000168, entries 7
106. 19) CDT head name scsidisk, len 000030A8, entries 259
107. 20) CDT head name netstat, len 000001F8, entries 10
108. 21) CDT head name goent_dd, len 000000D8, entries 4
109. 22) CDT head name jfs2, len 00000048, entries 1
110. (0)> cdt 5
111. 5) CDT head name errlg, len 000000A8, entries 3
112. CDT 1 name errc addr 00000000002827A0, len 000009E8
113. CDT 2 name errc_io addr 0000000000DF46C8, len 00000048
114. CDT 3 name log addr F10000E3040E3000, len 00008000


23. erreurs
23.1. comment lister les erreurs?
errpt
#errpt
IDENTIFIER TIMESTAMP TC RESOURCE_NAME DESCRIPTION
C6ACA566 0711114407 US syslog MESSAGE REDIRECTED FROM SYSLOG
C6ACA566 0711114407 US syslog MESSAGE REDIRECTED FROM SYSLOG
C6ACA566 0711084607 US syslog MESSAGE REDIRECTED FROM SYSLOG
A6DF45AA 0711084407 IO RMCdaemon The daemon is started.
C6ACA566 0711084407 US syslog MESSAGE REDIRECTED FROM SYSLOG
C6ACA566 0711084407 US syslog MESSAGE REDIRECTED FROM SYSLOG
B38E3397 0711084307 US SYSDUMP Previous system dump information
C0AA5338 0711084307 US SYSDUMP SYSTEM DUMP
9D035E4D 0711040007 PS SYSVMM DATA STORAGE INTERRUPT, PROCESSOR
9DBCFDEE 0711084307 TO errdemon ERROR LOGGING TURNED ON
C6ACA566 0711034907 US syslog MESSAGE REDIRECTED FROM SYSLOG

23.2. comment lister les erreurs de manière détaillées?
errpt -a
23.3. comment afficher une erreur de façon détaillée à l'aide de son identifiant ?
errpt -aj 9D035E4D
---------------------------------------------------------------------------
LABEL: DSI_PROC
IDENTIFIER: 9D035E4D

Date/Time: Wed Jul 11 04:00:31 DFT
Sequence Number: 9554
Machine Id: 00CCD2CD4C00
Node Id: ceto
Class: S
Type: PERM
Resource Name: SYSVMM

Description
DATA STORAGE INTERRUPT, PROCESSOR

Probable Causes
SOFTWARE PROGRAM

Failure Causes
SOFTWARE PROGRAM

Recommended Actions
IF PROBLEM PERSISTS THEN DO THE FOLLOWING
CONTACT APPROPRIATE SERVICE REPRESENTATIVE

Detail Data
DATA STORAGE INTERRUPT STATUS REGISTER
0000 0000 0000 0000
SEGMENT REGISTER, SEGREG
4000 0000 0000 00FF
DATA STORAGE INTERRUPT ADDRESS REGISTER
FFFF D000 0000 0000
EXVAL
044D 6B40 FFFF FFFF


23.4. comment afficher une erreur en fonction de son label ?
errpt -aJ SYSLOG
Voici une liste d'exemple de labels possibles:
• SYSLOG
• SYSDUMP_STACK
• DUMP_STATS
• DSI_PROC
• ERRLOG_ON
• RMCD_INFO_0_ST

23.5. comment afficher les erreurs entre deux dates ?
Le format de la date est mmddhhmmyy . On utilise les flags -s pour le début et -e pour la fin.
#errpt -s 0711084307 -e 0711084407
IDENTIFIER TIMESTAMP TC RESOURCE_NAME DESCRIPTION
B38E3397 0711084307 US SYSDUMP Previous system dump information
C0AA5338 0711084307 US SYSDUMP SYSTEM DUMP
9DBCFDEE 0711084307 TO errdemon ERROR LOGGING TURNED ON


24. cpu
24.1. comment obtenir des informations sur les processeurs ?
La commande de pmlist exécute les fonctions suivantes :
1. liste les processeurs supportés.
2. liste le résumé de l'information pour un processeur donné.
3. liste la table d'événement pour un processeur donné.
4. liste n'importe quels groupes d'événement existants pour un processeur donné.
5. liste n'importe quels jeux d'événement existants pour un processeur donné.
6. liste le jeu d'événement et la formule pour une métrique donnée.
pmlist -s

POWER5 supports 6 counters

Number of groups : 148
Number of sets : 9

Threshold multiplier (lower): 1
Threshold multiplier (upper): 32
Threshold multiplier (hyper): 64
Hypervisor counting mode is supported
Runlatch counting mode is supported

24.2. comment obtenir des informations sur les processeurs au format csv ?
pmlist -s -oc
Processor Name,Counter Number,Group Number,Set Number,Lower Threshold,Upper Threshold,Hyper Threshold,Hypervisor Counting,Runlatch Counting
POWER5,6,148,9,1,32,64,yes,yes

24.3. comment examiner les plus gros process ?
-P donne la mémoire pour les 10 plus importants process
-U donne la mémoire pour les 10 plus importants utilisateurs
#svmon -P -v -t 10 | more
(B) #svmon -U -v -t 10 | more

24.4. comment savoir si votre processeur est en mode SMT (multithread simultané) ?
smtctl

This system is SMT capable.

SMT is currently enabled.

SMT boot mode is not set.
SMT threads are bound to the same physical processor.

proc0 has 2 SMT threads.
Bind processor 0 is bound with proc0
Bind processor 1 is bound with proc0


24.5. comment passer votre processeur en mode SMT (multithread simultané) ?
smtctl -m 'on' -w now
smtctl: SMT is now enabled.
-m 'off' pour désactiver le mode SMT.

25. tuning
25.1. comment monitorer un disque à interval régulier?
iostat 1 | grep "hdisk0 "
hdisk0 7.0 83.8 14.8 80387474 324942887
hdisk0 17.0 244.0 55.0 0 244
hdisk0 15.9 238.2 47.6 0 240
hdisk0 17.0 231.4 50.9 0 232
hdisk0 16.0 216.3 45.1 0 216
hdisk0 11.9 194.1 41.6 0 196

25.2. comment tuner un disque?
iostat | head -n5
tty: tin tout avg-cpu: % user % sys % idle % iowait
0.6 80.7 11.3 10.8 72.3 5.6

Disks: % tm_act Kbps tps Kb_read Kb_wrtn
iostat | grep "hdisk1 "
hdisk1 6.1 67.3 13.8 10609796 314630527

25.3. comment autoriser lvmstat?
lvmstat -v rootvg

Logical Volume iocnt Kb_read Kb_wrtn Kbps
hd2 88 0 352 0.00
hd4 62 0 272 0.00
hd8 24 0 96 0.00
hd3 16 0 64 0.00
paging00 0 0 0 0.00
lv00 0 0 0 0.00
hd10opt 0 0 0 0.00
dumplv 0 0 0 0.00
hd9var 0 0 0 0.00
hd6 0 0 0 0.00
hd5 0 0 0 0.00
lvmstat -v rootvg

Logical Volume iocnt Kb_read Kb_wrtn Kbps
hd2 365 4 1456 0.00
hd4 190 0 800 0.00
hd8 74 0 296 0.00
hd3 62 0 248 0.00
hd6 4 0 16 0.00
paging00 0 0 0 0.00
lv00 0 0 0 0.00
hd10opt 0 0 0 0.00
dumplv 0 0 0 0.00
hd9var 0 0 0 0.00
hd5 0 0 0 0.00
lvmstat -v rootvg -d

25.4. comment autoriser/supprimer le tuning d'un volume groupe ?
lvmstat -v rootvg -e
-e enable -d disable.
25.5. comment voir les entrees/sorties d'un volume groupe ?
lvmstat -v rootvg

Logical Volume iocnt Kb_read Kb_wrtn Kbps
hd8 126 0 504 0.00
hd2 100 0 464 0.00
hd3 60 0 800 0.00
hd4 34 0 144 0.00
hd9var 18 0 80 0.00
hd6 16 0 64 0.00
lg_dumplv 0 0 0 0.00
hd10opt 0 0 0 0.00
hd5 0 0 0 0.00


26. shell
26.1. Comment récupérer sous forme de shell les commandes passées par smit ?
smitty -s command.sh
smit va créer un fichier command.sh . Il faut rendre celui-ci exécutable à l'aide de chmod +x .
Une autre manière de faire consiste à récupérer le fichier smit.log et l'éditer.
26.2. Comment recuperer le résultat d'une opération avec bc dans une variable ?
a=`bc << EOF > 6+8
> quit
> EOF
Autre façon de faire:
a=2
awk -va=$a 'BEGIN { print a+1 }'| read b
echo $b
3

26.3. Comment faire une opération avec perl en mode commande et retourner le résultat dans une variable ?
#a=`echo 45 + 6 |perl -pane "$F[0] + $F[1];"`

26.4. Comment faire une copie de fichier avec un timestamp ?
FIRCHIER=mon_fichier
cp -pr $FICHIER "${FICHIER}_`date +%H%M%d%m%y`"

26.5. Comment créer un fichier d'une taille donnée ?
Ici on va créer un fichier filename1 de 100 octets.

/usr/sbin/lmktemp filename1 100
filename1
# ls -l filename1
-rw-r--r-- 1 root system 100 Jun 14 14:11 filename1


.