Chris Quenelle is a tools developer at Oracle Corp. He's worked on performance and debugging tools at Sun and Oracle for over 15 years. He reads comic books and science fiction,and has more tivos than he can keep track of. | I’ve been supporting our department wiki for many years now. The most used feature is basic rich text,as you would expect,but the next most popular feature is tables. Over time,I’ve identified a particular kind of collaborative function that people engage in when they are coordinating activities. I don’t have a good name for activity,but I’ll call it “table based collaboration”. In some corporate cultures this is till done by sending giant Excel spreadsheets around as email attachments. This is the main option available when collab services (like wikis) are not available or practical for all the participants. In this model,the owner of the process owns the spreadsheet makes the updates based on email received from the participants. A more collaborative approach uses any form of wiki to create tables on wiki pages. Depending on the data,it’s also possible to use a bulleted list format instead of a table,but the data itself and collaboration process is the same. There’s a big jump in ease of use if the wiki supports rich text table editing. I’ve tried about a half-dozen different wiki implementations of tables,and none of the rich text table editors are worth using in a produciton environment. As soon as you do any kind of formatting,the entire table converts from wiki-syntax to raw html. And after that point,the first formatting bug (that can’t be fixed by the rich text editor) becomes impossible to correct by direct-editing. The lack of decent rich text table editing means that you need to stick with the wiki-syntax for tables,and edit them by hand. This is workable,but forces the participants to have passable fluency in the wiki syntax and whatever foibles it has. Another way of enacting table based collaboration is to use an actual database with a simple web interface. We have several examples of this in my organization. It’s generally implemented using an off-the-shelf database of some kind. By definition,the table never needs to be joined with anything,and there’s only a single table. If your “table based collaboration”sprouts any extra tables,then it turns into a “department web application”and it falls outside the realm of this discussion. There are an endless supply of web application frameworks which have an simple process for creating a simple web app. But the process of creating it still requires the owner of the process to learn the framework and generate the web app. It also requires someone to set up and maintain the web application itself. These solutions are not suitable for having a non-web-technical person set up a new table. If you look at each of these mechanisms,each one has pros and cons. Factors to look at are:1) Does it require centralized infrastructure? 2) What are the platform/tool requirements placed on the participants? The leader? In the final analysis,I think something like a Google Docs spreadsheet provides a sweet spot of accessibility,formating and overhead. Unfortunately,it’s not appropriate for a department-level solution. Using Google Apps for proprietary company data needs to be approved as a company-wide policy,you can’t just download it and start using it. Approving it for use for company business is appropriate for some companies,and not for others. What I’ve been looking for is a web-application that allows end users to define a set of columns using basic types (string,date,enumeration,etc) and provides a simple spreadsheet-like interface for adding/removing/modifying data. I’ve been so frustrated recently that I’ve been thinking about recommending that people go back to mailing around OpenOffice spreadsheets. Some general purpose wikis get by with less-than-ideal behavior when two people make updates at the same time. So,in some cases the collaborative aspect of the solution (like wiki tables) costs more in synchronization headaches than what it would cost to have one person do all the updates. If you’re confused by the changes to network configuration in Solaris 11 (and who isn’t?) then this is a good place to start. http://docs.oracle.com/cd/E23824_01/html/E24456/network-1.html The online reading interface seems to be responsive and well formatted,so I read the first few pages in my browser. It does a good job of giving you an overview at the start so you can understand the way the new commands and modes fit together. I work in an environment that has user home directories shared over NFS. I always thought that kind of made the normal shell history mechanism fall on it’s face. None of the shells I’ve seen will actually do the hard work of synchronizing the shell history file to collect data from multiple different hosts in one file. It even falls apart when you have multiple term windows open on one machine. Many years ago I realized I didn’t want my shells writing frequently to my home directory over NFS,so I relocated my history file to /tmp. This means I’ll get history restored when I log into the same machine (until it gets rebooted) but it’s put luck which session on the same machine saved it’s history last. Bash is my normal shell these days,and it has a lot of features to tweak and manipulate the history,but none of the features seem to deal with the inherent sync issues. I suspect everyone uses history within their current shell session,and nobody much cares if it is saved or not. The reason I care is because I’m looking at using it as a platform to associate command history with logical projects. It’s an interesting idea,but I’m surprised the whole mechanism is so poorly adapted to modern environments. This post is intended as a “google aid”. Hopefully by giving this blog post a provocative title,I’ll get the right kind of people reading it. Specifically,people who are frustrated with NWAM. NWAM is a Solaris 11 feature,and it stands for “Network Auto-Magic.”I’ve had several run-ins with NWAM over the last year or two,and I finally got pointed at some documentation. I want to pass on the documentation,and I want to help to get this documentation higher in the google rankings when people search for NWAM. The manual you want to look is has the name:System Administration Guide:Network Interfaces and Network Virtualization. You can find it here (link). You can download it in PDF form if you want to,and go straight to the chapter on Network Auto-Magic. That should help you come up to speed on what it is. Hopefully I’ll have a chance to post more about my specific problems and solutions,I’m currently trying to get NIS set up to work correctly in client mode. Every major library or application I write seems to have a module named “util”these days. I think it represents a kind of “impedance mismatch”between the platform I’m using (C runtime,C++ runtime,python standard libraries) and the platform I *wish* I were using. Recently,I’ve been writing python code that runs lots of little UNIX utilities. You know,like:find,ls,chmod,etc,etc. It’s the kind of code that might also be written as a shell script,but python is much nicer when the program gets larger than about a page. If you’re running lots of utilities,you want a variety of ways to interact with them. Sometimes,you don’t want to send it any input,sometimes you do,sometimes you are expecting one line of output. Sometimes you’re expecting a list of lines. Sometimes you’re going to check the return code,sometimes you’re not. These functions are all just small wrappers around calls to the python subprocess module in python. But if you’re writing a lot of code that uses them,it’s important to make that code readable,so you want to streamline away most of the goop for dealing with the subprocess module. I have utility routines for creating temporary files and removing them all when the program exits. There are routines to keep me from adding a lot of obscure import statements to the top of most of my modules. Here’s some examples of what I’m using for now: def gethostname(): from socket import gethostname return gethostname()
def timestamp(): import datetime return str(datetime.datetime.today())
Here’s a recipe that I got from stackoverflow.com. I wanted the equivalent of “mkdir -p”,and you need a few lines to do that in python. def mkdir_p(dir): import errno try: os.makedirs(dir) except OSError,exc: if exc.errno == errno.EEXIST: pass else: raise
There’s also code to do things that I’m convinced must have a better answer in python,but I haven’t found it yet. So I isolate the hack to the until module. def is_executable(file): S_IEXEC = 00100 mode = os.stat(file).st_mode return mode &S_IEXEC
Moving code in and out of my util module also prevents me from worrying so much about obscure modularity issues. Any code I don’t want to worry about today goes into the util module. When I know where it belongs,I can easily move it later. Of course,that’s much easier to do with python than in a language that uses header files like C or C++. I just finished reading a great article on iterators by Andrei Alexandrescu. Mr. Alexandrescu is a contributor to the D programming language. In this paper,he discusses the background of iterator implementations including C++ STL iterators,and then goes on to outline a new model for iterators. It’s very readable,I recommend it. http://www.informit.com/articles/article.aspx?p=1407357 To get a more readable all-in-one page,click on the “print”link on the page above,or go here: http://www.informit.com/articles/printerfriendly.aspx?p=1407357 I just read a nice essay by science fiction author Charles Stross about EBooks. As usual,he presents a very lucid and entertaining look into the world of publishing. CMAP #9:Ebooks Okay,before I forget,I’m writing it all down. We have to test against all this stuff,and it’s becoming more and more convenient to use virtualization as a way to share lab resources,so I figured I’d go make sense of all the terminology that’s flying around. I understood 80% of it,but I could never understand all of it at once. A lot of this was extracted from Wikipedia. Here are the things that affect my life:Xen,VirtualBox,VMWare,LDOMs,Zones,Containers. Hypervisor:Software that emulates a hardware platform,so that Operating Systems can run on top of it,as if they had hardware to run on. OS Virtualization:When you have one OS (one kernel) running multiple user-spaces. Applications think they are on separate machines. There are two kinds of Hypervisors,some run directly on hardware (Type 1),and some run as applications (Type 2). With those terms defined,here is a description of the technologies,features,products that I listed at the top: - Hypervisors:
- Running on hardware –Type 1 Hypervisor
- Xen:Hypervisor that runs on hardware,supports x86 (aka Sun xVM)
- LDOMs:Hypervisor that runs on hardware,supports SPARC
- Running as an application –Type 2 Hypervisor
- VirtualBox:Hypervisor that runs as an application,supports x86
- VMWare:Hypervisor that runs as an application,supports x86
The terms “zone”and “container”seem to interchangeable. I have not found a source that is both clear and authoritative that can tell me the difference. Zones are capable of running different versions of Solaris inside one Global OS instance. There are lots of things I glossed over here,but my goal was keep it short and sweet. Trivia: - You can run a specific old version of Linux inside a Solaris zone.
- The VMWare company probably supports products on other chips than x86
- There are lots of differences between the features of Xen and LDOMs that I didn’t discuss
Recipes for supported packaging formatsSun Studio is available on three different packaging systems. Here are some examples that show you how to get information about the Sun Studio packages on each kind of system. - IPS packaging system –on OpenSolaris
- SYSV packages –on Solaris 10
- RPMs –on SuSE and RedHat Linux
If you want to know what version of a Studio component you’re using,the steps are shown below. The compiler or tool you’re interested in might be on your search path (you can find the location with “which cc”) or you might already know the full path. Once you have the full path,here are the things you might want to find out: - Find out the name of the package containing that binary.
- Dump out information about that package.
- Optionally look for other packages from the same Studio release,to see what else is installed.
Generally the multiple packages that make up Sun Studio will use a similar naming convention. In the currently available releases,these package names are cryptic. Sun Studio 12 update 1 installed on Solaris 10 What version is built into the binary? % /opt/sunstudio12.1/bin/cc -Vcc:Sun C 5.10 SunOS_sparc 2009/06/03usage:cc [ options] files. Use 'cc -flags' for details Which package is that binary in? % pkgchk -l -p '/opt/sunstudio12.1/bin/cc'NOTE:Couldn't lock the package database.Pathname:/opt/sunstudio12.1/bin/ccType:symbolic linkSource of link:../prod/bin/ccReferenced by the following packages:SPROccCurrent status:installed What other packages are installed? % pkginfo | grep SPROapplication SPROatd Sun Studio 12 update 1 Advanced Tools Development Moduleapplication SPROcc Sun Studio 12 update 1 C Compilerapplication SPROcmpl Sun Studio 12 update 1 C++ Complex Libraryapplication SPROcpl Sun Studio 12 update 1 C++ Compilerapplication SPROcplx Sun Studio 12 update 1 C++ 64-bit Libraries... Sun Studio 12 update 1 installed on OpenSolaris What version is built into the binary? % /opt/sunstudio12.1/bin/cc -Vcc:Sun C 5.10 SunOS_i386 2009/06/03usage:cc [ options] files. Use 'cc -flags' for details% /opt/sunstudio12.1/bin/cc -V Which package is that binary in? % pkg search -lp /opt/sunstudio12.1/bin/ccPACKAGE PUBLISHERpkg:/developer/sunstudio12u1@12.1.1-0.111 What other packages are installed? % pkg list | grep -i studiodeveloper/sunstudio12u1 12.1.1-0.111 installed ----- Sun Studio 12 update 1 installed on SuSE 11 Linux What version is built into the binary? % /opt/sun/sunstudio12.1/bin/cc -Vcc:Sun C 5.10 Linux_i386 2009/06/03usage:cc [ options] files. Use 'cc -flags' for details Which package is that binary in? % rpm -qf /opt/sun/sunstudio12.1/bin/ccsun-cc-12.1-1 What other packages are installed? % rpm -qa | grep sun- | headsun-lang-12.1-1sun-idext-12.1-1sun-mr3m-12.1-1sun-prfan-12.1-1sun-stl4h-12.1-1sun-cplx-12.1-1sun-dbxx-12.1-1sun-pls-12.1-1sun-dwrfs-12.1-1sun-rtmx-12.1-1... NotesThe excessively terse naming convention is because of the ancient restrictions in AT&T System V UNIX that limited package names to 9 characters. Sun also made an early decision to prefix packages names with 4 letters to mark the part of the company that was releasing the packages. In all fairness,Sun was trying to invent a scheme where outside software vendors could reasonably choose package names without accidentally conflicting with any of the Sun packages. That’s difficult to do in only 9 characters. On OpenSolaris,you can see that we merged everything into one package. Because the friendly new packaging system is one of the highlights of OpenSolaris,we didn’t want to confuse new users with the multitude of small packages we have for Sun Studio. Hopefully,this information will be useful in a variety of circumstances. Inside the Studio team,we need to go back and forth between all three packaging systems,and it’s not easy to remember the right system commands to work with the packages on a given system. In the support team,one of the first things they ask a customer is which version of the Sun Studio software they are running. It’s also possible to install subsets of Sun Studio,so you may want to know which tools are currently installed. Note:Studio will actually run fine on lots of different versions of Linux,including distributions that don’t use RPM as their native package format (like Ubuntu). The tarball downloads are useful for those Linux distributions. I use VNC connections as part of my regular daily routine,and I ran into another bug a few days ago,so I figured I’d post a summary of the current bugs that are currently afflicting me,and the workarounds for them. First is a really interesting bug where the less-than-sign turns into a greater-than-sign. Really. I’m not joking. The comma and period work fine,it’s just the less-than-sign. The public bugid for this is 14729. The workaround is to run xmodmap when you start your VNC session (I put it in ~/.vnc/xstartup). xmodmap -e 'keycode 94 = comma less' The second bug is that the server crashes whenever you turn OFF the capslock key. The public bug for this one is 14397. The workaround I found for that is the following: vncserver ... -RemapKeys 0xffe5->0x00 In other words,you try to disable the capslock key,and the result is a capslock key that works correctly. I have no idea what the implementation is doing. I’m using a Mac client these days as a desktop,so I’d be interested in hearing from anyone using windows VNC clients to see if they’ve hit these same bugs or not. Of course,I do live on the bleeding edge of OpenSolaris. The last few biweekly dev releases have been internal-only,but I think both of these bugs are in public OpenSolaris releases. | |