Wednesday, April 08, 2009

lsof on solaris:

download lsof from sunfreeware.com

install package lsof

access it as /usr/local/bin/lsof

Monitoring on Solaris

iostat -xn 20

netstat -arn

vmstat

Disk usage

du | sort -r -n

df -kh

quot /etc

NFS

/etc/dfs/dfstab

shareall, unshareall, svcadm, chkconfig

Hostnames

/etc/inet/hosts

/etc/inet/ipnodes -> introduced initially for ipv6

/etc/hosts -> exists for bsd compatibility, actually its a link to /etc/inet/hosts

VI

create .exrc in $HOME with entries set ts=4, set nu, set autoindent

use :set list to show tabs and spaces in the file. Useful to check the mix of tabs and spaces

By default vi uses one buffer (unnamed buffer). If needed use "a "b ... as named buffers.

eg: "add "b10yy "c20dd "ap "bp "cp