Tag Archives: creating

Creating graphs from SAR output

You must know that sar is a very effective tool to collect system activity or performance information from your system.
To collect all information:

sar -o test.log -A 1 3 2>&1 >/dev/null

This command will make a binary file from output, and you can display it with sadf command:

sadf -t -d test.log — -A

Sometimes, you would like to make graphs from these data, because diagrams are clear and better understandable than plain data.
The best way to create graphs from output of sar is kSar that is an Java-based application with gui.
You can download it from the following site: http://ksar.atomique.net/

This program can process sar text output and make diagrams from them, also it can save graphs as picture or export them into a PDF file.
If you have only the binary output of sar, you can convert it into text file with this command:

sar -A -f test.log >> sardata.txt

Now, you can import text file into kSar, with “Data/Load from text file…” menu entry.
Also, kSar has other useful functions, like remote sar running via SSH, for more details read kSar documentation.
Loading text file:sar-graph2-300x187 sar-graph-300x187 sar-main-300x187

Aix using mkcd and creating a bootable ISO image from mksysb images

Create an ISO image of AIXLPAR2 from an existing mksysb file. I had already created a mksysb file of AIXLPAR2 in /usr/sap/put/AIXLPAR2-mksysb.

root@AIXLPAR2 /usr/sap/put # mkcd -L -S -I /usr/sap/put/image -m /usr/sap/put/AIXLPAR2-mksysb

Initializing mkcd log: /var/adm/ras/mkcd.log…

Verifying command parameters…

Creating temporary file system: /mkcd/cd_fs…

Populating the CD or DVD file system…

Building chrp boot image…

Copying backup to the CD or DVD file system…

Creating Rock Ridge format image: /usr/sap/put/image/cd_image_712892

Running mkisofs …

….

mkrr_fs was successful.

Making the CD or DVD image bootable…

Removing temporary file system: /mkcd/cd_fs…

root@AIXLPAR2 /usr/sap/put # ls -ltr

total 4369112

drwxr-xr-x    2 root     system          256 Aug 20 10:31 lost+found

-rw-r–r–    1 root     system   2236979200 Dec 10 09:16 AIXLPAR2-mksysb

drwxr-xr-x    2 root     system          256 Dec 10 09:23 image

– Confirm the ISO image has been created.

root@AIXLPAR2 /usr/sap/put # cd image

root@AIXLPAR2 /usr/sap/put/image # ls -ltr

total 4483256

-rw-r–r–    1 root     system   2295425024 Dec 10 09:24 cd_image_712892

 – Copy the image to the VIOS virtual media library directory.

 # df -m .

Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on

/dev/VMLibrary_LV   7168.00   2768.93   62%        6     1% /var/vio/VMLibrary

# scp 10.X.X.X:/usr/sap/put/image/cd_image_712892 .

root@10.X.X.X’s password:

cd_image_712892                               100% 2189MB  40.5MB/s   00:54

 

# ls -ltr

total 13432312

drwxr-xr-x    2 root     system          256 Dec 03 11:08 lost+found

-rw-r–r–    1 root     staff    3857645568 Dec 04 08:53 AIX61_DVD_1.iso

-rw-r–r–    1 root     staff     724271104 Dec 04 10:09 AIX61_DVD_2.iso

-rw-r–r–    1 root     staff    2295425024 Dec 10 09:33 cd_image_712892

– Rename the image to a more meaningful name.

# mv cd_image_712892 AIXLPAR2_mksysb.iso

# ls -ltr

total 13432312

drwxr-xr-x    2 root     system          256 Dec 03 11:08 lost+found

-rw-r–r–    1 root     staff    3857645568 Dec 04 08:53 AIX61_DVD_1.iso

-rw-r–r–    1 root     staff     724271104 Dec 04 10:09 AIX61_DVD_2.iso

-rw-r–r–    1 root     staff    2295425024 Dec 10 09:33 AIXLPAR2_mksysb.iso

– Map a virtual optical device to the client LPAR.

$ lsmap –vadapter vhost1

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost1          U7998.61X.10071DA-V1-C13                     0x00000000

VTD                   vtscsi3

Status                Available

LUN                   0x8100000000000000

Backing device        lp2vd1

Physloc

$ mkvdev -fbo -vadapter vhost1

vtopt0 Available

 

$ lsmap –vadapter vhost1

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost1          U7998.61X.10071DA-V1-C13                     0x00000000

 

VTD                   vtopt0

Status                Available

LUN                   0x8200000000000000

Backing device

Physloc

 

VTD                   vtscsi3

Status                Available

LUN                   0x8100000000000000

Backing device        lp2vd1

Physloc

 

$ lsrep

Size(mb) Free(mb) Parent Pool         Parent Size      Parent Free

7139      579 rootvg                   139776            57344

 

Name                                    File Size Optical         Access

AIX61_DVD_1.iso                              3679 None            rw

AIX61_DVD_2.iso                               691 None            rw

AIXLPAR2_mksysb.iso                           2190 None            rw

 

$ loadopt -f -vtd vtopt0 -disk AIXLPAR2_mksysb.iso

 

$ lsmap -vadapter vhost1

SVSA            Physloc                                      Client Partition ID

————— ——————————————– ——————

vhost1          U7998.61X.10071DA-V1-C13                     0x00000000

 

VTD                   vtopt0

Status                Available

LUN                   0x8200000000000000

Backing device        /var/vio/VMLibrary/AIXLPAR2_mksysb.iso

Physloc

 

VTD                   vtscsi3

Status                Available

LUN                   0x8100000000000000

Backing device        lp2vd1

Physloc

– Boot the LPAR from the virtual “SCSI CD” and install the image as “normal”.