Sponsored Content
Top Forums Programming ndd commands using function calls Post 302298242 by binary_boy on Tuesday 17th of March 2009 03:53:46 AM
Old 03-17-2009
ndd

Actually you can write a litle bash script to get all the informations you require:

all the commands below, just assemble them to do anything you need:

#To find which driver, interfaces you have:
<ifconfig -a>

Here are some NIC drivers userd by Solaris (just in case)
# hme - Sun Fast-Ethernet device driver
# qfe - Sun qfe Quad Fast-Ethernet device driver
# eri - Fast-Ethernet device driver
# fjqe - Fujitsu PCI Quad 10/100 Ethernet
# fjgi - Fujitsu PCI Gigabit Ethernet
# e1000g - Gigabit Ethernet driver Intel PRO/1000
# bge - Gigabit Ethernet driver for Broadcom BCM57xx
# nxge - Sun 10/1 Gigabit Ethernet network driver
# ce - Cassini Gigabit-Ethernet device driver

#Check the which instance of NIC port we are connecting to:

ndd -get /dev/interface instance

#Check status:
ndd -get /dev/interface link_status (0=down, 1=up)

#Check link mode:
ndd -get /dev/interface link_mode (0=half-duplex, 1=full-duplex)

#Check link speed :
ndd -get /dev/interface link_speed (0=10mbs, 1=100mbs)

#Check autonegotiation capabilities:
ndd -get /dev/interface adv_autoneg_cap (0=false, 1=true)

#Set autonegotiation:
ndd -set /dev/intergace adv_autoneg_cap 1 (set to true)

#Finding errors in dmesg
grep -i <interface> /var/adm/messages

Note: Those changes written with ndd -set, are not persisten, they will be lost at system reboot. But if you like to add them permanently, you may consider editing file /kernel/drv/<interface>.conf


Hope this helped Smilie
______________________
The power of Solaris cannot be experienced on an Intel machine!!!
 

10 More Discussions You Might Find Interesting

1. AIX

overriding function calls without recompiling

i want to replace the *alloc and free function calls in an existing project with my own functions, to be able to log the adresses etc in a text file. (memoryleak debugging) I think LD_PRELOAD is what i am looking for. That way i could create a Library with my own malloc functions and link them... (1 Reply)
Discussion started by: Lazzar
1 Replies

2. Solaris

ndd help

Hi Guys, I need help with ndd. I was going through network FAQ but i have more questions then answers regarding ndd. #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... (2 Replies)
Discussion started by: nitinkgoud
2 Replies

3. IP Networking

Identification of data calls & voice calls

Is there any facility to filter/identify the data calls and voice calls coming throug modem? OR Can we get the data or voice calls information through a script(preferably C Kermit)? (0 Replies)
Discussion started by: pcsaji
0 Replies

4. Solaris

Questions related to ndd commands

Hello Gurus I would like to know more about ndd commands related to ethernet(NIC) like how to set link_status, link_speed & link_mode as I know how to check these value. And I also would like to know how to make these setting permanents after reboot as I know that these setting will vanish... (5 Replies)
Discussion started by: amity
5 Replies

5. Programming

Tracing Function Calls in a program

Apart from writing debug and statements in constructors is there any way by which we can trace the function call stack at any depth? The issue that we always face is that when program crashes (Web Server running on Linux) we have no idea where it crashes and we have to do the hard way of... (1 Reply)
Discussion started by: uunniixx
1 Replies

6. Solaris

ndd matters

Hi, I would like to know whether there is any config file that i can refer to for the result of 'ndd -get /dev/tcp tcp_time_wait_interval'? When i man 'ndd', there is one statement which is -> Each driver chooses which parameters to make visible using ndd. Does it answering my question above... (3 Replies)
Discussion started by: honmin
3 Replies

7. UNIX for Advanced & Expert Users

Using Library Calls (3) as commands

My understanding is when you see a man page command with a (3), is that this is a library call such as XSetScreenSaver(3) .. Sometimes these "calls" seem to do exactly what I need from a command. is there a way to access these calls from the terminal and just run them like a normal binary? How... (1 Reply)
Discussion started by: glev2005
1 Replies

8. Shell Programming and Scripting

Question about Function calls

Hello everyone, here's my problem: I want to create two shell scripts. one of them should includes some functions, the other one just the function calls. Is this possible? Can i call a function which is placed in a scriptfile eg functions.sh out of another script eg call.sh? :confused: And if... (2 Replies)
Discussion started by: Sebi0815
2 Replies

9. Shell Programming and Scripting

How to achieve Parellelism for the function which has multiple cp commands

Hi, Here is my requirement. Currently, there is a function which gets called in a for loop 2 times. doCopy() { cp /src/a*.jar /target/ cp /src/b*.jar /target/ cp /src/c*.jar /target } Since it is called sequentially from the for loop, I was asked to make parellel copy to... (7 Replies)
Discussion started by: kgsrinivas
7 Replies

10. UNIX for Advanced & Expert Users

Linkage of POSIX threads function calls

I wonder if someone knows what is the rationale behind linking function calls of the POSIX threads library at link-time vs. run-time. For example, if I create the following program: #include <pthread.h> void noop() { return; } int main() { pthread_self(); pthread_atfork(noop,... (1 Reply)
Discussion started by: jsimsa
1 Replies
MSK(4)							   BSD Kernel Interfaces Manual 						    MSK(4)

