>
Well, maybe your sweetheart isn't really that interested in a book about Solaris internals. And it's probably not a good idea to pull a Homer Simpson and give it to someone who doesn't want it, just so you can use it. But one book that should be on every system administrator's wish list is Solaris Internals: Core Kernel Architecture, by Jim Mauro and Richard McDougall.
This book's predecessors are works like Unix Internals (Vahalia), The Design and Implementation of 4.3BSD Unix Operating System (Lefler et al.), and Lion's Commentary on Unix 6th Edition (Lions). While those books are interesting (to some) and educational, they lack the utility and applicability of Solaris Internals.
In many ways, Solaris Internals is the best of both worlds. It includes illuminating details of the inner workings of Solaris (through Solaris 7), as well as useful information for systems administrators running Solaris machines. It could also be a good resource for students of operating systems, and developers using Solaris.
The book covers the expected topics, including kernel services, synchronization, bootstrap, memory, threads, processes, interprocess communication, files, and filesystems. It has appendices that cover kernel tunables, switches and limits, the kernel virtual address map, and an example of the procfs utility.
Those topics are all discussed in extraordinary detail. For example, the coverage of memory includes a description of virtual memory, virtual-to-physical translation, how the kernel implements VM, hardware address translation (HAT), virtual address spaces (both SPARC and Intel), heap size information for each OS release, stack structure, Solaris 7 address space system functions, page faults, memory segments, memory mapped files, shared mapped files, anonymous memory, swap space implementation, virtual memory watchpoints, global page management, the page scanner, kernel memory, and a whole section on memory monitoring tools!
Want to know the data structure behind caches, or how the kernel allocates memory? It's in there. Kernel queuing? It's there. How threads are implemented? Semaphore types and implementation? Kernel trap handling? UFS structures and how UFS logging is implemented? It's all there.
Like any book, Solaris Internals has a few shortcomings. The layout is odd: most pages have a uniform text size, but on some pages the text terminates early, and on others the text drops dangerously toward the bottom of the page.
Some topics were purposely omitted from the book, including low-level I/O (device drivers, STREAMS, and networking). It would have been nice to include the topic, but the authors do provide adequate references for that information.
I also found one topic that I presume was accidentally excluded: access control lists (ACLs) and their implementation. The swap algorithms are covered explicitly, but one detail I really wanted was missing: how space is allocated when there are multiple swap spaces on a system. I was surprised when I noticed that noexec_user_stack wasn't listed in the index; fortunately, it's covered in the text and appendix. The book has an associated Website, which will offer updated information and errata as it becomes available.
Minor complaints aside, Solaris Internals is a magnum opus, full of useful (and not-so-useful!) information. While we enjoy the current edition, we can also look forward to the second edition (a year or so from now), which will encompass Solaris 8 and more.
In the interest of full disclosure, note that Jim Mauro writes a column here at Unix Insider, and that I know both Mauro and McDougall. However, even if I didn't like them, I would still rave about this book. I highly recommend it.
Unix System Administration Handbook, 3rd Edition
Unix System Administration Handbook, 3rd Edition, by Evi Nemeth, Garth Snyder, Scott Seebass, and Trent Hein, is the latest revision of the best-selling, general-purpose Unix systems administration book. The Handbook is generally considered a must-have for a good systems administrator.
Unix System Administration Handbook tries to be all things to all (sysadmin) people. It discusses many systems administration topics, and covers Solaris, Red Hat Linux, HP-UX, and FreeBSD. Unfortunately, including all the important information for all those operating systems is impossible. Keeping the page count reasonable (it's over 800 pages), while providing detailed coverage of every important systems administration topic and variation for those four operating systems, is a daunting task. Out of necessity, topics are left out or given short shrift.
The authors' task was to make the book useful and usable in spite of that, and they succeeded admirably. All of the basics of systems administration are covered: booting and shutdown, processes, filesystems, users, disks, backups, and networking. Each section includes general information about the topic, discussion, and details about each operating system. That approach is useful for someone who knows one operating system and is learning the others, or who has to manage a variety of systems.
Some of the more complex topics are also handled with aplomb. Email has its own chapters, and there is extensive information on configuring sendmail, including security and debugging. There's also information on imap and popper interfaces to email, and the sendmail alternative, postfix (but not qmail or smap).
DNS and NFS are covered too. The writing is strong in the discussion of useful and available tools, such as amd, sudo (a tool written by some of the book's authors), nmap, tripwire, and LPRng. All this information is welcome, and Nemeth et al. provide the best coverage of these general topics that I've seen. If I'm going to reach for one book while trying to track down information in these areas, it will be the Handbook.
Unfortunately, the Solaris information is scant and a little out of date. The Solaris EEPROM coverage totals one sentence. One would not expect a discussion of advanced topics such as setting SCSI initiator IDs, but it would have been nice to have information about getting a system with 4-MB cache CPUs to boot Solaris 2.6. The Handbook doesn't even cover the basics, such as setting the boot device or running diagnostics.
RAID storage is covered in a few paragraphs, with no coverage of Solstice DiskSuite (or the commercial Veritas Volume Manager). The Solaris 7 and 8 UFS logging option isn't mentioned either.
The kernel configuration and tuning information is spotty. There is extensive information on using ndd to set network variables, but no mention of noexec_user_stack or shared memory variable settings.
On the difficult topic of serial device management, there's one half-page of discussion and one example. This amount of coverage is not useful to someone trying to add or modify serial port services. The section ends with this helpful advice: read the manual pages and "have fun." Very disappointing.
Although I'm not as knowledgeable about other operating systems, I scanned the coverage of Linux to get a feel for its utility. Again, the basic information seemed fine, but the more advanced information was lacking. For example, I was challenged by IPchains when configuring a Red Hat 6.2 system, so I referenced the Handbook's implementation details. They're described in two pages; I don't think the information would teach someone to configure IPchains.
The security section discusses some of the challenges of securing a system, and provides good advice. Several details (which can be found in the Solaris Security FAQ) are not covered, though. These include the hazards of the default ftp settings, EEPROM settings, the use of fix_modes, and many others.
Beginning administrators will get the most out of the book, and experienced administrators will find some useful information. Administrators with several years of experience on one operating system will find little new information, but may find the information on other operating systems helpful. In spite of the strain of trying to cover systems administration for four variations, it's still the best general-purpose Unix sysadmin book available, and it holds a prominent place on my bookshelf.
Neither book is inexpensive, even on Amazon.com, but both are the best of their kind and are good investments. Whether you need one or both depends on your interest in systems administration. If you want to keep your systems running and put out fires, get the Nemeth book. If you want to move to the next level and understand how and why things work, the Mauro and McDougall book is a must-have.