Monday, July 18, 2011

25-Jun-2009 23:02:08 spurs.MOM Error 00010 00005 Queuing not allowed O:spurs.DR Q:0×83f0000 T:0×301b, suppressed 0

This occured while stopping, then re-starting the STBY CE. Following this, the STBY CE was dying.

Hello Hong,

eth3 interfaces on both knicks and spurs are not configured correctly.

We can see that IP packets were dropped on eth3:

knicks

eth3     Link encap:Ethernet  HWaddr 00:0E:0C:EC:AC:89  
         inet addr:10.2.89.4  Bcast:10.2.89.255  Mask:255.255.255.0
         inet6 addr: fe80::20e:cff:feec:ac89/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:1719575 errors:0 dropped:2086 overruns:0 frame:0
         TX packets:1156494 errors:365 dropped:0 overruns:0 carrier:365
         collisions:31041 txqueuelen:100
         RX bytes:1246952841 (1.1 GiB)  TX bytes:474268341 (452.2 MiB)
         Base address:0x4000 Memory:bc520000-bc540000

spurs

eth3     Link encap:Ethernet  HWaddr 00:0E:0C:EC:AD:99  
         inet addr:10.2.89.3  Bcast:10.2.89.255  Mask:255.255.255.0
         inet6 addr: fe80::20e:cff:feec:ad99/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:1155753 errors:0 dropped:68 overruns:0 frame:0
         TX packets:1721684 errors:19 dropped:0 overruns:0 carrier:19
         collisions:31041 txqueuelen:100 
         RX bytes:474054722 (452.0 MiB)  TX bytes:1250025688 (1.1 GiB)
         Base address:0x4000 Memory:bc520000-bc540000

I ran ifconfig eth3 txqueuelen 1000 on both.

But the main issue here is that eth3 is 100 Mbps Half Duplex where eth4 is 1000 Mbps Full Duplex:

> grep "Half Duplex" /var/log/messages
Jul  6 14:18:54 spurs kernel: e1000: eth3: e1000_watchdog_task: NIC Link is Up 100 Mbps Half Duplex
Jul  6 14:34:44 knicks kernel: e1000: eth3: e1000_watchdog_task: NIC Link is Up 100 Mbps Half Duplex

This must be fixed.

Eric.

cronjob examples

crontab.gallinar.belvedere:
#min(0-59)|hour(0-23)|day(1-31)|mon(1-12)|wday(0-6)|command
0       0        *       *       *       rsh redbull /u/gallinar/bin/scripts/swlab -force >/dev/null
0      21        *       *       *       /ccase/cm/swdel/bin/swdel.runall
0      22        *       *       *       /ccase/cm/swdel/bin/kindexer.runall
#0      6        *       *       *      rsh redbull "/u/gallinar/bin/scripts/t/ECN.pl"
0       7        *       *       *       /ccase/cm/swdel/src/script/update_ccase_cm_swdel_dirs

cronjob.gallinar.sc-zamp
#min(0-59)|hour(0-23)|day(1-31)|mon(1-12)|wday(0-6)|command
0       3       *         *         *         /opt/webstack/mysql/bin/mysql -u enguser -D mrbs -e 'select room_name, area_name from mrbs_room as host, mrbs_area 
as area where host.area_id=area.id ' --xml > /u/engineering/perl_tools/cgi-bin/intranet/lab.hosts
0       2       *       *       1-5     /u/engineering/perl_tools/cgi-bin/intranet/ECNs3.pl > /u/apache/UEintranet/Documents/ECNs/ecns.txt 2>/u/engineering
/perl_tools/cgi-bin/intranet/ecns.log
30      2       *       *       1-      /u/engineering/perl_tools/cgi-bin/intranet/ecn2drop.pl 2>/u/engineering/perl_tools/cgi-bin/intranet/drops.log
0,5,10,15,20,25,30,35,40,45,50,55       *       *       *       1-5       /u/gallinar/bin/scripts/nd_cr.pl
# 0,5,10,15,20,25,30,35,40,45,50,55     *       *       *       1-5       LD_LIBRARY_PATH=/u/engineering/locals/solaris8/lib /u/gallinar/tmp/perltrial/sacha.pl

Wednesday, July 6, 2011

Machines in Mt-Laurel

rsh walter will say which machine to use.

gcc: Authorize for (int i)

gcc -std=gnu99

How to compile on odin

Create a view:

crtool  -rel sw9

Compile:

cd 
cc_mkmf
make

Use insure

make CC=insure

Open LDAP compilation (litchi)

First, install the sasl lib (not gsasl).
Second, configure options for Open LDAP:

LD_LIBRARY_PATH="/usr/local/lib/sasl2:/usr/local/BerkeleyDB.4.4/lib" LDFLAGS="-L/usr/local/lib/sasl2 -L/usr/local/BerkeleyDB.4.4/lib" CPPFLAGS="-I/usr/local/include/sasl -I/usr/local/BerkeleyDB.4.4/include " ./configure --enable-bdb --enable-ldbm --enable-ldap --enable-meta --enable-crypt --with-cyrus-sasl

Then, compile

make depend
make

Linux: Replace a dynamic library for a test

  • Re-compile the exe using the .so while removing the -rpath dir option.
  • export LD_LIBARY_PATH
  • Check with ldd on the exe that your library is taken into account.

Compile libapi.so sample