NAME
msk -- Marvell/SysKonnect Yukon II Gigabit Ethernet adapter driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device miibus device msk Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_msk_load="YES" DESCRIPTION
The msk device driver provides support for various NICs based on the Marvell/SysKonnect Yukon II Gigabit Ethernet controller chip. All NICs supported by the msk driver have TCP/UDP/IP checksum offload for transmit, TCP segmentation offload (TSO), hardware VLAN tag strip- ping/insertion features and an interrupt moderation mechanism as well as a 64-bit multicast hash filter. The Yukon II supports TBI (ten bit interface) and GMII transceivers, which means it can be used with either copper or 1000baseX fiber applications. The Yukon II also supports Jumbo Frames (up to 9022 bytes), which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the ifconfig(8) utility configures the adapter to receive and transmit Jumbo Frames. The msk driver supports the following media types: autoselect Enable autoselection of the media type and options. The user can manually override the autoselected mode by adding media options to rc.conf(5). 10baseT/UTP Set 10Mbps operation. The ifconfig(8) mediaopt option can also be used to select either full-duplex or half-duplex modes. 100baseTX Set 100Mbps (Fast Ethernet) operation. The ifconfig(8) mediaopt option can also be used to select either full-duplex or half-duplex modes. 1000baseTX Set 1000baseTX operation over twisted pair. The ifconfig(8) mediaopt option can also be used to select either full-duplex or half-duplex modes. 1000baseSX Set 1000Mbps (Gigabit Ethernet) operation. Both full-duplex and half-duplex modes are supported. The msk driver supports the following media options: full-duplex Force full duplex operation. half-duplex Force half duplex operation. For more information on configuring this device, see ifconfig(8). HARDWARE
The msk driver provides support for various NICs based on the Marvell/SysKonnect Yukon II based Gigabit Ethernet controller chips, including: o D-Link 550SX Gigabit Ethernet o D-Link 560SX Gigabit Ethernet o D-Link 560T Gigabit Ethernet o Marvell Yukon 88E8021CU Gigabit Ethernet o Marvell Yukon 88E8021 SX/LX Gigabit Ethernet o Marvell Yukon 88E8022CU Gigabit Ethernet o Marvell Yukon 88E8022 SX/LX Gigabit Ethernet o Marvell Yukon 88E8061CU Gigabit Ethernet o Marvell Yukon 88E8061 SX/LX Gigabit Ethernet o Marvell Yukon 88E8062CU Gigabit Ethernet o Marvell Yukon 88E8062 SX/LX Gigabit Ethernet o Marvell Yukon 88E8035 Fast Ethernet o Marvell Yukon 88E8036 Fast Ethernet o Marvell Yukon 88E8038 Fast Ethernet o Marvell Yukon 88E8039 Fast Ethernet o Marvell Yukon 88E8040 Fast Ethernet o Marvell Yukon 88E8040T Fast Ethernet o Marvell Yukon 88E8042 Fast Ethernet o Marvell Yukon 88E8048 Fast Ethernet o Marvell Yukon 88E8050 Gigabit Ethernet o Marvell Yukon 88E8052 Gigabit Ethernet o Marvell Yukon 88E8053 Gigabit Ethernet o Marvell Yukon 88E8055 Gigabit Ethernet o Marvell Yukon 88E8056 Gigabit Ethernet o Marvell Yukon 88E8057 Gigabit Ethernet o Marvell Yukon 88E8058 Gigabit Ethernet o Marvell Yukon 88E8059 Gigabit Ethernet o Marvell Yukon 88E8070 Gigabit Ethernet o Marvell Yukon 88E8071 Gigabit Ethernet o Marvell Yukon 88E8072 Gigabit Ethernet o SysKonnect SK-9Sxx Gigabit Ethernet o SysKonnect SK-9Exx Gigabit Ethernet LOADER TUNABLES
Tunables can be set at the loader(8) prompt before booting the kernel or stored in loader.conf(5). hw.msk.msi_disable This tunable disables MSI support on the Ethernet hardware. The default value is 0. SYSCTL VARIABLES
The following variables are available as both sysctl(8) variables and loader(8) tunables: dev.mskc.%d.int_holdoff Maximum number of time to delay interrupts. The valid range is 0 to 34359738 for 125MHz clock in units of 1us, the default is 100 (100us). The interface need to be brought down and up again before a change takes effect. dev.mskc.%d.process_limit Maximum amount of Rx events to be processed in the event loop before rescheduling a taskqueue. The accepted range is 30 to 256, the default value is 128 events. The interface does not need to be brought down and up again before a change takes effect. SEE ALSO
altq(4), arp(4), miibus(4), netintro(4), ng_ether(4), vlan(4), ifconfig(8) HISTORY
The msk driver was written by Pyun YongHyeon <yongari@FreeBSD.org> and it is based on sk(4) and Marvell's FreeBSD driver. It first appeared in FreeBSD 7.0 and FreeBSD 6.3. BSD
November 23, 2010 BSD
All times are GMT -4. The time now is 01:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy