Posts Tagged ‘aix’
Posted by Emerson Takahashi on August 10, 2010
Run iostat and check the column % tm_act. For seven times, it will display the statistics every two seconds
root@aix5:/ # iostat -d hdisk2 2 7
System configuration: lcpu=6 disk=4
Disks: % tm_act Kbps tps Kb_read Kb_wrtn
hdisk2 85.2 3453.1 303.8 37734456 8731944
hdisk2 51.0 610.0 84.5 796 424
hdisk2 34.5 288.0 45.5 436 140
hdisk2 39.5 452.0 63.5 692 212
hdisk2 61.5 380.0 66.0 480 280
hdisk2 48.5 542.0 66.5 596 488
hdisk2 47.0 590.0 80.0 1020 160
Like this:
Be the first to like this post.
Posted in AIX | Tagged: aix, iostat | Leave a Comment »
Posted by Emerson Takahashi on August 9, 2010
Lists all the subsystems on AIX’s System Resource Controller and then look for the subsystem that you want. In this example, I’ll restart sshd
root@aix:/ # lssrc -a | grep ssh
sshd ssh 340158 active
Issue the command to stop sshd
root@aix:/ # stopsrc -s sshd
0513-044 The sshd Subsystem was requested to stop.
Then start it
root@aix:/ # startsrc -s sshd
0513-059 The sshd Subsystem has been started. Subsystem PID is 340162.
Like this:
Be the first to like this post.
Posted in AIX | Tagged: aix | Leave a Comment »
Posted by Emerson Takahashi on August 9, 2010
First you need to know which filesystem that you’ll resize. Get the logical volume
root@aix:/ # df -m /u04
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/lvcrnstore 34816.00 1892.34 95% 103 1% /u04
With this information you type lslv lvcrnstore to find out about the volume group that this logical group is part of. Check if there are FREE PPs to extend the filesystem
root@aix:/ # lsvg oraclevg
VOLUME GROUP: oraclevg VG IDENTIFIER: 000d400c00004c00000000fd81379ca3
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 531 (135936 megabytes)
MAX LVs: 256 FREE PPs: 17 (4352 megabytes)
LVs: 15 USED PPs: 514 (131584 megabytes)
OPEN LVs: 14 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE 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
Resize the filesystem and check the new size
root@aix:/ # chfs -a size=+4G /u04
Filesystem size changed to 79691776
root@aix:/ # df -m /u04
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/lvcrnstore 38912.00 5987.71 85% 103 1% /u04
Notice that the number of free PPs decreased since you used to increase the filesystem
root@aix:/ # lsvg oraclevg
VOLUME GROUP: oraclevg VG IDENTIFIER: 000d400c00004c00000000fd81379ca3
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 531 (135936 megabytes)
MAX LVs: 256 FREE PPs: 1 (256 megabytes)
LVs: 15 USED PPs: 530 (135680 megabytes)
OPEN LVs: 14 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE 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
Like this:
Be the first to like this post.
Posted in AIX | Tagged: aix, chfs, lsvg | Leave a Comment »
Posted by Emerson Takahashi on July 23, 2010
First you need to check some information for your system on the HMC. Issue the command vtmenu to get the managed system ID and the names of the partitions
hscroot@localhost:~> vtmenu
Retrieving name of managed system(s) . . . 108F19C
———————————————————-
Partitions On Managed System: 108F19C
———————————————————-
1) MANUFACTURING Running:
2) RETAIL Running:
Enter Number of Running Partition (q to quit): q
Bye.
On this example I tried to soft reset the partition called MANUFACTURING
hscroot@localhost:~> chsysstate -m 108F19C -r lpar -n MANUFACTURING -o reset
Since it didn’t work out as expected, I decided to power off the LPAR
hscroot@localhost:~> chsysstate -m 108F19C -r lpar -n MANUFACTURING -o off
hscroot@localhost:~> vtmenu
Retrieving name of managed system(s) . . . 108F19C
———————————————————-
Partitions On Managed System: 108F19C
———————————————————-
1) MANUFACTURING Ready:
2) RETAIL Running:
Enter Number of Running Partition (q to quit): q
Bye.
I turned the partition on and after that it worked flawlessly
hscroot@localhost:~> chsysstate -r lpar -m 108F19C -o on -n MANUFACTURING
hscroot@localhost:~> vtmenu
Retrieving name of managed system(s) . . . 108F19C
———————————————————-
Partitions On Managed System: 108F19C
———————————————————-
1) MANUFACTURING Starting:
2) RETAIL Running:
Enter Number of Running Partition (q to quit): q
Bye.
Like this:
Be the first to like this post.
Posted in AIX, Hardware, HMC | Tagged: aix, hmc, power4 | Leave a Comment »
Posted by Emerson Takahashi on July 13, 2010
To check account properties you use the command lsuser and specify what property you want to see.
Checking if an account is locked
root@aix:/ # lsuser -a account_locked emerson
emerson account_locked=false
To calculate when was the last time an user logged in to the server, you will need to convert the time displayed. Use the command below to convert.
root@aix:/ # lsuser -a time_last_login emerson
emerson time_last_login=1279036180
root@aix:/ # perl -we ‘print(my $time = localtime 1279036180, “\n”)’
Tue Jul 13 10:49:40 2010
Like this:
Be the first to like this post.
Posted in AIX | Tagged: aix, lsuser | Leave a Comment »
Posted by Emerson Takahashi on March 5, 2010
This AIX server has a disk array connected.
root@aix:/ # lscfg -vl hdisk2
hdisk2 U0.1-P2-I3/Z3-A0 SCSI RAID 5 Disk Array
The array has 7 physical disks
root@aix:/ # lsdev -C | grep pdisk
pdisk0 Available 1A-08-01-0,0 Physical SCSI Disk Drive
pdisk1 Available 1A-08-01-1,0 Physical SCSI Disk Drive
pdisk2 Available 1A-08-01-2,0 Physical SCSI Disk Drive
pdisk3 Available 1A-08-01-3,0 Physical SCSI Disk Drive
pdisk4 Available 1A-08-01-4,0 Physical SCSI Disk Drive
pdisk5 Available 1A-08-01-5,0 Physical SCSI Disk Drive
pdisk6 Available 1A-08-01-6,0 Physical SCSI Disk Drive
Connected through a PCI-X SCSI RAID adapter
root@aix:/ # lscfg -vl sisioa0
sisioa0 U0.1-P2-I3 PCI-X Dual Channel U320 SCSI RAID Adapter
PCI-X Dual Channel Ultra320 SCSI RAID Adapter:
Part Number……………..97P3960
FRU Number………………97P3960
Serial Number……………YL10C4077074
Manufacture ID…………..000C
EC Level………………..0
ROM Level.(alterable)…….0709000c
Product Specific.(Z0)…….5703
Product Specific.(Z1)…….1
Device Specific.(YL)……..U0.1-P2-I3
When we checked the status we saw that the array was running in degraded state.
root@aix:/ #sisraidmgr -L -j1 -l sisioa0
————————————————————————
Name Location State Description Size
————————————————————————
sisioa0 1A-08 Available PCI-X Dual Channel U320 SCSI RAID Adapter
scsi2 1A-08-00-07,0 NoLink No remote adapter target
scsi3 1A-08-01-07,0 NoLink No remote adapter target
hdisk2 1A-08-ff-0,0 Degraded RAID 5 Array 428.0GB
pdisk0 1A-08-01-0,0 Active Array Member 71.4GB
pdisk1 1A-08-01-1,0 Active Array Member 71.4GB
pdisk2 1A-08-01-2,0 Active Array Member 71.4GB
pdisk3 1A-08-01-3,0 Active Array Member 71.4GB
pdisk4 1A-08-01-4,0 Active Array Member 71.4GB
pdisk5 1A-08-01-5,0 Active Array Member 71.4GB
pdisk6 1A-08-01-6,0 Active Array Member 71.4GB
hdisk0 1A-08-00-10,0 Available 16 Bit LVD SCSI 146.8GB
hdisk1 1A-08-00-11,0 Available 16 Bit LVD SCSI 146.8GB
Like this:
Be the first to like this post.
Posted in AIX, Hardware | Tagged: aix, diskarray, Hardware | Leave a Comment »
Posted by Emerson Takahashi on March 4, 2010
Getting information about the tape drive.
root@aix:/ # lscfg -vpl rmt0
rmt0 U787E.001.AAA2714-P2-C1-T2-L0-L0 4.0 GB 4mm Tape Drive
Manufacturer…………….ARCHIVE
Machine Type and Model……IBM4326NP/RP !D
Device Specific.(Z1)……..5ALG
Serial Number……………DR0N6QG 0011
Load ID…………………0011
Part Number……………..21H5154
FRU Number………………59H3481
EC Level………………..E30312
Device Specific.(Z0)……..0180020283000018
Device Specific.(Z3)……..L1
PLATFORM SPECIFIC
Name: st
Device Type: byte
Getting information about the tape. It is using compression and a variable length block size.
root@aix:/ # tctl -f /dev/rmt0 status
rmt0 Available 06-08-01-0,0 4.0 GB 4mm Tape Drive
ttribute value description user_settable
block_size 0 BLOCK size (0=variable length) True
compress yes Use data COMPRESSION True
mode yes Use DEVICE BUFFERS during writes True
ret_error no RETURN error on tape change or reset True
Rewinding tape drive
root@aix:/ # tctl -f /dev/rmt0 rewind
Reading tape and redirecting output to a file. In this case, the operating system showed that the tape itself is damaged.
root@aix:/ # tctl -f /dev/rmt0 read > /tmp/testtape
tctl: 0511-578 Cannot read 512 bytes: The media surface is damaged.
Like this:
Be the first to like this post.
Posted in AIX, Hardware | Tagged: aix, Hardware, tape | Leave a Comment »
Posted by Emerson Takahashi on February 13, 2010
I had a problem mounting a file system after the server rebooted. At first it reported that the logical volume wasn’t formatted or the format is incorrect. Then it asked to run fsck.
root@aix5:/ # mount /fallback
Replaying log for /dev/fallback.
mount: 0506-324 Cannot mount /dev/fallback on /fallback: The media is not formatted or the format is not correct.
0506-342 The superblock on /dev/fallback is dirty. Run a full fsck to fix.
I just ran fsck on the logical volume and then mounted the file system.
root@aix5:/ # fsck /dev/fallback
****************
The current volume is: /dev/fallback
**Phase 1 – Check Blocks, Files/Directories, and Directory Entries
**Phase 2 – Count links
**Phase 3 – Duplicate Block Rescan and Directory Connectedness
**Phase 4 – Report Problems
**Phase 5 – Check Connectivity
**Phase 7 – Verify File/Directory Allocation Maps
**Phase 8 – Verify Disk Allocation Maps
15728640 kilobytes total disk space.
63 kilobytes in 30 directories.
7664455 kilobytes in 438 user files.
8061172 kilobytes are available for use.
File system is clean.
Superblock is marked dirty; FIX? y
All observed inconsistencies have been repaired.
root@aix5:/ # mount /fallback
root@aix5:/ # df -g /fallback
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fallback 15.00 7.69 49% 470 1% /fallback
Like this:
Be the first to like this post.
Posted in AIX | Tagged: aix, filesystem, fsck, mount | Leave a Comment »
Posted by Emerson Takahashi on January 29, 2010
To remove a logical volume, use rmlv. The -f switch is to remove without user confirmation.
Usage: rmlv [ -B ] [ -f ] [ -p Physical Volume ] LogicalVolume …
Removes a logical volume.
root@aix:/ # /usr/sbin/rmlv -f rawdevice19
rmlv: Logical volume rawdevice19 is removed.
Like this:
Be the first to like this post.
Posted in AIX | Tagged: aix, rmlv | Leave a Comment »