More Sun ok> Prompt Commands

Topicsun
Courtesy of a Sun v120.

Use the following to determine the mac addresses of each interface
ok>devalias

The command above returns the following
rootdisk                 /pci@1f,0/pci@1/scsi@8/disk@0,0
lom                      /pci@1f,0/pci@1,1/ebus@c/SUNW,lomh@14,200000
dload                    /pci@1f,0/pci@1,1/network@c,1:,
net2                     /pci@1f,0/pci@1,1/network@5,1
net                      /pci@1f,0/pci@1,1/network@c,1
{truncate}

Then you can cd to the path for either net or net2 and run the following command
ok> .properties

This command returns the following for mac address
local-mac-address        00 03 ba 96 38 c0

In this case I was working to troubleshoot a jumpstart install, so I needed to see what mac address was being presented externally.

ok>printenv

printenv reveals that local mac address is set to true which means that each network interface presents it own mac. Being that I was plugged into nic 0 on this box i am also able to boot like so.

ok boot /pci@1f,0/pci@1,1/network@c,1:dhcp – install

Being specific in this way, I am taking any way chance that I have the mac address incorrect, or am plugged into the correct ethernet port.

I can verify which port has my link by doing the following from the ok prompt

ok watch-net
Internal loopback test — succeeded.
Link is  — up
Looking for Ethernet Packets.
‘.’ is a Good Packet.  ‘X’ is a Bad Packet.
Type any key to stop.
…………

If I try this on net2 is see that this link is down

ok watch-net2
Internal loopback test — succeeded.
Link is  — down

Comments

8 responses to “More Sun ok> Prompt Commands”

  1. Shiva Avatar
    Shiva

    I did understand ur answer can you please give me a brief disription about my question

  2. Christopher Paquin Avatar

    What is your question. I do not see one

  3. ashok Avatar

    hi sir

  4. RAMESH Avatar
    RAMESH

    hi ,how will find out howmany CPUs in server.can anybody tell me how can see from the OK prompt.

  5. prabu Avatar
    prabu

    From OK prompt run .speed will show you the CPU and PCI bus speeds
    example:
    .speed

  6. ZeeUSA Avatar
    ZeeUSA

    Hi every one I am new to Solaris I want to know hwo, how i know my machine has hme0 or eri0 or any other adopter name? at ok prompt…. for the perpuse of jump start boot entry in boot serversysidcfg file.

  7. Christopher Paquin Avatar

    Try this:
    >show devs
    This will give you output like this for your network interfaces.
    >/pci@8,700000/pci@2/SUNW,hme@0,1
    In the case above you would have and hme interfacce

  8. Bravo Avatar
    Bravo

    Hi Guys,
    Can we disable CPU from ok prompt in solaris ?

Leave a Reply

Discover more from Chris Paquin

Subscribe now to keep reading and get access to the full archive.

Continue reading