Linux-Development-Sys Digest #414, Volume #6     Fri, 19 Feb 99 17:14:04 EST

Contents:
  Re: Getting system info (David T. Blake)
  porting nfs-server-2.2beta37 (Andreas Buschmann)
  Re: 2.2.1: strange SMP (dual celeron) startup msgs (Johan Kullstam)
  Re: GCC wont find libraries in /usr/lib (Jaakko Paakkonen)
  Re: porting nfs-server-2.2beta37 (Casper H.S. Dik - Network Security Engineer)
  Re: Problem with autofs and local /home (Karl Heyes)
  Re: 2.2.1: strange SMP (dual celeron) startup msgs (Tim Dawson)
  Quad Processor Systems (Greg Franks)
  Re: 2.2.1: strange SMP (dual celeron) startup msgs (Marco Anglesio)
  Re: read ahead ? (Jay Thorne)
  Re: libc5 or libc<5.44 (Henrik Soderstrom)
  Re: Getting system info (Felix Rauch)
  Re: ATAPI  ZIP drive problem.... (Julian Robert Yon)
  Re: glibc 2.1 ;) (Bill Anderson)
  Re: SYN flood logs? (Bill Anderson)
  Re: kernel 2.2.1 & sound on laptop ("Calvin Mitchell")

----------------------------------------------------------------------------

From: [EMAIL PROTECTED] (David T. Blake)
Subject: Re: Getting system info
Date: 18 Feb 1999 07:38:36 -0800

"Martin Schouten" <[EMAIL PROTECTED]> writes:

>Does anyone know how to retrieve system info from within
>a C program? On Sun  I used the 'sysinfo' function to retrieve 
>the hostname and machine type etc. On HP I used the 'uname'
>function. I can't seem to find the equivalent function under Linux.
>Any suggestions?

Try the following

run emacs

meta-h i

Select GNU libc

Select system information

read about uname on linux

-- 
Dave Blake
[EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Andreas Buschmann)
Crossposted-To: comp.sys.sun.misc,comp.sys.sgi.misc
Subject: porting nfs-server-2.2beta37
Date: 18 Feb 1999 16:07:31 GMT

Hello,

I am trying to port the linux user land nfs server nfs-server-2.2beta37
to Solaris and Irix. I patched it so it would compile on Solaris 2.6 and
Irix 6.3.

When trying to run it, I get an error message like
nfsd[5083] 02/18/99 05:35 cannot create udp service.
which is printed due to a failed svcudp_create() in rpc_init() in 
rpcmisc.c. The offending line is
                transp = svcudp_create(sock);
On Irix 6.3 the errno is 122  "Operation not supported on transport endpoint"
from /usr/include/sys/errno.h:
#define EOPNOTSUPP      122             /* Operation not supported on socket */

On Solaris 2.6, the errno is 9  "Bad file number"



The sourrounding code is:
from rpcmisc.c: rpc_init()

        if ((_rpcfdtype == 0) || (_rpcfdtype == SOCK_DGRAM)) {
                if (_rpcfdtype == 0 && defport != 0 && 
                   ((sock = makesock(defport, IPPROTO_UDP, bufsiz)) < 0)) {
                        Dprintf(L_FATAL, "could not make a udp socket\n");
                }
                transp = svcudp_create(sock);
                if (transp == NULL) {
                        Dprintf(L_FATAL, "cannot create udp service.");
                }

with 
  defport = 2049 (or 3049 for a test)
  bufsiz = 16384
reducing bufsiz to 8192 doesn't help.

the code from rpcmisc.c: makesock() is

static int
makesock(int port, int proto, int socksz)
{
        struct sockaddr_in sin;
        int     s;
        int     sock_type;
        sock_type = (proto == IPPROTO_UDP) ? SOCK_DGRAM : SOCK_STREAM;
        s = socket(AF_INET, sock_type, proto);
        if (s < 0) {
                Dprintf(L_ERROR, "Could not make a socket: %s\n",
                                        strerror(errno));
                return (-1);
        }
        memset((char *) &sin, 0, sizeof(sin));
        sin.sin_family = AF_INET;        sin.sin_addr.s_addr = INADDR_ANY;
        sin.sin_port = htons(port);

#ifdef DEBUG
        {
        int     val = 1;
        if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) < 0)
                Dprintf(L_ERROR, "setsockopt failed: %s\n", strerror(errno));
        }
