fintanr's weblog

Archives

« June 2005 »
MonTueWedThuFriSatSun
  
1
2
3
4
5
6
7
8
9
10
11
12
13
17
18
19
20
21
22
24
25
26
28
29
30
   
       
Today

the links




Twitter Updates

    follow me on Twitter
















    20050627 Monday June 27, 2005

    mdb ::eval
    I added this as a comment to Erics MDB Puzzle last Friday. A question appeared in the comments asking what exactly ::eval did. The question posed was "Print out the current working directory of every process with an effective user id of 0.". And the the solution given by Eric was

    > ::walk proc p | ::print proc_t p_cred->cr_uid | ::grep .==0 | ::eval <p=K | ::print proc_t p_user.u_cdir->v_path
    
    Now the actual question was what does the ::eval dcmd do. To use the full defination from the mdb docs evaluates and then runs the command that you give it, so in the case of the examples the eval segment is pulling out a pointer (the K tells it to get a uintptr_t) to the proc structure that you are interested in which you then just print out the values from.

    As an example, if you just run the command sequence above as far as the eval you get something like

    > ::walk proc p | ::print proc_t p_cred->cr_uid | ::grep .==0 | ::eval <p=K
                    fffffffffbc20a80
                    ffffffff8111f8f8
                    ffffffff81120520
                    ffffffff81121148
                    ffffffff84444c88
                    ffffffff835074b8
    >
    Which are your pointers back to the relevant proc_t structures.
    Technorati Tag(s) :

    (2005-06-27 03:19:53.0) Permalink Comments [1]

    20050623 Thursday June 23, 2005

    Moving x64 and x86 rigs between Solaris 10, Nevada and Solaris 9
    As mentioned before we make pretty heavy use of our benchmarking rigs, with multiple versions of Solaris, and Linux when applicable, being installed on them, and to do this we use Jumpstart extensively. Anyway a gotcha that occurs on x64 and x86 rigs is with partition id's when moving between Nevada, Solaris 9 and Solaris 10, which changed towards the end of the Solaris 10 time frame with the putback for 4410647.

    This change resulted in the partition id for Solaris 10 partions moving from 0x82 (viewed as swap by Linux) to 0xbf. Now Solaris 10 handled the move quite gracefully, and all of your jumpstarts to upgrade machines will just work, but moving back to Solaris 9 is not quite as simple. Initially we had a Jumpstart begin script hack in place (not elegant and it involved a mixture of prtvtoc and fdisk with -W and -F options, belive me you don't want to go there), but there is a much cleaner solution pointed out to us by Lawrence Lee in a bug discussion.

    Now first off a rather large caveat, this will destroy all partitions on your disk, so be carefull. Lets stay we have a machine with an internal scsi disk, c0t0d0 which contains a couple of paritions layed out using the following jumpstart profile

    install_type    initial_install
    system_type     standalone
    partitioning    explicit
    cluster         SUNWCXall
    filesys         c0t0d0s0 4096 /
    filesys         c0t0d0s1 1024 swap
    filesys         c0t0d0s7 free /export/scratch
    
    All we need to do is to use the fdisk keyword in our profile, in our case just telling the machine to nuke every partition and start again, so we add in the following like
    fdisk c0t0d0 solaris all
    
    above the filesys section, ending up with a profile such as
    install_type    initial_install
    system_type     standalone
    partitioning    explicit
    cluster         SUNWCXall
    fdisk           c0t0d0 solaris all
    filesys         c0t0d0s0 4096 /
    filesys         c0t0d0s1 1024 swap
    filesys         c0t0d0s7 free /export/scratch
    
    There are a host of other combinations, but if your not interested in actually keeping data on a benchmark or test rig the above should be suffice. You can read more details about fdisk, and other keywords in the keywords section of the Solaris 10 Installation Guide: Custom JumpStart and Advanced Installations.
    Technorati Tag

    Technorati Tag

    (2005-06-23 03:48:01.0) Permalink Comments [2]

    20050616 Thursday June 16, 2005

    Irish OpenSolaris Users Group
    ... and the Irish join the fray..... introducing the Irish OpenSolaris Users Group - iosug. You can sign up over on Yahoo Groups or send a mail to iosug-subscribe@yahoogroups.com.

    No meetings planned as of yet, but give us a few week (hey its sunny in Dublin this evening, so lets grab that while we can ;) ).
    (2005-06-16 09:34:56.0) Permalink Comments [2]

    20050615 Wednesday June 15, 2005

    Unix03 Certification For Solaris 10
    Rather understandably this got missed by a lot of people with the launch of OpenSolaris, but Solaris 10 was certified by Open Group as Unix 03 compliant yesterday. The only other listed compliant OS is AIX, and only on one architecture, whereas Solaris 10 is certified on sparc, amd64 and x86.
    (2005-06-15 05:57:35.0) Permalink Comments [0]

    20050614 Tuesday June 14, 2005

    OpenSolaris is Live....
    opensolaris.org is live. Keep an eye out for the posts from the various kernel folks on bsc today.
    (2005-06-14 07:59:27.0) Permalink Comments [0]