Monday, February 23, 2009

ps on Solaris -- zone tip

This is a mini-tip. I was running a ps command to see if snmp was running on a particular host and got back way too much information:

# ps -ef |grep snmp
root 938 1 1 Jan 17 ? 2906:56 /usr/local/sbin/snmpd -r
root 13536 1 0 Jan 25 ? 59:46 /usr/local/sbin/snmpd -r
root 2545 1 0 Jan 17 ? 19:32 /usr/local/sbin/snmpd -r
root 6050 26619 0 08:48:36 pts/2 0:00 grep snmp


At a glance I wanted to know what host the command was running on and it wasn't obvious, so I looked at the man page for the ps command and sure enough there was a new option that I didn't know about -- the "Z" option, which tells you which zone it's running on.

Very nice job SUN! Here's the new command:


# ps -efZ |grep snmp
global root 938 1 1 Jan 17 ? 2907:03 /usr/local/sbin/snmpd -r
host1 root 13536 1 0 Jan 25 ? 59:46 /usr/local/sbin/snmpd -r
host2 root 2545 1 0 Jan 17 ? 19:32 /usr/local/sbin/snmpd -r
global root 6189 26619 0 08:50:32 pts/2 0:00 grep snmp

Friday, February 20, 2009

Upgrading Solaris on hosts without a DVD or CDROM drive

http://docs.sun.com/app/docs/doc/817-5504/6mkv4nh96?a=view

This is the easiest way to upgrade hosts that don't have a local cdrom or DVD disk.

One thing to remember is that the two hosts need to be on a subnet that have no other tftpboot servers...