Anda di halaman 1dari 14

PAGING SPACE MANAGEMENT IN AIX

UNIX DC BEES FOR SERVER ADMINISTRATORS > AIX > PAGING SPACE MANAGEMENT IN AIX

Author: admin February 26, 2015 3 Comments


AIX
PAGING SPACE IN AIX
Paging Space definition :-
Paging is the most important part of virtual memory implementation in most of the modern operating systems, allowing
them to use disk storage for data that does not fit into physical random-access memory (RAM). Paging’s are used for
memory management algorithm store and retrieve data from secondary storage for use in main memory when a program
tries to access pages that are not currently mapped to physical memory (RAM).
By default , AIX operating system has the paging space named as hd6 and the default size is 512 MB , which is not
enough if the RAM size is in GB’s.
Based on the RAM size we have create the paging space in the OS to support RAM.

CREATING PAGING SPACE FROM PAGGINGVG


STEP 1 :
In practical , I would say that keeping the huge size of paging space in rootvg is not the good idea so that always plan the
secondary paging space devices from out off rootvg. Here we will check the available free disk to create the separate
paging space.

STEP 2 :
As you could see , hdisk1 is free we will create the pagingvg by using hdisk1
The syntax is :- mkvg -s 512M -y pagingvg hdisk1
Once you fire the command the volume group will created and you can check through lspv command which shows the
newly created pagingvg.

STEP 3:
Now we will create the paging space from the volume group pagingvg by using the default AIX commands.
Paging Space calculations :-
This paging space standard size is based upon the memory workload in your environment and we found that below given
calculation very much suitable for our workplace and the calculation is

If , RAM SIZE BELOW OR = 10 GB ==========>> (Memory Size * 2) = Swap Space


If , RAM SIZE MORE THEN 10 GB ==========>> (Memory Size * 0.75) = Swap Space

The syntax is:-


#mkps -a -n -s 60 paggingvg hdisk1
Where:-
Paggingvg Name: paggingvg
Hdisk Name : hdisk1
Size of the Paging Space in PPs : 60 PPs
STEP 4 :
Check your paging space which you ahve created newly by using. # lsvg -l paggingvg

STEP 5:
The same above option we can do it through smitty menu , if you are not familiar with
command line go with smitty which is pretty essay.. # smit mkps

STEP 6:
Select the pagingvg from the volume group options, # smit menu
STEP 7:
We have define the attributes to create the paging space in the smitty menu , once you have done that even you can
press Enter will give you the command which is going to execute.

INCREASING AND DECREASING PAGING SPACE:-


This could be a task to the Server Admins in frequent ,
STEP 8:
Increasing the paging space by using chps command and the syntax is
# chps -s <pp’s> <pagging_name>

STEP 9:
Decreasing the paging space by using chps command and the syntax is
# chps -d <pp’s> <pagging_name>
PAGING SPACE ON AND OFF:-
STEP 10:
To list out the all the available paging space & the syntax # lsps -a

We would see the three paging space available out off that two are belongs to pagingvg and all are active.

Note:
There could be question in your mind that we should not keep the multiple paging space in the same disk , this is for test
we kept like that.
STEP 11:
Switching off the paging space we use swapoff command # swapoff /dev/pagin00/01

STEP 12:
Switching on the paging space we use swapon command # swapon /dev/paging00/01
After switching off or on your paging space device its recommended that to validate the paging space. # lsps -a

REMOVING PAGING SPACE AND PAGINGVG


STEP 13:
List out all the available paging space # lsps -a

STEP 14:
Be sure that before removing your paging space we needs to de active the paging space by using swapoff command
# swapoff /dev/paging00

STEP 15:
Validate the paging space whether paging space deactivate or not. # lsps -a

STEP 16:
Remove the paging space device from OS by using rmps command
# rmps paging00 / paging01
REMOVE PAGINGVG
STEP 17:
To list and ensure non of the logical volume open from your paging vg # lsvg -l paggingvg

STEP 18:
By using native AIX command reduce hdisk1 from paging vg # reducevg paggingvg hdisk1

You could see that the paging vg has been remove from the system

RESULT:
Paging Space management has been successfully configured in AIX operating system.

AIX : Swap & Paging commands


Posted on July 15, 2014Posted in Performance

Here are some commands that helps to manage AIX paging and swapping.
List the paging space available in the system, Use lsps command.
bash-3.00# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd3 hdisk0 myvolvg 4000MB 77 yes yes lv
You can also see the paging details in “prtconf” command.

bash-3.00# prtconf
Paging Space Information
Total Paging Space: 3968MB
Percent Used: 4%
Volume Groups Information
==============================================================================
myvolvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 320 68 xx..00..00..00..30
==============================================================================
To add additional paging space in AIX system: Use mkps command.

bash-3.00# mkps -a -n -s 32 myvolvg


paging00
bash-3.00#
Verify the newly added paging space:

Once added, you can see the paging space in /etc/swapspaces.

bash-3.00# 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
* /etc/rc swaps on every device listed here).
*
*
* This file is modified by the chps, mkps and rmps commands and referenced
* by the lsps and swapon commands.
hd3:
dev = /dev/hd3
paging00:
dev = /dev/paging00
Check the status using lsps command.

