Insert a short description about yourself here, and possibly a small photo, or comment this line out.

Calendar

August 2006
M T W T F S S
« Jul   Oct »
 123456
78910111213
14151617181920
21222324252627
28293031  

August 2, 2006

crontab basics

Категория: Uncategorized, Solaris related — technotes @ 4:55 pm

Using cron basics
Unix Insider 8/25/00

Utility helps you get your timing right

Mo Budlong, Unix Insider
 
 
At one time cron was easy to describe: It involved only one or two files. All you had to do was edit the files and — voilà! — cron did the rest. Now cron has become several files and several programs, and at first glance it seems quite complex. Fortunately, someone was clever enough to create a simplified interface along with the new complexity.

Cron is really two separate programs. The cron daemon, usually called cron or crond, is a continually running program that is typically part of the booting-up process.

To check that it’s running on your system, use ps and grep to locate the process.

 

ps -ef|grep cron
root    387      1   0   Jun 29 ?     00:00:00 crond
root  32304  20607   0   00:18 pts/0  00:00:00 grep cron
In the example above, crond is running as process 387. Process 32304 is the grep cron command used to locate crond.

If cron does not appear to be running on your system, check with your system administrator, because a system without cron is unusual.

The crond process wakes up each minute to check a set of cron table files that list tasks and the times when those tasks are to be performed. If any programs need to be run, it runs them and then goes back to sleep. You don’t need to concern yourself with the mechanics of the cron daemon other than to know that it exists and that it is constantly polling the cron table files.

The cron table files vary from system to system but usually consist of the following:
Any files in /var/spool/cron or /var/spool/cron/crontabs. Those are individual files created by any user using the cron facility. Each file is given the name of the user. You will almost always find a root file in /var spool/cron/root. If the user account named jinx is using cron, you will also find a jinx file as /var/spool/cron/jinx.

 

ls -l /var/spool/cron
-rw——-   1  root    root          3768 Jul 14  23:54  root
-rw——-   1  root    group          207 Jul 15  22:18  jinx

 

A cron file that may be named /etc/crontab. That is the traditional name of the original cron table file.
Any files in the /etc/cron.d directory.

Each cron table file has different functions in the system. As a user, you will be editing or making entries into the /var/spool/cron file for your account.

Another part of cron is the table editor, crontab, which edits the file in /var/spool/cron. The crontab program knows where the files that need to be edited are, which makes things much easier on you.

The crontab utility has three options: -l, -r, and -e. The -l option lists the contents of the current table file for your current userid, the -e option lets you edit the table file, and the -r option removes a table file.

A cron table file is made up of one line per entry. An entry consists of two categories of data: when to run a command and which command to run.

