Yulianto is Piyut

Sekedar Celotehan dan Ungkapan Perasaan

Archive for September, 2007

Configure disk to use for veritas volume manager (VxVM)

Posted by piyut on Sunday, September 16, 2007

1. Detect new disk -> dfsadm, cfgadm -c configure control_number

2. Labeling disk -> format, choose disk number, label

3. Configure disks

# vxdisksetup -i disk_name

or using vxdiskadm -> choose 1. Add or initialize one or more disks

4. make diskgroup

# vxdg init dg_name disk_name=device_name

* vxdg init backupdg backupdg01=Disk_24

5. make volume

# vxassist -g backupdg maxsize

2096883712

# vxassist -g backupdg make backuplv 2096883712

*size=output from vxassist -g dg_name maxsize

6. Start volume

# vxvol -g backupdg startall

7. Make Filesystem

# mkfs -F vxfs /dev/vx/rdsk/backupdg/backuplv

8. Mounting Filesystem

# mkdir /backup

# mount -F vxfs /dev/vx/dsk/backupdg/backuplv /backup

9. Edit /etc/vfstab

Posted in Solaris | 5 Comments »

How to find world writable file and directory

Posted by piyut on Friday, September 14, 2007

To find world writable file:

#  find / -type f -perm -o+w -exec ls -l {} \;

To find world writable directory:

# find /home -type d -perm -o+w -exec ls -ld {} \;

Posted in HP-UX, Solaris | Leave a Comment »

OS Memory Leaks/Hogs

Posted by piyut on Thursday, September 13, 2007

1. To cek memory leaks in hpux can use an unsupported utility called kmeminfo

2. Checking memory hogs:

- JFS inode cache is sized by vx_ninode kernel parameter. the value of vx_ninode is determined by memory size

- lowering vx_ninode results in a large savings of memory

- to see the JFS inode cache:

# echo “vxfs_ninode/D” | adb -k /stand/vmunix /dev/mem

- to see how many JFS inodes are currently cached:

# echo “vx_cur_inodes/D” | adb -k /stand/vmunix /dev/mem

Posted in HP-UX | Leave a Comment »

lsof

Posted by piyut on Friday, September 7, 2007

Get the source of lsof from  http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.78/

To install, run command swinstall -s $PWD/lsof-4.78-hppa-11.11.depot \*, the insallation file will be put at /usr/local

To display just the lsof output lines with file locks run the following:

/opt/lsof/bin/lsof | awk ‘match(“NrRwWuUx”,substr($0,31,1))’

Posted in HP-UX | Leave a Comment »