#endif

#ifdef SO_SNDBUF
        if (socksz != 0) {
                int sblen, rblen;

                /* 1024 for rpc & transport overheads */
                sblen = rblen = 8 * (socksz + 1024);
                if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &sblen, sizeof sblen) < 0 ||
                    setsockopt(s, SOL_SOCKET, SO_RCVBUF, &rblen, sizeof rblen) < 0)
                        Dprintf(L_ERROR, "setsockopt failed: %s\n", strerror(errno));
        }
#endif                          /* SO_SNDBUF */

        if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) == -1) {
                Dprintf(L_ERROR, "Could not bind name to socket %s:%d: %s\n",
                                        inet_ntoa(sin.sin_addr),
                                        ntohs(sin.sin_port),
                                        strerror(errno));
                return (-1);
        }
        return (s);
}


with DEBUG and SO_SNDBUF defined.
removing the #ifdef SO_SNDBUF part doesn't help.


For nfs-server-2.1 there is a port to irix, which works. There the code
calling makesock loks like here, but is located in main. The code for 
makesock looks very similar, but the line
                sblen = rblen = 8 * (socksz + 1024);
is
                sblen = rblen = socksz + 1024;
Changeing the code in v2.2 to this line, doesn't help.


Any Ideas, how to debug this?


                                Regards
                                        Andreas

p.s. I want the nfs server as a portable starting point for a filesystem 
     like interface to an application.
     My current fallback solution would be to use nfs-server-2.1 .

p.p.s. On Irix it seems to work, if I drop `-lcrypt -lnsl' from the
       linker line. I have to disable using authdes_getucred for this.
-- 
-- 
 /|)    Andreas Buschmann                       <[EMAIL PROTECTED]>
/-|)    Digitale Video Systeme                  +49 511 678 07-13
        DVS GmbH

------------------------------

From: Johan Kullstam <[EMAIL PROTECTED]>
Subject: Re: 2.2.1: strange SMP (dual celeron) startup msgs
Date: 18 Feb 1999 09:16:05 -0500

Douglas Jerome <[EMAIL PROTECTED]> writes:

> Hmmm...  2:30 seems mysteriously fast.  I get 3:28.89elapsed for
> a "make -j2 bzImage" with dual 333 Mhz PII and an ultrawide
> 40 Mbytes/sec SCSI disk interface.

well, there are kernel compiles and there are kernel compiles.

it may depend on your choice of compiler (gcc,egcs version) and
optimization setting (-O0 is faster than -O2).  if you do not build
all the kernel components (scsi takes a long time for me) then the
time can be shorter still.

fwiw i get about 2:40 on a quad ppro-200 with make -j 6.  it has 256M
4way interleave parity ram, dual bus, and UW scsi.  this is with
building scsi support.

-- 
johan kullstam

------------------------------

From: Jaakko Paakkonen <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer
Subject: Re: GCC wont find libraries in /usr/lib
Date: 17 Feb 1999 17:40:25 +0200

Nate Eldredge <[EMAIL PROTECTED]> writes:

> Looks like it's finding some other library, instead of the one in
> /usr/lib, to link against; one that doesn't define `__libc_init_first'. 
> Compile with -Wl,--verbose ; that will show you what files the linker is
> opening and should help you track down the problem.
> -- 
> 
> Nate Eldredge
> [EMAIL PROTECTED]

# gcc -Wl,--verbose 2>&1 | grep libc.so
attempt to open /lib/libc.so failed

# ls /lib/libc.so
/bin/ls: /lib/libc.so: No such file or directory

# ln -s /lib/libc.so.6 /lib/libc.so
# gcc hello.c
# ./a.out
hello

Yup. I think this should be put on the most Stupid Asked Questions.
Thank you Nate and Andreas


------------------------------