bash-3.00# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
paging00 hdisk0 myvolvg 4000MB 0 yes yes lv
hd3 hdisk0 myvolvg 4000MB 77 yes yes lv
bash-3.00#
Other commands :
 You can also use “svmon” command to capture and analyze the snapshot of your AIX virtual memory
system.
 To check how much of paging space is used by a process, use : svmon -P pid
 To print summary information on total paging space, use : swap -s
 To list the status of the paging space areas in a list form, use : swap -l

Error Log Monitoring AIX


UNIX DC BEES FOR SERVER ADMINISTRATORS > AIX > Error Log Monitoring AIX

Author: admin November 9, 2015 0 Comments


AIX

Error Log Monitoring AIX


We are going to have a look on errpt monitoring and how errpt works in AIX operating system in detail.

In actual errlog allows operating system to records software and hardware issues such that warning, failure and events in
to a log file through errpt command and we can read those errors to take the necessary actions to prevent unavailability
of hardware or software components.

Errpt components:-
There are two major components
1. Kernel components
2. User Components
Error login process:-
If there is error detected by on operating system that sends the error code information to errsave (kernel components)
which add the entry in to /dev/error file and whenever there is a new entry added in to /dev/error file which add the
timestamp information etc ….. There is a sequence of operation involved to creating the error log entries. All error
description information stored in /var/adm/ras/errtmplt file and based on the error category the information would be
described. After completion of all the above said sequences error message would be stored in /var/adm/ras/errlog file an
whenever we execute the errpt command which reads the information from errlog file and provide the information in to
terminal.

File location details


1. Error file locates in /dev/error

2. Errtmplt locates in /var/adm/ras/

3. Errorlog locates in /var/adm/ras/


If you run errpt command with will display the output in six columns and those are, error identifier, timestamp, type, class,
resource name and description.

TIMESTAMP would be displayed as like above given image.

Type of Error:-
Type of error displayed under “T” column whereas T denotes Temporary, P denotes Permanent or performance or
Pending, I denote Informational and U denotes unknown.

Class of Error:-
Class of error displayed under “C” column whereas H denotes Hardware, S denotes software, O denotes Operator and U
denotes undetermined.

Resource Name:-
This information would be collected from ODM and based on error classification it take the information from CuDv,CuAt
and CuVPD.

If you want to see detailed information about whatever the error in errpt simply errpt –a command can be executed with
pg or more option would give details as like below.
Error log management:-
Error logging demon would be started at the time of system startup whereas rc.boot script takes care about stopping and
starting errdemon.

Can be validate through ps –ef | grep –i err*, incase by any unconditional situation errpt terminated errdemon can be
started by /usr/lib/errdemon. If you want to stop errdemon issues /usr/lib/errstop but stopping errdemon would not be
advisable.

Errdemon attributes can be checked through errdemon –l command also buffer size and log file size can be adjusted
through s and b switches.If we would like to clear errlog mean through errclear command we could achieve.
IBM AIX – Scheduling jobs (corn and at )
UNIX DC BEES FOR SERVER ADMINISTRATORS > AIX > IBM AIX – Scheduling jobs (corn and at )
Author: admin November 3, 2015 0 Comments
AIX
IBM AIX – Scheduling jobs (corn and at )
Cron job is set of commands or scripts can be run at any given point of time in operating system based on schedule time
interval. Cron jobs runs based out of cron daemon which initiates at the time of system boot. By using crontab command
schedule jobs can be edited, listed and removed as well.

Inittab entry for cronjob :-

Crontab works based on files placed on /var/spool/adm/crontabs/ directory, files names would be the user name (loginid)
this is file which contains all scheduling jobs for particular user.

Crontabs directory location and listing:-

Control mechanism in cron tab is that there would be a two files which plays major role for give permission for schedule
or remove , those file are /var/adm/cron/cron.allow and /var/adm/cron/cron.deny if cron.allow file exists without any entry
no one can schedule the jobs, hence whoever want to schedule the job those user names would be added in to
cron.allow file. Only root user able edit these files.

Cron.allow and cron.deny files and locations:-

Cron job scheduling has some standard structure and we should follow while scheduling cron jobs otherwise cron will not
be executed. Please find the sample schedule entry.

Detailed description about cron entry

The above entry would run on server every 55 minute and 23 hours on every day/month/week and the command is
“/var/perf/pm/bin/pmcfg“ “>/dev/null/ 2>&1” also is part of the schedule command which redirects if any errors.
Validation and cron limitation:-
Once you scheduled a job we must be interesting to see the results, as I said earlier we can have on log redirecting
mechanism which would notice job status weather success or failure. However cron has secondary control whereas all
cron job status would be stored in to /var/adm/cron/log file.

Location of the log file:-

See the sample data for reference

If we have any issues about cron job we could read /var/adm/cron/log file to debug .

Limitation:-
Off course every action have an limits , yes corn also have an limit such that how many cron jobs can be executed
concurrently in operating system and cron limitation has been controlled by “queuedefs” file which is located in
/var/adm/cron/ directory. As per design AIX OS can run 100 cron jobs in parallel without any issues with equal rank.

If you could cat or tail /var/adm/cron/queuedefs file you could see the below entry,
C —– Denotes Cron job ( if starting would b mean batch job and a mean at job )

J —– Denotes number of jobs can run parallel

n —– Denotes nice value

w —– Denotes wait time

At is also one of the scheduling job mechanism whereas at has been used to schedule job only once.

Anda mungkin juga menyukai