<body> <!-- www.mybloglog.com --> <script type='text/javascript' src='http://track3.mybloglog.com/js/jsserv.php?mblID=2008020909412660'></script> <!-- www.mybloglog.com -->

Unix command | Unix administrator

Unix | Linux | Solaris | Hp-Ux | Xen ... what the fsck, is sar. Why not use vmstat. Is prstat better than top? Bash, korn, c shell, sea shell? root passwd shadow, su - ssp. Time to mount the nfs and starts with UNIX hosting, much more easier on Linux hosting.

ndd Command

Thursday, December 20, 2007

1. To get NIC status, note root passwd password is needed

check the which instance of NIC port we are connecting to
# ndd –get /dev/qfe instance

change the NIC instance to port 0
# ndd -set /dev/qfe instance 0

check status
# ndd -get /dev/qfe link_status (0=down 1=up)
# ndd -get /dev/qfe link_mode (0=half duplex 1=full duplex)
# ndd -get /dev/qfe link_speed (0=10Mbps 1=100Mbps)

# ndd -get /dev/ce adv_autoneg_cap (check auto nego 0=false 1=true)
# ndd -set /dev/ce adv_autoneg_cap 1 (set autonego to true)

ndd help / to check option available with ndd command
# ndd –get /dev/qfe \?

Notes
for ce card use /dev/ce
for qfe card use /dev/qfe
for bge card use /dev/bge1 (instance 1, bge2 = instance2)

The configuration network card configuration file is at /kernel/drv/ce.conf if its is configured manually and forced to specific value.
posted by MML, 4:26 AM | link | 0 comments |

Check PERL version

# perl -v
posted by MML, 4:25 AM | link | 0 comments |

fsck Command

The fsck command is required if your encounter “press CTRL + d” message during startup
# fsck -y /opt
posted by MML, 4:24 AM | link | 0 comments |

set DISPLAY

This is usually required when you use X-Manager to run some GUI application on it. Example will be Veritas Manager or during Oracle installation
# DISPLAY:you.pc.ip.addr:0.0
# export DISPLAY
posted by MML, 4:23 AM | link | 0 comments |

scstat Command

scstat (cluster command)
To move resources from one cluster A to cluster B
# scswitch -Z -g -h
example
# scswitch -Z -g scmrg1 -h server4821
posted by MML, 4:21 AM | link | 0 comments |

mount / devices operation

to mount a device, 1st make sure the device is in /etc/vfstab
# mount /rpt_data02
or
# mount /dev/vx/dsk/rptdg/rpt_data02 /rpt_data02

to kill all process / users using a specific devices, usefull when you could not umount the file system or devices that you are sure no users is accessing it
# fuser -ck /the/directory
posted by MML, 4:20 AM | link | 0 comments |

Soft link

create a soft link
# ln -s /destination /source

remove soft link
# unlink /soft/link/file
posted by MML, 4:18 AM | link | 0 comments |

Fiber channel (FC) operation

check connected FC ports
# luxadm -e port
posted by MML, 4:17 AM | link | 0 comments |

Check 64 bit on Solaris

# isainfo -vk
posted by MML, 4:16 AM | link | 0 comments |

Unix printing services

1. Below are some example of using some printer command, assuming our printer name is dcp.

to print /etc/hosts files on dcp printer
# lp -d dcp /etc/hosts

check the print queue on all connected printer
# /usr/ucb/lpq
or
# lpstat
# lpstat –o all

check print queue on dcp printer
# /usr/ucb/lpq -P dcp

delete print queue on dcp printer (root password is required)
# /usr/ucb/lprm -P dcp

2. Printer configuration
printer configuration will be stored in /etc/printer.conf
# more /etc/printer.conf

all connected printer summary
# lpstat -s

check the dcp printer server (print server)
# lpstat -v dcp

changing printer server (root password is required)
# lpadmin -p dcp -s pethsv15\!dcp
lpadmin –p -s \!
posted by MML, 4:15 AM | link | 0 comments |

