Solaris Cheat Sheet: Smit
Solaris Cheat Sheet: Smit
Solaris Cheat Sheet: Smit
Smit:
There is no tool like smit in Solaris, server management is handled through manually
editing config files.
/tmp:
/tmp is volatile in Solaris, it uses virtual memory, if it fills the server freezes. Files in this
directory are deleted at reboot
Restart Server:
# init 6
Shutdown Server:
# init 5
Check filesystems:
# df -h
(this find command works on Solaris, Linux and AIX. Just change the fstype)
Log files:
/var/adm/messages There is no function similar to errpt in Solaris you
/var/log/syslog have to search the logs (grep -i error /var/adm/messages)
Solaris Cheat Sheet
Filesystems file:
/etc/vfstab (similar to /etc/filesystem in AIX)
Create user:
The user home directory varies on some systems (it is in different locations on servers
built by vendors) always check /etc/passwd to see where home directories are located
before building user.
UID=10126
Primary group= webdev
Secondary groups = jms and cds
Homedir= /usr/home/pstrader (-m switch automatically creates home dir)
Shell = /usr/bin/bash
Comment=User's Name
Note: if you don't give the ID a password the user cannot log in.
Crontab commands:
# crontab -e
# crontab -l
Crontab Syntax:
minute (0-59) hour (0-23) day of the month (1-31) month of the year (1-12), day of the
week (0-6 with 0=Sunday) Command
Always make the mount is soft or your server won't come up is the mount is unavailable.
Then type:
# shareall
Volume/Disk Management:
Historically, Solaris didn't have a good native volume management system. There is a
new product, ZFS, that has fixed this, but none of our servers are currently running this
since it is rather new.
The previous product that Solaris shipped is called Solaris Volume Manager (formerly
called Solstice Disk Suite). Generally, I use Solaris volume manager to mirror or
concatenate disks into large volumes, and little else.
If there is no volume management installed you are reliant on doing the old fashion
partition your disk, create filesystems on the partitions, and mount the filesystems.
You can tell which type to volume management there is on the server (or lack of volume
management) by looking at the mounted devices.
FSCK:
Make sure to do the raw device and fsck multiple times until no errors reported
fsck -Y /dev/rdsk/c1t0d0s3
fsck -Y /dev/vx/rdsk/bootdg/var
fsck -Y /dev/md/rdsk/d3
FSCK vxfs filesystem type (Veritas proprietary filesystem (non-root vols) on HSM:
Swap space:
List swap space:
# swap -l
You will need to add this to /etc/vfstab to make it persistent (remember this is a tab
delimited file)
# vi /etc/vfstab
Solaris Cheat Sheet