Solaris Crash Course
There’s an exciting crash course being done by the WaKute group next week in Iringa/Kleruu TC. While I was invited to attend, unfortunately due to travel restrictions because of the upcoming elections, I am unable to go. I wonder what they’ll cover, and how in-depth they plan on going. Past courses were only conducted at a very introductory level, and did not include any actual sys admin-ing lessons.
These are the notes I submitted to the WaKute group, in the hopes that they’ll have someone competent enough to facilitate the session in my absence. Otherwise, it’ll at least make for a useful handout.
Solaris CLI Admin Commands:
I’m going to assume you already have passing familiarity with using
the command line as well as Unix namespaces and how to access log files. By passing familiarity,
I mean that you know the following:
vi, cd, rm, cp, mv, mkdir, cat, pipes, ln, root, grep, cntrl+c,
&, ls, mount, umount, bash, crontab, touch, chown, chgrp, uname,
sudo, diff, chown, chmod, lp, tar, gzip, pwd, passwd, ff, whoami,
finger, ps, du, df, kill, ssh, date, cal, lp, less, cat, fsck
Finally, these are in no way a comprehensive list of commands, nor are they fully explained. Simply put, they’re the ones that I find myself using most often/on a regular basis for various tasks. Some of these things can also be done via the web interface, but at times that interface is down and the command line must be used.
utwall : lets you announce a message to a designated thin client
This is useful if you want to give users an opportunity
to save their work before a known power outage, server
restart, or just prior to closing the lab for the night.
Requires superuser privileges.
Operands:
-t message text
-v verbose mode
-r # repeats the message # of times (optional)
-d pop up a window with the message text on each window
Recipients:
ALL all thin client users get the window with message
user specified user gets the window with message
:dis specified display gets the window with message
Example:
This command pops a window up on all sessions stating
“Servers will reboot in 5 minutes. Save your work.”
# /opt/SUNWut/sbin/utwall -d -t “Servers will reboot in
5 minutes. Save your work.” ALL
utsession: List and manage user sessions. Session states are as
follows: D = Disconnected, I = Idling, S = Suspended.
Operands:
-p shows all user sessions, including disconnected ones,
on current server
-h shows the man page
-k kills the specified session, use with -d, -u, or -n
-s Z suspends the sessions matching criteria Z, use with -d,
-u, or -n
-d # denotes the user’s thin client at display #
-a lets you kill all of a user’s session, used for when he’s
logged in at multiple terminals
-n X denotes the user’s session with user name X
-u Y denotes the user’s session with unix login Y
Example:
This command terminates a registered Sun Ray user’s (John’s)
session.
# utsession -k -n “John”
utpw : changes the utadmin password; works just like the passwd
command on unix/linux. You will need to run this on all
servers if you have failover set up, as the passwords
must match…
sync : syncs the hard drives. Use this in the following way:
# sync;
# sync sync;
poweroff: turns off Solaris via command line. Especially useful when
working on a server via ssh or otherwise cannot access the
GUI.
utsvc X Y: allows you to perform action Y on Solaris service X
Y is usually “start”,”stop”, or “restart”
utadm : manages DHCP settings on the server by setting up interfaces.
Interface names can be found in the /etc/hosts file.
Operands:
-l Lists the current subnet configuration
-p Lists the current interconnect configuration
-d X Deletes settings for interface X
-a Y Configures settings for interface Y
-f Takes the current online server offline
-n Takes the current offline server and puts it online
-r Unconfigures all interfaces. Use with care.
-L on Turns on lan connections for the subnet
See the Solaris Jumpstart Installation Guide for examples on how utadm
is used.
prstat : Lets you look at the CPU resources on server. Similar to top
in Linux. The more CPU being used, the more likely thin
clients are slow to respond.
vmstat 1: Lets you look at the RAM resources on server. If free RAM
is slow, then that’s why the thin clients are sluggish.
If page column is big, that’s another sign free RAM is
low.
utcapture: shows network traffic. If the total loss column is rising, then
there is a problem with the network settings. Check them with:
# dmesg | grep X
where X is the name of the interface.
Pressing the 3 audio keys on a Sun keyboard will give you the link
speed followed by H or F. Properly configured, it should read 100F.
Use “ping” without fragmentation to try to figure out where the
problem is within the network, and to determine optimal packet size.
Anyway, I think J4 is going to represent Mpwapwa TC, and hopefully he’ll take down some detailed notes. This type of work is what I’d ideally be doing if I do manage to figure out how the extension thing works, and it’d be good to know the technical competency levels of people involved.