Packages / Pacthes

1. To check installed patch
# showrev -p
# showrev –p | grep

2. To check packages info
# pkginfo -l VRTSvxvm
posted by MML, 4:14 AM | link | 0 comments |

NFS Sharing resources from the server

1. Make sure the share resources is configure in /etc/df/dfstab
# vi /etc/df/dfstab

Edit the files to include the share point of the resources.
Example you are sharing /cdrom/dvd1, the file in /etc/df/dfstab should include

share -F nfs /cdrom/dvd1

Affter editing the file run this command.
# shareall

2. At the remote machine that is accessing the share resources …
To list all the share resources from main server
# dfshares

or alternatively, to show all shared mount point from NFS server
# showmount -e

Mount the share resources
# mount :/cdrom/dvd1 /mount/point/location

example
# mount taufikserver:/cdrom/dvd1 /mnt

3. To unmount dfshare
note: only apply if you could not unmount it.
# /etc/init.d/nfs.server stop
# umount /nfs/share

4. Mount nfs on vfstab
This example take from http://www.scit.wlv.ac.uk/cgi-bin/mansec?4+vfstab
The following are vfstab entries for various file system types supported in the Solaris operating environment.

Example 1: NFS and UFS Mounts
The following entry invokes NFS to automatically mount the directory /usr/local of the server example1 on the client's /usr/local directory with read-only permission:

example1:/usr/local - /usr/local nfs - yes ro

The following example assumes a small departmental mail setup, in which clients mount /var/mail from a server mailsvr. The following entry would be listed in each client's vfstab:

mailsvr:/var/mail - /var/mail nfs - yes intr,bg
posted by MML, 4:01 AM | link | 0 comments |

Enable tftp services on Solaris10

Make changes active and enabled
# inetconv
# inetadm -e svc:/network/tftp/udp6

check the tftp services
# svcs | grep tftp

disable tftp
# inetadm -d svc:/network/tftp/udp6
posted by MML, 3:59 AM | link | 0 comments |

Configuring ntpdate

1. configure /etc/inet/ntp.conf
# vi /etc/inet/ntp.conf

add the ntp server IP address in the file (ntp.conf file will only contain IP addres)

2. to sync the time base on the ntp server specified
# ntpdate
# ntpdate 111.11.1.11
posted by MML, 3:58 AM | link | 0 comments |

Enable large file

Option 1
# vi /etc/vfstab (edit the last column)
# reboot

Option 2
# umount /finance
# /usr/lib/fs/vxfs/fsadm -o largefiles /dev/vx/rdsk/diskdg/finance
# mount finance

Option 3 (on the fly update)
# /usr/lib/fs/vxfs/fsadm -o largefiles /finance
posted by MML, 3:52 AM | link | 0 comments |

tar Command

tar a file and then copy it / untar in a new folder
# cd /source/directory
# tar cf - . |(cd /destination/dir; tar xvfBp -)

tar command with exclude
# tar cvf /apache.tar --exclude=/var/apache/htdocs/docu/patch/*.zip \
> --exclude=/var/apache/htdocs/docu/iplanet/*.gz /var/apache/htdocs/docu

# tar cvf /os.tar --exclude=/var --exclude=/usr --exclude=sys / Note: not working to backup OS
posted by MML, 3:45 AM | link | 0 comments |

The history of UNIX

Sunday, December 2, 2007

The idea of developing UNIX was born from AT&T's Bell Laboratories in the early 1970's, the success of the UNIX operating system has led to many different versions. Until today, we have numbers of UNIX varieties and versions, like HP-UX, Solaris, Redhat, Suse not forgotten CENTOS, Fedora and others.

For more interesting UNIX history fact ... http://www.computerhope.com/history/unix.htm.  Its interesting, the fact shown that Linus Torvalds was actually born on the same year UNIX was being developed.
posted by MML, 5:39 AM | link | 0 comments |