A line contains six fields, unless it begins with a hash mark (#), which is treated as a comment. The six fields, which must be separated by white space (tabs or spaces), are:
Minute of the hour in which to run (0-59)
Hour of the day in which to run (0-23)
Day of the month (0-31)
Month of the year in which to run (1-12)
Day of the week in which to run (0-6) (0=Sunday)
The command to execute

As you can see, the “when to run” fields are the first five in the table. The final field holds the command to run.

An entry in the first five columns can consist of:
A number in the specified range
A range of numbers in the specified range; for example, 2-10
A comma-separated list consisting of individual numbers or ranges of numbers, as in 1,2,3-7,8
An asterisk that stands for all valid values

Note that lists and ranges of numbers must not contain spaces or tabs, which are reserved for separating fields.

A sample cron table file might be displayed with the crontab -l command. The following example includes line numbers to clarify the explanation.

 

1     $ crontab -l
2     # DO NOT EDIT THIS FILE
3     # installed Sat Jul 15
4     #min    hr   day   mon   weekday  command
6     30      *     *     *     *       some_command
7     15,45   1-3   *     *     *       another_command
8     25      1     *     *     0       sunday_job
9     45      3     1     *     *       monthly_report
10    *       15    *     *     *       too_often
11    0       15    *     *     1-5     better_job
$
Lines 2 through 4 contain comments and are ignored. Line 6 runs the command some_command at 30 minutes past the hour. Note that the fields for hour, day, month, and weekday were all left with the asterisk; therefore some_command runs at 30 minutes past the hour, every hour of every day.

Line 7 runs the command another_command at 15 and 45 minutes past the hour for hours 1 through 3, namely, 1:15, 1:45, 2:15, 2:45, 3:15, and 3:45 a.m.

Line 8 specifies that sunday_job is to be run at 1:25 a.m., only on Sundays.

Line 9 runs monthly_report at 3:45 a.m. of the first day of each month.

Line 10 is a typical cron table entry error. The user wants to run a task daily at 3 p.m., but has only entered the hour. The asterisk in the minute column causes the job to run once every minute for each minute from 3:00 p.m. through 3:59 p.m.

Line 11 corrects that error and adds weekdays 1 through 5, limiting the job to 3:00 p.m., Monday through Friday.

Now that you know cron basics, try the following experiment. Cron is usually used to run a script, but it can run any command. If you do not have cron privileges, you will have to follow as best you can, or work with someone who has them.

Use the crontab editor to edit a new crontab entry. In this example I am asking cron to execute something every minute.

 

$crontab -e
0-59    *    *    *    *    echo `date` “Hello” >>$HOME/junk.txt
$
The sixth field contains the command to echo the output from date (note the reverse quotes around date), followed by “Hello”, and also the command to append the result to a file in my home directory, which is named junk.txt.

Close this cron table file. If you have cron privileges and have entered the command correctly, you will receive a receive that the file has been saved.

Use crontab -l to view the file.

 

$ crontab -l
# DO NOT EDIT THIS FILE
# installed Sat Jul 15
0-59    *    *    *    *    echo `date` “Hello” >>$HOME/junk.txt
$
Change to your home directory, use the touch command to create junk.txt in case it does not exist, and then use tail -f to open the file and display the contents line by line as they are inserted by cron.

 

$ cd
$ touch junk.txt
$ tail -f junk.txt
Sat Jul 15 15:23:07 PDT Hello
Sat Jul 15 15:24:07 PDT Hello
Sat Jul 15 15:25:07 PDT Hello
Sat Jul 15 15:26:07 PDT Hello
The screen will update once per minute as the information is inserted into junk.txt.

Stop the display by pressing Control-D.

Be sure to clean up the cron table files by using the crontab -e option to open the cron table file and remove the line you just created.

All commands executed by cron should run silently with no output. Because cron runs as a detached job, it has no terminal to write messages to. However, the best-laid plans of mice, men, and programmers are not without deviations from the expected course, and it is entirely possible that a command, script, or job may produce output or, heaven forbid, some actual error messages.

To handle that, cron traps all the output to standard out or to standard error that has not been redirected to a file, as in the example just tested. The trapped output is dropped into a mail file and is sent either to the user who originated the command or to root. Either way, it conveniently traps errors without forcing cron to blow up or abort.

 

• • •

eprom - wwpn example

Категория: Uncategorized, Solaris related — technotes @ 4:54 pm

WWPN:50:06:04:82:bc:01:1b:8b WWNN:50:06:04:82:bc:01:1b:8b
root@uxdb2% eeprom
scsi-initiator-id=7
keyboard-click?=false
keymap: data not available.
ttyb-rts-dtr-off=false
ttyb-ignore-cd=true
ttya-rts-dtr-off=false
ttya-ignore-cd=true
ttyb-mode=9600,8,n,1,-
ttya-mode=9600,8,n,1,-
pcia-probe-list=1
pcib-probe-list=1,3,2,4,5
enclosure-type: data not available.
banner-name: data not available.
energystar-enabled?=false
mfg-mode=off
diag-level=min
#power-cycles=1431655923
system-board-serial#: data not available.
system-board-date: data not available.
fcode-debug?=false
output-device=screen
input-device=keyboard
load-base=16384
boot-command=boot
auto-boot?=true
watchdog-reboot?=false
diag-file: data not available.
diag-device=symm0
boot-file: data not available.
boot-device=symm0
local-mac-address?=true
ansi-terminal?=true
screen-#columns=80
screen-#rows=34
silent-mode?=false
use-nvramrc?=true
nvramrc=devalias symm0 /pci@1f,4000/lpfc@2/sd@0,19
security-mode=none
security-password: data not available.
security-#badlogins=0
oem-logo: data not available.
oem-logo?=false
oem-banner: data not available.
oem-banner?=false
hardware-revision: data not available.
last-hardware-update: data not available.
diag-switch?=false
root@uxdb2%

• • •

Growing ufs file systems

Категория: Uncategorized, Solaris related — technotes @ 4:54 pm

First thanks to all the good people who took the time to answer me.

And here are the results and conclusions of the jury:
(distilled from answers from at least 6 different sources)

1. No, you do not need Volume Manager to grow an UFS filesystem
2. Yes, you can grow a normal UFS file system by using either:
/usr/lib/fs/ufs/mkfs -G -M /current/mount /dev/rdsk/cXtYdZsA newsize
or
/usr/opt/SUNWmd/sbin/growfs -M /mnt /dev/rdsk/c1t4d0s0

3. The latter command is part of the Volume Manager package. But you do not
need a full installation to use the growfs command.

4. Several people gave the good advice to grow busy file systems in small
chunks

5. Some people warned that using the command might crash, lockup the system
(probably on ‘busy filesystems’)

6. My personal advise:
- go ahead and grow your filesystem online
- do not try it without a backup
- prefer to do it on a quiet (single-user mode) system.

PS: just in case you would be interested, soft partitions of Volume Manager
do not take away much of the performance.

PPS: the jury is still out on the question why this ‘important’ feature is
unmarketed and even undocumented (the mkfs option -G does not exist
according to SUN man pages)

Anyhow thanks again,

Bart

• • •

ifconfig examples

Категория: Uncategorized, Solaris related — technotes @ 4:53 pm

SUMMARY: ifconfig on Solaris 8
UnixAdmin sunixadm@yahoo.com
Tue, 2 Apr 2002 22:52:34 -0800 (PST)

Previous message: summary: capacity planning and fiber questions
Next message: SUMMARY: Western Digital 100GB disk?
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

——————————————————————————–

Hi Managers,

I received quite a few answers/suggestions regarding
my issue with ifconfig.  I would like to thanks all
who responded and a special thanks goes to Fabrice
Guerini, who suggested changing my entry in
/etc/netmasks from 10.192.2.0 to 10.192.0.0.  I did
this and the correct broadcast address displays after
a reboot.  The other answers/suggestions worked but,
none held after the reboot which I contribute to the
entry in the netmasks.  What’s strange is that the
entry for my primary network isn’t xxxx.xxxx.0.0 but
xxxx.xxxx.xxx.0 and the broadcast is still correct
with a netmask of 255.255.248.0. 

Below are the responses I received as well as my
original message.

Thanks again to all who responded.

-Joe
Rick Place:
Try adding the broadcast definition to your ifconfig
command, i.e.

# ifconfig hme0:1 plumb 10.192.2.70 netmask
255.255.248.0 broadcast +
up

The “+” tells it to use the default broadcast address
based on your netmask.
Larry Snyder:
Try:
# ifconfig hme0:1 10.192.2.70 netmask 255.255.248.0
broadcast + up
Steve Mickeler:
The answer is “man ifconfig”
ifconfig hme0:1 plumb
ifconfig hme0:1 10.192.2.70 netmask + broadcast + up

>From ifconfig(1M)

If a “+” (plus sign) is given for the  netmask  value,
  the
     mask  is looked up in the  netmasks(4) database.
The  default  broadcast
address is the address with a host part of all 1’s.  A
“+”  (plus  sign) given for the broadcast value causes
the  broadcast  address  to  be  reset  to  a  default
appropriate  for  the  (possibly new) address and net-
mask.
Michael Hocke:
Use ‘broadcast +’ in your ifconfig command and it will
set the correct
broadcast address:

# ifconfig eri0:1 10.192.2.70 netmask 255.255.248.0
broadcast +
# ifconfig -a

eri0:1:
flags=1000842 mtu
1500 index
2
        inet 10.192.2.70 netmask fffff800 broadcast
10.192.7.255

Thomas_J_Jones:
Try setting your broadcast, ie: # ifconfig hme0:1
10.192.2.70 netmask
255.255.248.0 broadcast + up

Fabrice Guerini:
So would I, except that your network number, for this
netmask and
address
range is 10.192.0.0. Try putting this in your
/etc/netmasks:

10.192.0.0 255.255.248.0

Darren Dunham:
How about the man page?
You didn’t set the broadcast address…  ‘netmask’ and
‘broadcast’ are
separate keywords.  Setting one does not set the
other.

You can avoid doing all that work in the future simply
by creating a
“/etc/hostname.hme0:1″ file with the IP address (or
hostname) inside.

The scripts that activate it do the equivalent of
this..

ifconfig plumb up inet netmask +
broadcast +

The ‘+’ bit means to look at /etc/netmasks for the
address or mask to
be
used.  Without that, it’ll use the pre-cidr
expectation that 10.x is a
class A address.
matthew zeier:
Try:

ifconfig hme0:1 10.192.2.70 netmask 255.255.248.0
broadcast + up

However, on Solaris 8,  you can do:

ifconfig hme0 addif 10.192.2.70 netmask 255.255.248.0
broadcast + up

And let the OS figure out the virtual interface
instance.
Dan Astoorian:
Try inserting “broadcast +” in the ifconfig command,
just before “up”.

You can also probably use “netmask +” instead of
“netmask
255.255.248.0″
if you want, since you’ve entered the subnet into your
/etc/netmasks
file.

Hope this helps.
Nathan W. Lindstrom:
Just specify the broadcast address on the ifconfig
line, for example:

# ifconfig hme0:1 10.192.2.70 netmask 255.255.248.0
broadcast
10.192.7.255
up

 
— UnixAdmin <sunixadm@yahoo.com> wrote:
> Hi Managers,
>
> I am trying to add an additional IP Address to a NIC
> on an Ultra 10 running SOlaris 8.
>
> The commands I am running are:
> # ifconfig hme0:1 plumb
> # ifconfig hme0:1 10.192.2.70 netmask 255.255.248.0
> up
>
> When I do ifconfig hme0:1 I get:
>
> hme0:1:
> flags=1000843
> mtu
> 1500 index 2
> inet 10.192.2.70 netmask fffff800
> broadcast 10.255.255.255
>
> The entries in /etc/netmasks is:
> 10.192.2.0 255.255.248.0
> 139.7.156.0 255.255.248.0
>
> What bothers me is the broadcast address.  Using a
> netmask of 255.255.248.0, I would expect a broadcast
> of 10.192.7.255.  I have looked on docs.sun.com and
> sunsolve but didn’t find anything that helped.
>
> Thanks in advance for the help.
>
> -Joe
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers

 

——————————————————————————–
Previous message: summary: capacity planning and fiber questions
Next message: SUMMARY: Western Digital 100GB disk?
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

• • •

Sun Solaris Servers Network Configuration Guide

Категория: Uncategorized, Solaris related — technotes @ 4:52 pm

Sun Solaris Servers Network Configuration Guide (SPARC Platform Only)
 
 

To bind an IP address to a Network Interface Card
#ifconfig –a                                                         — to check the configuration

#ifconfig qfe0 plumb                                                      — to enable the first Network Interface Card

#ifconfig qfe0 netmask up          — to bind IP address, subnet, and enable the configuration

 

Create a file on /etc directory – hostname.qfe0 with hostname entry

Add entry on /etc/netmasks if IP address is on different subnet

Add entry on /etc/inet/hosts file with IP address and hostname

 

Example:
#ifconfig –a

hme0: flags=863 mtu 1500

        inet 202.40.231.2 netmask ffffff00 broadcast 202.40.231.255

        ether 8:0:20:9f:51:fe

 

#ifconfig qfe0 plumb

#ifconfig qfe0 202.40.231.3 netmask 255.255.255.0 up

#ifconfig –a

hme0: flags=863 mtu 1500

        inet 202.40.231.2 netmask ffffff00 broadcast 202.40.231.255

        ether 8:0:20:9f:51:fe

qfe0: flags=863 mtu 1500

        inet 202.40.231.3 netmask ffffff00 broadcast 202.40.231.255

 

To change IP Address
#ifconfig qfe0 down                                               — to disable the first Network Interface Card

 

To remove Network Interface Card
#ifconfig qfe0 unplumb                                          — to remove the first Network Interface Card

 

To bind a virtual IP address to Network Interface Card
#ifconfig qfe0:1 plumb                                           — in some cases this is not needed if qfe0 has been plumb

#ifconfig qfe0:1 202.40.231.4 netmask 255.255.255.0 up

 

Create a file on /etc directory – hostname.qfe0:1 with hostname entry

Add entry on /etc/netmasks if IP address is on different subnet

Add entry on /etc/inet/hosts file with IP address and hostname

 

NOTE:

If adding a quad port Network Interface Card, the naming convention will be qfe0, qfe1, qfe2, qfe3.
If adding a single port Network Interface Card, the naming convention will be hme1, hme2, hme3.
The onboard Network Interface Card is hme0
If adding a virtual IP address, the naming convention will be hme0:1, hme0:2, up to hme0:3 only for hme0, or qfe0:1, qfe0:2, up to qfe0:3 only for qfe0, depending on the number of hme and qfe port used.
 

To hardcode the speed of the Network Interface Card
Example:

You want to hardcode 100Full Duplex for hme0

#ndd –set /dev/hme instance 0

#ndd –set /dev/hme adv_100fdx_cap 1

#ndd –set /dev/hme adv_100hdx_cap 0

#ndd –set /dev/hme adv_10fdx_cap 0

#ndd –set /dev/hme adv_10hdx_cap 0

#ndd –set /dev/hme adv_autoneg_cap 0

 

Create an input on the file /etc/system so that when your system rebooted it will run the NIC in 100Full Duplex automatically.

set hme:hme_adv_100fdx_cap=1

set hme:hme_adv_100hdx_cap=0

set hme:hme_adv_10fdx_cap=0

set hme:hme_adv_10hdx_cap=0

set hme:hme_adv_autoneg_cap=0

 

To check the status

#ndd /dev/hme \?                                                   — displays all command options for ndd

#ndd /dev/hme link_status                                      — displays the hme0 link status

 

The above configurations should be followed in order.

 

1 = Capable/Enable

0 = Disable

hme1 = instance 1

hme2 = instance 2

hme3 = instance 3

 

The system on the other end of network cable should be hardcode to 100Full Duplex also. If the other end is a switch, check your vendor manuals on how to do it.

 

To monitor packets traveling in your NIC ports
Example:

You want to monitor your hme0 port of packets coming from IP address 202.40.224.14

#snoop –d hme0 | grep 202.40.224.14

 

You want to monitor your qfe1 port of packets coming from host server1

#snoop –d qfe1 | grep server1

 

You want to monitor your hme1 ports of all packets

#snoop –d hme1

 

To add or remove a static route
Example:

You want to add a static route to network 192.168.16.0 to your default gateway of 10.236.74.1

#route add –net 192.168.16.0 10.236.74.1

then create a script, so that when the system rebooted the route will automatically added

#cd /etc/rc2.d

#vi S168staticroute

Add the following line

route add –net 192.168.16.0 10.236.74.1

 

You want to add a static route to host 192.168.64.4 to your default gateway of 10.236.74.1

#route add 192.168.64.4 10.236.74.1

then create a script, so that when the system rebooted the route will automatically added

#cd /etc/rc2.d

#vi S168staticroute

Add the following line

route add 192.168.64.4 10.236.74.1

 

You want to delete the static route to network 192.168.16.0 to your default gateway of 10.236.74.1

#route delete –net 192.168.16.0 10.236.74.1

 

You want to delete the static route to host 192.168.64.4 to your default gateway of 10.236.74.1

#route delete 192.168.64.4 10.236.74.1

 

• • •

nic speed stuff

Категория: Uncategorized, Solaris related — technotes @ 4:52 pm

To set the settings by hand without reboot use do this
You may need to set the instance. E.g.

ndd -set /dev/eri instance 0
ndd -set /dev/eri adv_10hdx_cap 0
ndd -set /dev/eri adv_10fdx_cap 0
ndd -set /dev/eri adv_100hdx_cap 0
ndd -set /dev/eri adv_100fdx_cap 1
ndd -set /dev/eri adv_autoneg_cap 0

Note that the “adv_autoneg_cap” should be the LAST entry.

Dbh

The settings in the /etc/system to make it permanent on reboot put the in
/etc/system this way:
If you have an hme or qfe interface notice that the eri interface variable
are set
differently versus hme/qfe interface format of    set
hme:hme_adv_autoneg_cap=0 as Matt states.

set eri:adv_100fdx_cap=1
set eri:adv_100T4_cap=0
set eri:adv_100hdx_cap=0
set eri:adv_10fdx_cap=0
set eri:adv_10hdx_cap=0
set eri:adv_autoneg_cap=0

ie without the “eri_” prefix on each one.. Sun have been inconsistent
here given that you have to use hme_ and qfe_ prefixes on their hme and
qfe interfaces

Title

Controlling NIC Speed in Solaris

Date Created

2002 November 22

Modification Log  
Keywords

dfe hme qe qfe NIC network solaris

 

Most networking devices autonegotiate Ethernet speed and duplex settings by default. Autonegotiation is fine when connecting links that aren’t permanent, but permanent links should have hard-coded speed and duplex settings at both ends. This is especially true for links between routers, switches, firewalls, load balancers, virtual-private-network (VPN) concentrators, and servers. To avoid future problems, confirm that all port settings are currently hard coded, and disable auto-negotiation when installing new devices.

When autonegotiation leaves one end of the link in full-duplex mode and the other in half duplex, errors and retransmissions can cause unpredictable behavior in the network. These errors are not fatal — traffic still makes it through — but locating and fixing them wastes time. The show command on Cisco equipment will reveal these errors. On UNIX servers, input or output errors are displayed by the netstat -i command.

This duplex mismatch can create subtle problems in applications. For example, if a Web server is talking to a database server through an Ethernet switch with a duplex mismatch, small database queries may succeed, while large ones fail due to a timeout. The database administrator may waste a lot of time looking for a software problem, assuming that it’s not a network problem because some transactions are working. A server that seems slower after a reboot may have failed to properly negotiate the speed and duplex settings. Hard coding these settings saves time and needless network trouble. (above quoted from Cisco Packet Magazine Spring 2002)

Here are some sample commands to hard-code Ethernet interfaces to 100-Mbps full duplex:

How to force a hme NIC to 100mb / full-duplex
How to force a hme NIC to 10mb / full-duplex
Is the NIC running at 10BaseT or 100BaseT, full or half duplex, etc.?
Special Considerations for qfe / qe NICs

 


How to force a hme NIC to 100mb / full-duplex

If the auto negotiate does not work, then the 100-MB full-duplex mode can be forced to run at 100-MB, Full-Duplex using the following:

Please try (if using /etc/rc2.d/S99…)

ndd -set /dev/hme instance 0
ndd -set /dev/hme adv_100T4_cap 0
ndd -set /dev/hme adv_100fdx_cap 1
ndd -set /dev/hme adv_100hdx_cap 0
ndd -set /dev/hme adv_10fdx_cap 0
ndd -set /dev/hme adv_10hdx_cap 0
ndd -set /dev/hme adv_autoneg_cap 0

or (if using /etc/system)

set hme:hme_adv_autoneg_cap=0
set hme:hme_adv_100T4_cap=0
set hme:hme_adv_100fdx_cap=1
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_10fdx_cap=0
set hme:hme_adv_10hdx_cap=0

Note that the order does make a difference. The link is re-negotiated when the interface is ifconfig’d up or when ndd ndd adv_autoneg_cap command is executed.

Back to Top

How to force a hme NIC to 10mb / full-duplex

The section “10FDX” includes how to force the HME card to work at 10 MB (full-duplex). You can either put the commands in the /etc/system file or in a startup script — i.e. /etc/rc2.d/S99hme_config. Another way is to make the changes from the command line — using the “ndd” command using the syntax below. But it is better to put the commands in /etc/system or a startup script to preserve the environment accross reboots.

10FDX only

/etc/system

set hme:hme_adv_autoneg_cap=0
set hme:hme_adv_100T4_cap=0
set hme:hme_adv_100fdx_cap=0
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_10fdx_cap=1
set hme:hme_adv_10hdx_cap=0

ndd commands

ndd -set /dev/hme instance 0
ndd -set /dev/hme adv_100T4_cap 0
ndd -set /dev/hme adv_100fdx_cap 0
ndd -set /dev/hme adv_100hdx_cap 0
ndd -set /dev/hme adv_10fdx_cap 1
ndd -set /dev/hme adv_10hdx_cap 0
ndd -set /dev/hme adv_autoneg_cap 0

Back to Top

Is the NIC running at 10BaseT or 100BaseT, full or half duplex, etc.?

How do you tell if the hme interface is actually linked up at 10 Mbps or 100 Mbps?

# /usr/sbin/ndd -get /dev/hme transciever_inuse

transciever_inuse (read only)
0 for onboard
1 for offboard card (mii)

# ndd -get /dev/hme link_status

link_status (read only)
0 for Link Down
1 for Link up
# ndd -get /dev/hme link_speed

link_speed (read only)
0 for 10 Mbps
1 for 100 Mbps
# ndd -get /dev/hme link_mode

link_mode (read only)
0 for Half-Duplex mode
1 for Full-Duplex mode

Back to Top

Special Considerations for qfe / qe NICs

There are times when you may want a quad ethernet card to have different settings per interface. You can do this with ndd. ndd (with /dev/{hme,qfe}) does not affect all interfaces. Just the one corresponding to the “instance” variable.

# ndd -set /dev/qfe instance 0 (for qfe0)… settings

# ndd -set /dev/qfe instance 1 (for qfe1)… settings

Back to Top

 

 

 

 

• • •

open boot symm ….

Категория: Uncategorized, Sankar's Technotes, Solaris related — technotes @ 4:51 pm

{0} ok
{0} ok probe-scsi-all
/pci@8,600000/lpfc@1
Target 0  DID 220e13  WWPN 5006.0482.bfd0.eecd
  Unit 2   Disk     EMC     SYMMETRIX       5566
Target none  DID 221113  WWPN 5006.0482.bfd0.eecc
  Unit 1a   Disk     EMC     SYMMETRIX       5566
  Unit 1b   Disk     EMC     SYMMETRIX       5566

/pci@8,600000/SUNW,qlc@4
LiD HA LUN  — Port WWN —  —– Disk description —–

/pci@8,700000/lpfc@3

/pci@8,700000/scsi@6,1

/pci@8,700000/scsi@6
Target 6
  Unit 0   Removable Read Only device    TOSHIBA DVD-ROM SD-M14011009

{0} ok
{0} ok
{0} ok
{0} ok
{0} ok ” /pci@8,600000/lpfc@1″ select-dev
{0} ok
{0} ok set-ptp
Flash data structure updated.
Signature     4e45504f
Valid_flag         14e
Host_did             0
Enable_flag          5
Topology_flag        4
Boot_id              0
Lnk_timer            f
Plogi-timer          0
LUN (1 byte)         2
DID                  0
WWPN          5006.0482.bfd0.eecd
LUN (8 bytes) 0000.0000.0000.0000

*** Type reset-all to update. ***
{0} ok did wwpn 5006.0482.bfd0.eecc 2 0 set-boot-id
Flash data structure updated.
Signature     4e45504f
Valid_flag         14e
Host_did             0
Enable_flag          5
Topology_flag        4
Boot_id              0
Lnk_timer            f
Plogi-timer          0
LUN (1 byte)         2
DID                  0
WWPN          5006.0482.bfd0.eecc
LUN (8 bytes) 0000.0000.0000.0000

*** Type reset-all to update. ***
{0} ok
{0} ok
{0} ok reset-all
Resetting …

 

• • •

oralce start & stop

Категория: Uncategorized, Solaris related — technotes @ 4:51 pm

su - oracle
$lsnrctl stop
$lsnrctl dbsnmp-stop
$svrmgl

SVRMGL>connect internal
SVRMGL>shutdown immediate;
quit
**************

SVRMGL>connect internal
SVRMGM>startup

$lsnrctl start
$lsntctl dbsnmp_start

• • •

Powerpath commands

Категория: Uncategorized, Solaris related — technotes @ 4:50 pm

socal connections, run the following commands to restore the paths
in PowerPath:
On hosts running this OS Run these commands
Solaris 7, 8, and 9 devfsadm
powercf -q
powermt config
Solaris 2.6 drvconfig; disks; devlinks
powercf -q
powermt config

• • •

Simple rootdg config

Категория: Uncategorized, VMWare, Solaris related — technotes @ 4:49 pm

vxconfigd -m disable
vxdctl init
vxdg init rootdg
vxdisk -f init c0t0d32s7 type=simple
vxdg adddisk c0t0d0s32s7
vxdctl add disk c0t0d32s7 type=simple
vxdctl enable
cd /etc/vx/reconfig.d/state.d/
ls
rm install-db
clear

• • •
Next Page »
Powered by: WordPress • Шаблон: ADMIN-BG