From: [EMAIL PROTECTED] (Casper H.S. Dik - Network Security Engineer)
Crossposted-To: comp.sys.sun.misc,comp.sys.sgi.misc
Subject: Re: porting nfs-server-2.2beta37
Date: 19 Feb 1999 15:56:02 GMT

[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

[EMAIL PROTECTED] (Andreas Buschmann) writes:

>When trying to run it, I get an error message like
>nfsd[5083] 02/18/99 05:35 cannot create udp service.
>which is printed due to a failed svcudp_create() in rpc_init() in 
>rpcmisc.c. The offending line is
>                transp = svcudp_create(sock);
>On Irix 6.3 the errno is 122  "Operation not supported on transport endpoint"
>from /usr/include/sys/errno.h:
>#define EOPNOTSUPP      122             /* Operation not supported on socket */

>On Solaris 2.6, the errno is 9  "Bad file number"


You pass svcudp_create a socket; it wants a TLI endpoint.

Try /usr/ucblib/librpcsoc.so

(the one from libnsl.so works with TI ones only)


Casper


--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

------------------------------

From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: Problem with autofs and local /home
Date: Thu, 18 Feb 1999 17:34:58 -0500



Craig J Copi wrote:

> In article <[EMAIL PROTECTED]>,
>         Karl Heyes <[EMAIL PROTECTED]> writes:
> >
> >
> > Craig J Copi wrote:
>
> >>         So does this mean I'm stuck?  On the nfs server I have to keep the
> >> home directories in /home, export them from here, and not use autofs if I
> >> want to maintain similar looking directory structures across multiple
> >> machines?  Is there a simple work around for this that I'm missing?  This
> >> would seem like a big problem if I were using nis maps for autofs.
> >>
> >
> > A feature was added to 2.2 to help with this facility.  The dentry scheme and
> > loopback (something like that!!, not the network interface) module enabled you
> > to mount certain directories in other areas.  I'll have to look at the details
> > but
> > this is what you want.
> >
> >
> > karl
>
>         I see, I hadn't thought of using the loopback device.  If you come up
> with something let me know.  Off hand I don't see how this would work but
> I think about it when I get a chance.
>

The mechanism I mentioned doesn't use NFS over the lo interface (although you could,

not a good performer!).  The new dentry level cache enables the localised mounting
of
already mounted filsystems.

I don't have the details with me, I'll check.

karl



------------------------------

From: [EMAIL PROTECTED] (Tim Dawson)
Subject: Re: 2.2.1: strange SMP (dual celeron) startup msgs
Date: 18 Feb 1999 16:56:04 GMT

In article <7ah0q9$d99$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (M Sweger) writes:
|> 
|> : Hmmm...  2:30 seems mysteriously fast.  I get 3:28.89elapsed for
|> : a "make -j2 bzImage" with dual 333 Mhz PII and an ultrawide
|> : 40 Mbytes/sec SCSI disk interface.
|> 
|> Just so you know that the UW SCSI can go 80 Mbytes/sec. At least mine
|> is cable of doing it. The only reason that the scsi has been limited
|> by Linux is that the I/O buss between the controller and the memory
|> is still 33mhz. Thus, why make it 80 mb/s when the adaptor card will
|> just be put into wait mode due to the I/O bus being so slow. Hence,
|> the closest match between scsi and memory bus is 40 mb/s.
|> 

No, actually Ultra-Wide SCSI is just 40MB/Sec.  Ultra-2 Wide LVD (Low Voltage 
Differential) will do 80MB/Sec.  They are not the same thing.

-- 
================================================================================
Tim Dawson ([EMAIL PROTECTED])                    Owner/Engineer
TPC Services                                        Bellnet: (972)-221-7385
Lewisville, Texas 75067                             FAXnet:  (972)-221-0393
"The world is complex. Sendmail.cf reflects this...."

------------------------------

From: Greg Franks <[EMAIL PROTECTED]>
Subject: Quad Processor Systems
Date: 19 Feb 1999 16:45:35 GMT

We're looking at purchaing a less-than-state-of-the-art QUAD processor
system for doing some performance analysis with the 2.2 kernels.  Does
anyone have some good/bad experience with a particular machine?

Thanks
  ..greg


