Showing posts with label HPUX. Show all posts
Showing posts with label HPUX. Show all posts

Monday, 9 December 2013

Increas Swap space in HPUX



2 ways to increase the swap space
1.   By using SAM
SAM > Disk and File Systems > Swap > Actions
You can add the Device Swap or File System Swap.
2.   By Command Line
Create the logical volume for your secondary swap:
# lvcreate -L 128 /dev/vg14

NOTE: "-L 128" is the size of desired swap

Verify the logical volume:
# lvdisplay /dev/vg14/lvol15

Use SAM to declare your new secondary swap or use the command line:
# swapon /dev/vg14/lvol15

Verify it has been added in "/etc/fstab" when using SAM, or add it manuallywhen using the command line.

Example:
/dev/vg14/lvol15 . swap defaults 0 0

Monday, 10 September 2012

HPUX: Report Disk space in MB or GB of a file system

MB

#!/usr/bin/ksh

echo "Filesystem Mbytes used avail %used Mounted on"

bdf $1 | grep -v Filesystem | awk '{ printf("%s %10d %10d %10d %4s %s\n",$1,$2/
1024,$3/1024,$4/1024,$5,$6)}'


for GB

#!/usr/bin/ksh

echo "Filesystem Gbytes used avail %used Mounted on"

bdf $1 | grep -v Filesystem | awk '{ printf("%s %10d %10d %10d %4s %s\n",$1,$2/
1024,$3/1024,$4/1024/1024,$5,$6)}'

Tuesday, 4 September 2012

HPUX: command to list all the packages installed

/usr/sbin/swlist -v -lproduct -atag -arevision -atitle -ainstall_date -avendor_tag -asize -aarchitecture -ais_patch -lfile -apath -atype  
Tweets by @sriramperumalla