Recommended Patchset for Solaris 10 – January 2016

Those of you still on Solaris 10 may want to download the latest Recommended Patchset for Solaris 10 which was published just last week, on 28th of January 2016.

There’s only four such patchsets a year and this is quite handy for rolling baselines when you plan to patch all of your Solaris 10 servers in a particular quarter.

While this patchset does not incluse ALL of the available security patches, it contains most critical ones to date.

From the README:

The Recommended OS Patchset Solaris 10 SPARC provides the minimum set of patches needed to address security and Sun Alert issues, and selected issues identified by Oracle Proactive Services and the Oracle Technical Support Center, for the Solaris 10 Operating System for sparc. The patches contained in this patchset are considered the most important and highly recommended patches for Solaris 10.

How To: Confirm Link Speed for a Network Interface

Here’s a one liner that is really useful when you need to quickly confirm the link speed for network interfaces on your system.

The beauty of this command is that you can run it as a regular user:

bash-3.00$ kstat -p | grep link_speed
 e1000g:0:Port Stats:link_speed 1000
 e1000g:1:Port Stats:link_speed 1000

Using nohup for existing processes

Most of you are probably aware with the fact that by default any processes you may have running within your session will be killed once you terminate the session. The most common example is logging onto a remote server via SSH, starting some command and then closing the terminal session.

As you know, this happens because when your’e terminating your shell it ends up sending the SIGHUP signal to all the child processes, notifying them about the end of the session and therefore instructing them to wrap up whatever it was they were doing and to terminate.

Many are also aware of the wonderful nohup command which adds flexibility to start any command in a mode where it will ignore the SIGHUP and therefore stay running (and writing output to log files, for example) even after your terminal session completes.

Basic usage of the nohup command

Here’s how you should use it:

$ nohup ./ &
Sending output to nohup.out
[1] 3763

What this does is put your script into background while making it ignore SIGHUP signals in the past. The background element is not necessary but very common because if you expect something to be running for hours/days – you probably don’t want to be watching it in your terminal anyway. So you put the task into background.

The [1] indicates that this is the first (and only) job you’re running in background so far. The 3763 is the process ID (PID) of the script.

Output redirection into nohup.out

nohup command redirects all the standard input into nohup.out file so if you’re interested in your script’s output you can still keep an eye on it this way:

tail -f nohup.out

nohup for an existing process

In recent versions of Solaris 10 the nohup command has seen a really welcomed addition: it now allows you to make any process (within your privileges of course) ignore SIGHUP signal. This is really convenient because if you started some script in the morning and by late afternoon it’s obvious that it won’t finish by the time you should be heading home – you can now simply use nohup command to update the process and allow it to finish even when you log out.

Another reason it’s so convenient is because prior to this feature the scenario described above would leave you no option but to keep your session open. If you couldn’t (for example you must disconnect your laptop every evening) – you had to stop the script and restart next morning (with nohup this time).

Here’s how you update an existing process:

-bash-4.1# nohup -p 3468
Sending output to nohup.out

or get a message suggesting you must elevate your privileges before you can do it:

greys@solaris:~$ nohup -p 3468
nohup: cannot examine 3468: permission denied

prstat – a great tool for process monitoring

Solaris administrators with solid Linux experience are usually installing top on their systems because of convenience. Quite a few administrators are aware of prstat but don't see benefits of using its format which somewhat differs from top. And a really small number of Solaris sysadmins really know how to use the prstat command properly. I consider myself a power user, so won't even be claiming to be a prstat guru, but these command examples will hopefully teach you a thing or two.


prstat advantages at glance

I really like prstat because it gives me access to the following information:

  • microstate accounting with LOTS of CPU info
  • CPU usage stats across global and non-global zones
  • provide reports (multiple screens of stats taken at specific intervals) forwarded to a file
  • do really useful summaries about top users consuming your OS resources

Welcome to 2012!

Hi all, happy New Year!

Just thought I’ll take a few minutes to welcome you to the new year and to thank you once again for staying with the Solaris Blog for so long!

My plans for this blog are quite humble in the view of Solaris not being a primary Unix-like OS at work anymore, but I’m still quite curious about a few things and would gladly share knowledge and answer your questions to my best ability.

So far, the following topics appear to be most useful:

  • Anything to do with SSH (stay tuned and take a minute to become RSS reader of my Unix Tutorial blog – I plan on releasing an SSH eBook later this year which many of you will find useful) – yes, it will cover passwordless SSH and will have some of the best X11 forwarding recipes
  • DTrace tips – still my favorite from Solaris 10 times, DTrace is truly amazing. I’m both surprised and glad that it made its way into many other operating systems. If anything, I’ll be sharing occasional tips on DTrace in Mac OSX. I will assume you’ve all seen Brendan Gregg’s excellent DTrace Tools kit!
  • ZFS – this proved to be so useful and revolutionary at the time that ZFS can now be found in a number of appliances and OS distros for NAS storage management (hello ZFS Build, Nexenta and Zena Box!)

I plan to expand sections of the blog covering these topics, but will gladly add anything you may find useful enough to flag in the comments section.

I’m really looking forward to 2012, and hope there will be more than one occasion when you will find my tips useful and readily applicable. Talk soon!


Oracle Sends a Strong Message about Sun Microsystems

Really glad to see the address Larry Ellison gave to all the Sun customers on the Oracle website:

  • more money to develop SPARC
  • more money to develop Solaris
  • dramatic improvement in Sun’s hardware performance through tight integration with Oracle software

I’ve seen many comments from existing Sun employees and the message above is seen as both strong and very positive. Hope this brings Sun Microsystems better days, it’s a great company with amazing people.

Share your Solaris OS experience and win a prize!

Just got an email from the Frontline Systems representative about a competition they’re running at the moment.

[Read more…]

Changing hostname in Solaris

I had to change the host name in one of Solaris zones today, and just out of curiousity looked into /etc/init.d/network script. That’s how I learned a new (to me) option of the uname command, which seems to be specific to Solaris: uname -S <newhostname>.

So here’s a very simple procedure for updating the hostname of your Solaris 10 server.

[Read more…]

Solaris 10 patch return codes

Now that some of the systems I have to regularly patch are Solaris 10 ones, I have to get used to the new patch return codes which one can see when applying one of the Sun’s recommended patchsets. It’s similar to the Solaris 8/9 patchset installation codes, but there are more codes added to the list.

[Read more…]