Monday, January 27, 2014

Solaris Mount NFS 3 using NFS 4 Client

Reconfigure the NFS client on Solaris to force the max. supported version of NFS to NFSv3. You change this by modifying the following line in /etc/default/nfs:
#NFS_CLIENT_VERSMAX=4
to:
NFS_CLIENT_VERSMAX=3
Then issue:
svcadm refresh svc:/network/nfs/client:default 
 
 Or:

# mount -o vers=3  nfs3.goweekend.ca:/nfsshare /nfsshare

Tuesday, January 21, 2014

Solaris Find out the PID which using specified port number


#!/bin/bash

if [ $# -ne 1 ]; then
  echo "Usage:"
  echo "        $0 <port number?"
  exit $LINENO
fi

portNumber=$1
for i in `ls /proc`
do
  pfiles $i | grep AF_INET | grep "port: ${portNumber}$"
  if [ $? -eq 0 ]
  then
    echo Is owned by pid $i
    pargs $i
  fi
done