-- 
   __@            Greg Franks, (613) 520-5726         <|       _~@ __O 
 _`\<,_    Systems Engineering, Carleton University,   |O\   -^\<;^\<, 
(*)/ (*)       Ottawa, Ontario, Canada  K1S 5B6.       (*)--(*)%---/(*)
          "Where do you want to go today?"   Outside. 

------------------------------

From: [EMAIL PROTECTED] (Marco Anglesio)
Subject: Re: 2.2.1: strange SMP (dual celeron) startup msgs
Reply-To: [EMAIL PROTECTED]
Date: Fri, 19 Feb 1999 16:56:12 GMT

On 18 Feb 1999 23:28:51 GMT, BL <[EMAIL PROTECTED]> wrote:
>on my dual celery (450mhz * 2):
>
>       make -j2: 1:53.89
>       make -j3: 1:53.86

Well, yes. -jN is the jobs option, where N jobs are run simultaneously.
Depends on where the bottleneck is. It might take advantage of some of
your CPU idle time, but given that a compile as root usually takes all the
cycles that it possibly can, you'll only get a significant improvement by
increasing the number of jobs N to equal the number of CPU's that you
have. 

Running two jobs simultaneously on one CPU (again, assuming 100% usage)
will just mean that you get two jobs taking twice as long - no
improvement.

marco

-- 
,--------------------------------------------------------------------------.
>           Marco Anglesio            |     It's more than magnificent;    <
>          [EMAIL PROTECTED]           |            it's mediocre.          <
>    http://www.the-wire.com/~mpa     |           --Samuel Goldwyn         <
`--------------------------------------------------------------------------'

------------------------------

From: Jay Thorne <[EMAIL PROTECTED]>
Subject: Re: read ahead ?
Date: Fri, 19 Feb 1999 18:38:46 GMT

Jun-young Cho wrote:
> 
> I know that when we read a file.
> Linux file system may read ahead some block asynchronously.
> Then, how many blocks can file system read ahead maximally?
[jay@adamant jay]$ /sbin/hdparm --help

hdparm - get/set hard disk parameters - version 3.5

Usage:  hdparm  [options] [device] ..

Options:
 -a    get/set fs readahead
 -A  * set drive read-lookahead flag (0/1)
 -c  * get/set IDE 32-bit IO setting
 -C  * check IDE power mode status
[root@adamant /root]# hdparm -a 255 /dev/hda

/dev/hda:
 setting fs readahead to 255
 readahead    = 255 (on)
[root@adamant /root]# hdparm -a 256 /dev/hda

/dev/hda:
 setting fs readahead to 256
 BLKRASET failed: Invalid argument
 readahead    = 255 (on)
[root@adamant /root]# 

-- 
Jay Thorne  [EMAIL PROTECTED]   KE Software
http://www.kesoftware.com

------------------------------

From: Henrik Soderstrom <[EMAIL PROTECTED]>
Subject: Re: libc5 or libc<5.44
Date: Fri, 19 Feb 1999 18:16:27 +0100
Reply-To: [EMAIL PROTECTED]

Andrew Sim wrote:
> 
> Hello,
> [1]     I am currently trying to set up a IPv6 node. Juz wanted to know
> how do you check up if you are using libc5 or libc<5.44? Is there a
> command that you can run to check what version you currently have?

ls -l /lib/libc.so.*

------------------------------

From: [EMAIL PROTECTED] (Felix Rauch)
Subject: Re: Getting system info
Date: 18 Feb 1999 18:52:00 +0100

Martin Schouten <[EMAIL PROTECTED]> wrote:
> Does anyone know how to retrieve system info from within
> a C program? On Sun  I used the 'sysinfo' function to retrieve 
> the hostname and machine type etc. On HP I used the 'uname'
> function. I can't seem to find the equivalent function under Linux.
> Any suggestions?

You could also try to read some files in the /proc filesystem,
depending on what information you need.

- Felix
-- 
Felix Rauch, research assistant @ ETH Zurich, Institute for Computersystems
Homepage: http://nice.ethz.ch/~felix/ (includes PGP public key)
Email: [EMAIL PROTECTED]     -> This article contains my personal views only <-

------------------------------

