Thursday, July 29, 2010
what is the meaning of " /dev/null 2>&1 "
The greater-than (>) in commands like these redirect the program’s output somewhere. In this case, something is being redirected into /dev/null, and something is being redirected into &1.
Standard in, out and error:
There are three standard sources of input and output for a program. Standard input usually comes from the keyboard if it’s an interactive program, or from another program if it’s processing the other program’s output. The program usually prints to standard output, and sometimes prints to standard error. These three file descriptors (you can think of them as “data pipes”) are often called STDIN, STDOUT, and STDERR.
Sometimes they’re not named, they’re numbered! The built-in numberings for them are 0, 1, and 2, in that order. By default, if you don’t name or number one explicitly, you’re talking about STDOUT.
That means file descriptor 0 or fd0 denotes STDIN or standard input and file descriptor 1 or fd1 denotes STDOUT or standard output and file descriptor 2 or fd2 denotes STDERR or standard error.
You can see the command above is redirecting standard output into /dev/null, which is a place you can dump anything you don’t want (often called the bit-bucket), then redirecting standard error into standard output (you have to put an & in front of the destination when you do this).
The short explanation, therefore, is “all output from this command should be shoved into a black hole.” That’s one good way to make a program be really quiet!
example :
/opt/oracle/admin/pgrxd/analyze.ksh >> /opt/oracle/admin/pgrxd/analyze.log 2>&1
Thursday, July 22, 2010
/etc/vx/reconfig.d/state.d/install-db
vxvm:vxconfigd: ERROR: enable failed: Error in disk group configuration copies
Rootdg disk group has no configuration copies; transactions are disabled.
vxvm:vxdctl: ERROR: enable failed: Error in disk group configuration copies
In Volume Manager 3.1.1 with patch02 or patch03, if /etc/vx/reconfig.d/state.d/install-db exists, the Volume Manager boot file, /etc/vx/volboot, will be re-initialized. If any simple disk is included in rootdg, Volume Manager can not be started properly even if the file install-db is removed. This problem only occurred in Volume Manager 3.1.1 with patch02 or patch03, and the Volume Manager 3.1.1 Japanese version.
NOTE: This problem does not occur in Volume Manager 3.1.1 without patches and Volume Manager 3.2.
After the /etc/vx/reconfig.d/state.d/install-db file is created, an error message will not be displayed during the boot process. But, after the machine boots up, running the vxdctl enable command to enable the vxconfigd daemon will generate an error message as shown below:
# vxdctl enable
vxvm:vxconfigd: ERROR: enable failed: Error in disk group configuration copies
Rootdg disk group has no configuration copies; transactions are disabled.
vxvm:vxdctl: ERROR: enable failed: Error in disk group configuration copies
If simple disks are used in Volume Manager, run the following command to re-add all simple disk entries to the volboot file in order to re-enable the vxconfigd daemon. If more than one simple disk is used in Volume Manager, repeat the command until all of the simple disk entries have been added.
# vxdctl add disk
If no simple disks are used in Volume Manager, then the above step is not necessary. If the prior Volume Manager host ID was different than the operating system host name, it must run the following command to change the Volume Manager host ID, which is saved in the volboot file, to get Volume Manager started properly.
# vxdctl hostid
Then vxconfigd can be re-enabled by executing the following commands:
# vxdctl -k stop
# vxconfigd -d
# vxdctl enable
To fix the problem permanently, apply the following solution after installing the patch, but before reboot, to avoid the problem. If the problem has already occurred, apply the solution after recovering the volboot file using the steps above.
Solution
1. Find the following lines in the startup script /etc/init.d/vxvm-reconfig in line 165 to 171:
165> if [ -f $mkdbfile ]; then
166> xcmd vxiod set 10
167> xcmd $VOLD -k -r reset -m disable
168> xcmd vxdctl init
169> xcmd vxdctl initdmp
170> xcmd vxdg init rootdg
171> fi
2. Find the following line in line 222:
222> [ -f $reconfigfile ] || exit 0
3. Move the lines in step 1 to appear below the line in step 2
4. The modified vxvm-reconfig file will appear as shown below:
214> [ -f $reconfigfile ] || exit 0
215>
216> if [ -f $mkdbfile ]; then
217> xcmd vxiod set 10
218> xcmd $VOLD -k -r reset -m disable
219> xcmd vxdctl init
220> xcmd vxdctl initdmp
221> xcmd vxdg init rootdg
222> fi
5. Reboot
Linux Variables & Iteration, control and if statements
Linux Shell ProgrammingThis section on shell programming, is a brief introduction to shell programming, and only talks about the bash shell. For more complete information, refer to "The CTDP Linux Programmer's Guide". Linux VariablesWhen variables are used they are referred to with the $ symbol in front of them. There are several useful variables available in the shell program. Here are a few:
The "shift" command can be used to shift command line arguments to the left, ie $1 becomes the value of $2, $3 shifts into $2, etc. The command, "shift 2" will shift 2 places meaning the new value of $1 will be the old value of $3 and so forth. Iteration, control and if statements | |
- if - Used to execute one or more statements on a condition. An example:
if [ ! -d /mnt ] # be sure the directory /mnt exists
then
mkdir /mnt
fi - case - Used to execute specific commands based on the value of a variable. An example:
case $NUM of
1)
echo The number is 1
;;
2)
echo The number is 2
;;
*)
echo The number is not 1 or 2
;;
esac - for - Used to loop for all cases of a condition. In the example below, it is used to copy all files found in /mnt/floppy to the /etc directory. The lines were numbered for reference with descriptions:
- The for loop statement will loop until all files have been found.
- A test to be sure the file is a normal file and not a directory.
- A comment line.
- This line extracts the name of the file from its full path pointed to by the variable $i and puts it in the variable $filename. The method used here is called parameter expansion and is documented in the bash man page. For more information on parameter expansion read the "Linux Programmer's Guide".
- This line sends a statement to the standard output, telling what file is being copied.
- This line performs the copy command using the -p option to preserve file attributes. Note: Much ability to perform script programming is couched in the ability to know and use the various commands, programs and tools available in Linux rather than a strict understanding of syntax. This is obvious to anyone who reads the system startup script files in /etc/rc.d and associated directories.
- This line ends the if statement.
- This line ends the for statement.
1. for i in /mnt/floppy/*; do
2. if [ -f $i ]; then
3. # if the file is there
4. filename=${i#/mnt/floppy/}
5. echo copying $i to /etc/$filename
6. cp -p $i /etc/$filename
7. fi
8. done - until - Cycles through a loop until some condition is met. The syntax for the command is shown below:
until [ expression ]
do
statements
done - while - Cycles through a loop while some condition is met. The below example will cycle through a loop forever:
while [ 1 ]
do
statement(s)
done
Tests
There is a function provided by bash called test which returns a true or false value depending on the result of the tested expression. Its syntax is:
test expression
It can also be implied as follows:
[ expression ]
The tests below are test conditions provided by the shell:
- -b file = True if the file exists and is block special file.
- -c file = True if the file exists and is character special file.
- -d file = True if the file exists and is a directory.
- -e file = True if the file exists.
- -f file = True if the file exists and is a regular file
- -g file = True if the file exists and the set-group-id bit is set.
- -k file = True if the files' "sticky" bit is set.
- -L file = True if the file exists and is a symbolic link.
- -p file = True if the file exists and is a named pipe.
- -r file = True if the file exists and is readable.
- -s file = True if the file exists and its size is greater than zero.
- -s file = True if the file exists and is a socket.
- -t fd = True if the file descriptor is opened on a terminal.
- -u file = True if the file exists and its set-user-id bit is set.
- -w file = True if the file exists and is writable.
- -x file = True if the file exists and is executable.
- -O file = True if the file exists and is owned by the effective user id.
- -G file = True if the file exists and is owned by the effective group id.
- file1 –nt file2 = True if file1 is newer, by modification date, than file2.
- file1 ot file2 = True if file1 is older than file2.
- file1 ef file2 = True if file1 and file2 have the same device and inode numbers.
- -z string = True if the length of the string is 0.
- -n string = True if the length of the string is non-zero.
- string1 = string2 = True if the strings are equal.
- string1 != string2 = True if the strings are not equal.
- !expr = True if the expr evaluates to false.
- expr1 –a expr2 = True if both expr1 and expr2 are true.
- expr1 –o expr2 = True is either expr1 or expr2 is true.
The syntax is :
arg1 OP arg2
where OP is one of –eq, -ne, -lt, -le, -gt, or –ge. Arg1 and arg2 may be positive or negative integers or the special expression "–l string" which evaluates to the length of string.
An example script
The file below is an example file which demonstrates some of the testing as talked above along with several looping and control statements.
#! /bin/bash
# Use the bash shell to run the script
# This is an example file to take entries from the user
# entries Version 1.0 May 22, 2000
DONE=no
ENTRIES="hello bye ls 1"
while [ $DONE = no ]
do
echo Valid entries are: $ENTRIES
read ENTRY # Read the variable ENTRY from the user
case $ENTRY in
1)
pwd
;;
hello)
echo How are you?
;;
bye)
echo exiting...
DONE=yes
;;
ls)
ls -al |more
;;
*)
echo $ENTRY is an unrecognized command.
;;
esac
done
gdb debugger commands
See the gdb(1) man page for more information on the gdb program. Below are listed some commands:
- file - Loads the exe file.
- kill - Terminates the program being debugged.
- list - List sections of the source code.
- next - Advances one line of source code in the current function and steps into other functions.
- run - Executes the program that is being debugged.
- quit - Ends gdb.
- watch - Enables you to tell the value of a variable when it changes.
- break - Set a break point.
- make - Remake the exe program without quitting gdb.
- shell - Run a UNIX shell command without leaving gdb.
While loop
Shell Script While Loop Examples
by Vivek Gite · 6 comments
Can you provide me a while loop control flow statement shell script syntax and example that allows code to be executed repeatedly based on a given boolean condition?
Each while loop consists of a set of commands and a condition. The general syntax as follows for bash while loop:
while [ condition ]
do
command1
command2
commandN
done
- The condition is evaluated, and if the condition is true, the command1,2…N is executed.
- This repeats until the condition becomes false.
- The condition can be integer ($i <>
ksh while loop syntax:
while [[ condition ]] ; do
command1
command1
commandN
done
csh while loop syntax:
while ( condition )
commands
end
BASH while Loop Example
#!/bin/bash
c=1
while [ $c -le 5 ]
do
echo "Welcone $c times"
(( c++ ))
done
KSH while loop Example
#!/bin/ksh
c=1
while [[ $c -le 5 ]]; do
echo "Welcome $c times"
(( c++ ))
done
CSH while loop Example
#!/bin/csh
c=1
while ( $c <= 5 )
echo "Welcome $c times"
@ c = $c + 1
end
Another example:
#!/bin/csh
set yname="foo"
while ( $yname != "" )
echo -n "Enter your name : "
set yname = $<
if ( $yname != "" ) then
echo "Hi, $yname"
endif
end
"for" loop syntax
for loop syntax
Numeric ranges for syntax is as follows:
for VARIABLE in 1 2 3 4 5 .. N
do
command1
command2
commandN
done
This type of for loop is characterized by counting. The range is specified by a beginning (#1) and ending number (#5). The for loop executes a sequence of commands for each member in a list of items. A representative example in BASH is as follows to display welcome message 5 times with for loop:
#!/bin/bash
for i in 1 2 3 4 5
do
echo "Welcome $i times"
done
Sometimes you may need to set a step value (allowing one to count by two's or to count backwards for instance). Latest bash version 3.0+ has inbuilt support for setting up ranges:
#!/bin/bash
for i in {1..5}
do
echo "Welcome $i times"
done
Bash v4.0+ has inbuilt support for setting up a step value using {START..END..INCREMENT} syntax:
#!/bin/bash
echo "Bash version ${BASH_VERSION}..."
for i in {0..10..2}
do
echo "Welcome $i times"
done
Sample outputs:
Bash version 4.0.33(0)-release...
Welcome 0 times
Welcome 2 times
Welcome 4 times
Welcome 6 times
Welcome 8 times
Welcome 10 times
The seq command (outdated)

The seq command can be used as follows. A representative example in seq is as follows:
#!/bin/bash
for i in $(seq 1 2 20)
do
echo "Welcome $i times"
done
There is no good reason to use an external command such as seq to count and increment numbers in the for loop, hence it is recommend that you avoid using seq. The builtin command are fast.
Three-expression bash for loops syntax
This type of for loop share a common heritage with the C programming language. It is characterized by a three-parameter loop control expression; consisting of an initializer (EXP1), a loop-test or condition (EXP2), and a counting expression (EXP3).
for (( EXP1; EXP2; EXP3 ))
do
command1
command2
command3
done
A representative three-expression example in bash as follows:
#!/bin/bash
for (( c=1; c<=5; c++ ))
do
echo "Welcome $c times..."
done
Sample output:
Welcome 1 times
Welcome 2 times
Welcome 3 times
Welcome 4 times
Welcome 5 times
How do I use for as infinite loops?
Infinite for loop can be created with empty expressions, such as:
#!/bin/bash
for (( ; ; ))
do
echo "infinite loops [ hit CTRL+C to stop]"
done
Conditional exit with break
You can do early exit with break statement inside the for loop. You can exit from within a FOR, WHILE or UNTIL loop using break. General break statement inside the for loop:
for I in 1 2 3 4 5
do
statements1 #Executed for all values of ''I'', up to a disaster-condition if any.
statements2
if (disaster-condition)
then
break #Abandon the loop.
fi
statements3 #While good and, no disaster-condition.
done
Following shell script will go though all files stored in /etc directory. The for loop will be abandon when /etc/resolv.conf file found.
#!/bin/bash
for file in /etc/*
do
if [ "${file}" == "/etc/resolv.conf" ]
then
countNameservers=$(grep -c nameserver /etc/resolv.conf)
echo "Total ${countNameservers} nameservers defined in ${file}"
break
fi
done
Early continuation with continue statement
To resume the next iteration of the enclosing FOR, WHILE or UNTIL loop use continue statement.
for I in 1 2 3 4 5
do
statements1 #Executed for all values of ''I'', up to a disaster-condition if any.
statements2
if (condition)
then
continue #Go to next iteration of I in the loop and skip statements3
fi
statements3
done
This script make backup of all file names specified on command line. If .bak file exists, it will skip the cp command.
#!/bin/bash
FILES="$@"
for f in $FILES
do
# if .bak backup file exists, read next file
if [ -f ${f}.bak ]
then
echo "Skiping $f file..."
continue # read next file and skip cp command
fi
# we are hear means no backup file exists, just use cp command to copy file
/bin/cp $f $f.bak
done
The hostid of the machine is stored in /etc/xv/volboot
Solaris 9 ==> Tto Connect SAN Disks -> luxadm
Sun Solaris 9 Commands to Connect SAN Disks
$ man luxadmMaintenance Commands luxadm(1M)
NAME
luxadm - administration program for the Sun Enterprise Net-
work Array (SENA), RSM, SPARCstorage Array (SSA) subsystems,
and individual Fiber Channel Arbitrated Loop (FC_AL) devices
SYNOPSIS
luxadm [ options ... ] subcommand [ options ... ] enclo-
sure [ ,dev ] | pathname ...
-----------------------------------------
There are always a bunch of strange commands to connect a server to SAN disks. In my case, I’m running Solaris 9, using QLogic Fibre Channel cards, and connecting to an IBM DS4300.
1) Connect the Solaris server SAN disks. After I made the connection, the GUI that allows me to zone the SAN recognized the QLogic connections, and I zoned the LUNs.
If you need more detailed instructions, here are some potentially useful posts: How to Zone a Brocade SAN Switch and How to Zone IBM DS4000 SAN Disks.
2) Scan your disks, and it should show up as a new disk when you run “format”.
Solaris# devfsadm
Solaris# format
My result: No new disks. Sigh.
3) Run a bunch of cryptic but useful diagnostic commands:
To see your HBA ports and whether you’re connected:
Solaris# luxadm -e port
Found path to 3 HBA ports
/devices/pci@8,700000/SUNW,qlc@2/fp@0,0:devctl CONNECTED
/devices/pci@8,700000/SUNW,qlc@2,1/fp@0,0:devctl CONNECTED
/devices/pci@8,600000/SUNW,qlc@4/fp@0,0:devctl CONNECTED
To see your disks:
Solaris# luxadm probe
To see your HBA ports (type fc-private, below) and their connected disks (type disk):
Solaris# cfgadm -al
Ap_Id Type Receptacle Occupant Condition
c8 fc-private connected configured unknown
c8::200800a0b8199b3b disk connected configured unknown
c9 fc-private connected configured unknown
c9::200900a0b8199b3b disk connected configured unknown
4) Force Fibre Channel SAN disk rescan, since everything looks connected and okay. Use your device path from “luxadm -e port” output.
Solaris# luxadm -e forcelip /devices/pci@8,700000/SUNW,qlc@2/fp@0,0:devctl
Solaris# luxadm -e forcelip /devices/pci@8,700000/SUNW,qlc@2,1/fp@0,0:devctl
Solaris# luxadm -e forcelip /devices/pci@8,600000/SUNW,qlc@4/fp@0,0:devctl
5) Rerun format command.
Solaris # format
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w500000e0107111e1,0
1. c1t1d0 t2
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w500000e01070d761,0
2. c7t600A0B801019B1B2002032A5489C60F3d0
/scsi_vhci/ssd@g600a0b801019b1b2002032a5489c60f3
Also click
http://www.iti.cs.tu-bs.de/cgi-bin/UNIXhelp/man-cgi?luxadm+1M
Here are some of the commands I use, also attached stuff for old ssa.
FCAL Disks
luxadm probe (discovers fcal)
luxadm display Enclosure (displays information on fcal box)
luxadm reserve /dev/rdsk/c#t#d#s# (reserves device so it can’t be accessed)
luxadm -e offline /dev/rdsk/c#t#d#s# (takes a device offline)
luxadm -e bus_quiesce /dev/rdsk/c#t#d#s# (quiesce the bus)
luxadm -e bus_unquiesce /dev/rdsk/c#t#d#s# (unquiesce the bus)
luxadm -e online /dev/rdsk/c#t#d#s# (bring the disk device back online)
luxadm release /dev/rdsk/c#t#d#s# (unreserved the device for use)
luxadm remove_device BAD,f2 (removes a device from slot f2 on enclosure BAD)
luxadm insert_device BAD,f2 (hot plug a new device to slot f2 on enclosure BAD)
SSAADM (for old ssa drawers)
ssaadm display c# (displays ssa on controller)
ssaadm display /dev/rdsk/c#t#d#s# (display drive information)
ssaadm start /dev/rdsk/c#t#d#s# (spin up a specific drive)
ssaadm stop /dev/rdsk/c#t#d#s# (spin down a specific drive)
ssaadm start –t 3 c# (spin up all drives in tray 3 on controller )
ssaadm stop –t 3 c# (spin down all drives in tray 3 on controller)
ssaadm start c# (spin up all drives in array)
ssaadm stop c# (stop all drives in array)
Wednesday, July 21, 2010
Linux / Unix Command: route
Example :-
#route add -net 192.168.13.0 netmask 255.255.255.0 gw 192.168.13.1 dev eth0
Full Description:-
Linux / Unix Command: route
|
|
NAME
route - show / manipulate the IP routing tableSYNOPSIS
route [-CFvnee]- route
- [-v] [-A family] add [-net|-host] target [netmask Nm] [gw Gw] [metric N] [mss M] [window W] [irtt I] [reject] [mod] [dyn] [reinstate] [[dev] If]
- route
- [-v] [-A family] del [-net|-host] target [gw Gw] [netmask Nm] [metric N] [[dev] If]
- route
- [-V] [--version] [-h] [--help]
DESCRIPTION
Route manipulates the kernel's IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface after it has been configured with the ifconfig(8) program.When the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the routing tables.
OPTIONS
- -A family
- use the specified address family (eg `inet'; use `route --help' for a full list).
- -F
- operate on the kernel's FIB (Forwarding Information Base) routing table. This is the default.
- -C
- operate on the kernel's routing cache.
- -v
- select verbose operation.
- -n
- show numerical addresses instead of trying to determine symbolic host names. This is useful if you are trying to determine why the route to your nameserver has vanished.
- -e
- use netstat(8)-format for displaying the routing table. -ee will generate a very long line with all parameters from the routing table.
- del
- delete a route.
- add
- add a new route.
- target
- the destination network or host. You can provide IP addresses in dotted decimal or host/network names.
- -net
- the target is a network.
- -host
- the target is a host.
- netmask NM
- when adding a network route, the netmask to be used.
- gw GW
- route packets via a gateway. NOTE: The specified gateway must be reachable first. This usually means that you have to set up a static route to the gateway beforehand. If you specify the address of one of your local interfaces, it will be used to decide about the interface to which the packets should be routed to. This is a BSDism compatibility hack.
- metric M
- set the metric field in the routing table (used by routing daemons) to M.
- mss M
- set the TCP Maximum Segment Size (MSS) for connections over this route to M bytes. The default is the device MTU minus headers, or a lower MTU when path mtu discovery occured. This setting can be used to force smaller TCP packets on the other end when path mtu discovery does not work (usually because of misconfigured firewalls that block ICMP Fragmentation Needed)
- window W
- set the TCP window size for connections over this route to W bytes. This is typically only used on AX.25 networks and with drivers unable to handle back to back frames.
- irtt I
- set the initial round trip time (irtt) for TCP connections over this route to I milliseconds (1-12000). This is typically only used on AX.25 networks. If omitted the RFC 1122 default of 300ms is used.
- reject
- install a blocking route, which will force a route lookup to fail. This is for example used to mask out networks before using the default route. This is NOT for firewalling.
- mod, dyn, reinstate
- install a dynamic or modified route. These flags are for diagnostic purposes, and are generally only set by routing daemons.
- dev If
- force the route to be associated with the specified device, as the kernel will otherwise try to determine the device on its own (by checking already existing routes and device specifications, and where the route is added to). In most normal networks you won't need this.
If dev If is the last option on the command line, the word dev may be omitted, as it's the default. Otherwise the order of the route modifiers (metric - netmask - gw - dev) doesn't matter.
EXAMPLES
- route add -net 127.0.0.0
- adds the normal loopback entry, using netmask 255.0.0.0 (class A net, determined from the destination address) and associated with the "lo" device (assuming this device was prviously set up correctly with ifconfig(8)).
- route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0
- adds a route to the network 192.56.76.x via "eth0". The Class C netmask modifier is not really necessary here because 192.* is a Class C IP address. The word "dev" can be omitted here.
- route add default gw mango-gw
- adds a default route (which will be used if no other route matches). All packets using this route will be gatewayed through "mango-gw". The device which will actually be used for that route depends on how we can reach "mango-gw" - the static route to "mango-gw" will have to be set up before.
- route add ipx4 sl0
- Adds the route to the "ipx4" host via the SLIP interface (assuming that "ipx4" is the SLIP host).
- route add -net 192.57.66.0 netmask 255.255.255.0 gw ipx4
- This command adds the net "192.57.66.x" to be gatewayed through the former route to the SLIP interface.
- route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
- This is an obscure one documented so people know how to do it. This sets all of the class D (multicast) IP routes to go via "eth0". This is the correct normal configuration line with a multicasting kernel.
- route add -net 10.0.0.0 netmask 255.0.0.0 reject
- This installs a rejecting route for the private network "10.x.x.x."
OUTPUT
The output of the kernel routing table is organized in the following columns- Destination
- The destination network or destination host.
- Gateway
- The gateway address or '*' if none set.
- Genmask
- The netmask for the destination net; '255.255.255.255' for a host destination and '0.0.0.0' for the default route.
- Flags
- Possible flags include
U (route is up)
H (target is a host)
G (use gateway)
R (reinstate route for dynamic routing)
D (dynamically installed by daemon or redirect)
M (modified from routing daemon or redirect)
A (installed by addrconf)
C (cache entry)
! (reject route) - Metric
- The 'distance' to the target (usually counted in hops). It is not used by recent kernels, but may be needed by routing daemons.
- Ref
- Number of references to this route. (Not used in the Linux kernel.)
- Use
- Count of lookups for the route. Depending on the use of -F and -C this will be either route cache misses (-F) or hits (-C).
- Iface
- Interface to which packets for this route will be sent.
- MSS
- Default maximum segement size for TCP connections over this route.
- Window
- Default window size for TCP connections over this route.
- irtt
- Initial RTT (Round Trip Time). The kernel uses this to guess about the best TCP protocol parameters without waiting on (possibly slow) answers.
- HH (cached only)
- The number of ARP entries and cached routes that refer to the hardware header cache for the cached route. This will be -1 if a hardware address is not needed for the interface of the cached route (e.g. lo).