/u/engineering/locals/solaris9/softs/proglang/gcc-3.2/bin/gcc -m64 -fPIC -DULTICOM_IN_HOUSE_COMPILE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS   -DULTICOM_IN_HOUSE_COMPILE -I/vob/common/src -I/vob/signalware/../common/src   -I. -I.. -I/vob/common/3rdparty/licensemanager/include -I/vob/signalware//Master/Ft/inc -I/vob/signalware//Master/Ft/inc -I/vob/signalware//Master/cust_inc -I/vob/signalware//Master/cust_inc -I/vob/signalware//Master/priv_inc -I/vob/signalware//Master/priv_inc  -I/usr/X/include     -g -Wall -std=gnu99 -O  -I/vob/common/src -c ~/tmp/cpptrial/api_main.c -o api_main.o
/u/engineering/locals/solaris9/softs/proglang/gcc-3.2/bin/gcc -R /usr/lib/sparcv9/omni -L/vob/signalware/Master/library -L/vob/signalware/Master/library -m64 -R/usr/lib/sparcv9/omni  -o api_main  api_main.o -L/vob/common/lib/ -lulcmtoolsc  -lapi -ldf -lFt -lsocket -lnsl -lgen -lpthread -ldgms -lrt

man swmake

crtool man make

pm.c:7355: warning: int format, different type arg (arg 8)

This warning in 9V4 (but not in 9S50) is due to the fact that in Ft Proto.h, we have:

#ifdef GNUC
int FtFormatInternationalMsg (nl_catd catd, int set_number,
                              int message_number, _TCHAR defaultString,
                              _TCHAR destMsgBuf, int sizeDestMsgBuf, ...)
    attribute((format(printf, 4, 7)));

Explanation:

attribute format

This attribute allows assigning printf-like or scanf-like characteristics to the declared function, and this enables the compiler to check the format string against the parameters provided throughout the code. This is exceptionally helpful in tracking down hard-to-find bugs.

There are two flavors:

  • attribute((format(printf,m,n)))
  • attribute((format(scanf,m,n)))

but in practice we use the first one much more often.

The (m) is the number of the “format string” parameter, and (n) is the number of the first variadic parameter. To see some examples:

/* like printf() but to standard error only */
 extern void eprintf(const char *format, ...)
     __attribute__((format(printf, 1, 2)));  /* 1=format 2=params */

 /* printf only if debugging is at the desired level */
 extern void dprintf(int dlevel, const char *format, ...)
     __attribute__((format(printf, 2, 3)));  /* 2=format 3=params */

With the functions so declared, the compiler will examine the argument lists

$ cat test.c
 1  extern void eprintf(const char *format, ...)
 2               __attribute__((format(printf, 1, 2)));
 3
 4  void foo()
 5  {
 6      eprintf("s=%s\n", 5);             /* error on this line */
 7
 8      eprintf("n=%d,%d,%d\n", 1, 2);    /* error on this line */
 9  }
 $ cc -Wall -c test.c
 test.c: In function `foo':
 test.c:6: warning: format argument is not a pointer (arg 2)
 test.c:8: warning: too few arguments for format

Note that the “standard” library functions – printf and the like – are already understood by the compiler by default.

C7 compilation only

cd c7;swmake "PROT_FLAGS=-DC7_Q"

A7 compilation only

cd a7;swmake "PROT_FLAGS=-DA7_T"

CH7 compilation only

cd ch7;swmake "PROT_FLAGS=-DC7_Q -DCH7_Q"

J7 compilation only

cd j7;swmake "PROT_FLAGS=-DJ7_Q -DJ7G_Q"

Basic Signalware compilation

Compiles what is in ”/ccase/cm/crtool/var/swmake_filters/basic.filter”

swmake -Xfilter=basic

k2632 native sctp compilation

To compile /vob/signalware/Master/sctp/native, you first need to specify you use native SCTP via configurePlarform, then swcommission.

Typical error:

snmp_bindx undefined symbol

libexpat / libcrypto compilation

E.g. libcrypto compilation



> cd /vob/common/3rtparty/openssl
> swmake
Creating /vob/common/3rdparty/openssl/Makefile from /vob/common/3rdparty/openssl/Imakefile
current vob=/vob/common
imake default opts=-DPROD_sun -DUSE64BITS -DUSEGCC -DPROD_sol10 -DUSEGNUSYNTAX -DWINKIN_COMPILE -DREMOTE_SITE -DWINKIN_COMPILE
/vob/common/3rdparty/openssl (Imakefile)
reset imake add opts=-D_CURRENTVOB=/vob/common -I/vob/common/config
"./Imakefile", line 1: Can't find include file omni.cf
"./Imakefile", line 2: Can't find include file c++.cf
imake: Exit code 2. Stop.
Interupted: 256 at /vob/common/src/perl/Ulcm/Nmkmf.pm line 265.
clearmake: Error: Syntax error in file "Makefile", line 28, column 0
syntax error

To fix this shit, proceed as follows:

> nmkmf "-I/vob/signalware/Master/config" 
> swmake

ftxtract looks for ftxtract.cf

> OMNI_HOME=/vob/signalware ftxtract

Compile JMML utests

> cd jmml/utests
> /vob/common/3rdparty/jakarta-ant/jakarta-ant-1.5.4/bin/ant -DCOMMON_CMROOT=/vob/common