Introduction
Most readers coming here are more familiar with Linux than Solaris. This little page is designed to give those users some tips for running a Solaris box.
It is in no way intended as a definitive guide, and there may be lot better ways of doing things. Feel free to contribute.
ps
ps -ef on Linux will give the full command line, but with Solaris you don't get it all.
This is particularly critical when looking at java processes.
Fortunately Solaris retains the BSD style binaries in /usr/ucb, so execute:
/usr/ucb/ps wwaux|grep java
instead
bash
/bin/sh on Solaris is a POSIX complaint bourne shell. If you have written bash-centric scripts, replace #!/bin/sh with #!/bin/bash
NFS
Starting of NFS daemon
Instead of
# service nfsserver start
one does:
# svcadm enable network/nfs/server
Exports
Instead of the file /etc/exports, under Solaris the file /etc/dfs/dfstab needs to be edited.
Sharing with zfs
Nowadays, you would probably use zfs sharenfs eg:
# zfs set sharenfs=on zpool/sharedfolder
# zfs sharenfs=rw=server.fqdn.ch,rw=otherserver.fqdn.ch zpool/sharedfolder
An attempt at a matrix
| Linux command | Solaris similar command | Comments |
|---|---|---|
| top | prstat | You can compile top on Solaris, but you can't rely on it's accuracy |
| free | vmstat | |
| cat /proc/meminfo | prtconf | grep Memory | |
| cat /proc/cpuinfo | psrinfo -v | you can also use prtconf |
| netstat -p | lsof -i | lsof is not a default command. You need the package |
| uname -a | isainfo -b | to determine how many bits your os is |
| java -d64 | java -d64 | Start java with a default of 64 bit. Linux seems to do this by default though. |
| cat /etc/redhat-release | cat /etc/release | |
| sysdef | sysdef holds a lot of system info including kernel tunables | |
| lsmod | modinfo | |
| strace | truss |
Nessun commento:
Posta un commento