From: Julian Robert Yon <[EMAIL PROTECTED]>
Subject: Re: ATAPI  ZIP drive problem....
Date: Fri, 19 Feb 1999 13:52:19 +0000

Thomas Joynt wrote:

> Did you guys read the postings in the thread above? (about mounting the 4th
> partition)

I'm very familiar with the format of the zip disk. I've repartitioned a
few of them for various reasons. Did _you_ read our postings? The
problem is that the partition table shows FOUR partitions, not one
partition with the number 4. These partitions are not real (they don't
even match the disk geometry), and are certainly not mountable. But the
disks are ok - I can mount them on my own linux box (not atapi zip, it's
ppa instead). And the hardware works, because windows can read the same
disks on the same machines (even if i've changed the partition
structure).

So I repeat, I think it's a bug. Unfortunately, I don't have a clue
where it is...

Julian

~~~~~~~~~~~~~~~~~~~~
[EMAIL PROTECTED]
[EMAIL PROTECTED]

------------------------------

From: Bill Anderson <[EMAIL PROTECTED]>
Subject: Re: glibc 2.1 ;)
Date: Thu, 18 Feb 1999 19:58:29 +0000

Jonathan Stott wrote:
> 
> In article <7ae18r$9m5$[EMAIL PROTECTED]>,
> Nathan Myers <[EMAIL PROTECTED]> wrote:
> >Daren Scot Wilson <[EMAIL PROTECTED]> wrote:
> >>Lesson:   linux 2.2.1 (or 2.2.0) goes with and only with glibc 2.1,
> >>and older goes with older.  Don't mix 'em.
> >
> >Politely: Bull.
> >Egcs bugs get fixed, gcc-2.8.x bugs don't.  Build anything with gcc-2.8.x
> >and you're all on your own.  Thousands upon thousands of us are using
> >2.2.x with glibc 2.0.x, both built with egcs.
> 
> Politely: Bull.
> Less politely: Daren was right, you're out of line.
> 

No, Daren said:
"linux 2.2.1 (or 2.2.0) goes with *and only with* glibc 2.1"
(emphasis mine)

I have dozens of machines running 2.2.0|1 with glibc 2.0.7 with no
problems.
You yourself stated you were using 2.0.6 with the newer kernels just
fine. This counters Daren's statement.

Regarding Nathan's statement regarding egcs vs gcc, I agree, that was
out of line. I build with both just fine.

Bill Anderson

------------------------------

From: Bill Anderson <[EMAIL PROTECTED]>
Subject: Re: SYN flood logs?
Date: Thu, 18 Feb 1999 20:25:16 +0000

Ulrich Eckhardt wrote:
> 
> A James Lewis wrote:
> >
> > Hi,
> >
> > The kernel logs as follows...
> >
> > Warning: possible SYN flood from 195.224.x.x on 195.224.x.x:8080.
> > Sending cookies.
> >
> > BUT, without a time reference... how does one determine who did it.....
> > I need to know exactly when it happened so I can check radius logs...
> >
> > James ([EMAIL PROTECTED])
> > Vortex Internet
> > My operating system unders~1 long filena~1, and yours?
> 
> Hi,
> 
> normaly this should also be logged via syslog in the "normal" logs
> including a timestamp.
> 
> Probably check your setup of syslogd .
> 

I have this in syslog for this morning, but I have control of the
machine referenced in the logs, and it was not doing anything at the
time in question. Other than someone spoofing, what could account for
this?

------------------------------

From: "Calvin Mitchell" <[EMAIL PROTECTED]>
Subject: Re: kernel 2.2.1 & sound on laptop
Date: Thu, 18 Feb 1999 08:21:13 -0000

OK... I ran the command and identified the undefined symbols...

now what??

Calvin Mitchell, IS Operations Mgr.
Makoff R&D Laboratories, Inc.
http://www.rndlabs.com
mailto:[EMAIL PROTECTED]
http://home.pacbell.net/cal_mitc
mailto:[EMAIL PROTECTED]

Aki M Laukkanen wrote in message ...
>Anyway you might want to do this in a root shell:
>depmod -ave
>
>And look closely for any undefined symbols.
>




------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to