Linux-Development-Sys Digest #428, Volume #8     Thu, 18 Jan 01 13:13:12 EST

Contents:
  [Q] Question for utmp and netatalk ("Kang, Munsik")
  measuring time ("frederik")
  Problem on Linux 2.4.0 kernel and ALSA sound driver. (Bo-kyun Na)
  Debugging "outb" and "inb" ([EMAIL PROTECTED])
  Why making netfilter moduls fails in 2.4.0 kernel   ("Robert")
  daemon function behavior change (Dominique Fober)
  Re: Debugging "outb" and "inb" (Josef Moellers)
  Re: 2.2.18 & USB Does It or Doesn't It ("mpierce")
  Re: New protocol ("Morten B�hmer")
  Development tools (david lindauer)
  initrd problem (Mats Liljegren)
  Re: measuring time ("H Brett Bolen")
  Re: measuring time (Josef Moellers)
  Re: measuring time (Kasper Dupont)
  module make install fails after 2.4 kernel update - help ("Sean Bose")
  Re: Why making netfilter moduls fails in 2.4.0 kernel (Mike Dowling)
  Help w/ Amptron MB/C-Media 8738 sound ([EMAIL PROTECTED])

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

From: "Kang, Munsik" <[EMAIL PROTECTED]>
Subject: [Q] Question for utmp and netatalk
Date: Thu, 18 Jan 2001 17:25:33 +0900

Hi~~

I have a Linux box used as File Server with several Wintel and mac machines.

I use samba 2.0.7 (configured with options : --with-netatalk, --with-utmp)
and netatalk

I would like to handle the "currently connected user list" from utmp.

I can insert smb users information to utmp by configuring Samba with
"--with-utmp"

so, it is possible to get local user and smb user's information from utmp.

And Now, I would like know the way of including "currently connected apple
user" in utmp

Could you tell me how I can do that?

Thaks very much for helpers.

Kang, Munsik
================================
Kang, Munsik
[EMAIL PROTECTED]




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

From: "frederik" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: measuring time
Date: Thu, 18 Jan 2001 10:22:18 +0100

Hello,

Does anyone know how it is possible to measure the execution time of a
certain part of a program (function, procedure, ....). I tried
gettimeofday() but this seems to have a rather big overhead and this also
has a big resolution (1ms).
Are there any ways to perform a more accurate measurement with little
overhead?
I am using SuSe Linux v6.4.

Thanks,

Frederik De Backer
student University of Ghent,
Belgium.



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

From: Bo-kyun Na <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel,linux.dev.sound
Subject: Problem on Linux 2.4.0 kernel and ALSA sound driver.
Date: Thu, 18 Jan 2001 19:22:02 +0900

This is a multi-part message in MIME format.
==============F90E642A4F2E2AAFA4FCC8D6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,
I have a probem with ALSA with linux kernel 2.4.0.
I know some people have already posted this problem.
However, I could not find the proper answer.

In my case, I installed it with proper following the steps.
But sound does not comes out.

Any idea?
What is the correct way to install on kernel 2.4.0?

Thank you,
bkna

==============F90E642A4F2E2AAFA4FCC8D6
Content-Type: text/x-vcard; charset=us-ascii;
 name="bkna.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Bo-kyun Na
Content-Disposition: attachment;
 filename="bkna.vcf"

begin:vcard 
n:Na;Bo-kyun
tel;cell:+82-11-9944-2946
tel;fax:+82-2-3444-2169
tel;work:+82-2-542-8828
x-mozilla-html:FALSE
org:Research Center;iTechSolution Inc.
version:2.1
email;internet:[EMAIL PROTECTED]
title:Director
adr;quoted-printable:;;4FL Samwon BLD=0D=0A210-1 
Nonhyun-dong=0D=0AKangnam-gu;Seoul;;135-010;Korea
fn:Bo-kyun Na, Ph.D.
end:vcard

==============F90E642A4F2E2AAFA4FCC8D6==


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

From: [EMAIL PROTECTED]
Subject: Debugging "outb" and "inb"
Date: Thu, 18 Jan 2001 10:29:53 GMT

Hi,

I'm writing an user-process that uses sentences like "outb" and "inb",
how can I debug it? I've tried with gdb, but it can't execute the code
"step by step" when it reaches the outb and inb sentences.

Thanks in advance,

        Jose Luis Ayala


Sent via Deja.com
http://www.deja.com/

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

From: "Robert" <[EMAIL PROTECTED]>
Subject: Why making netfilter moduls fails in 2.4.0 kernel  
Date: Thu, 18 Jan 2001 10:57:10 GMT

Hello every body

I have the old kernel 2.2.15 and want to compile the new kernel. I want to
make and load  the Netfilter and Iptable as a module to the new kernel. But
I am getting errors saying :

************************

make -C ipv4/netfilter modules

make[2]: Entering directory `/usr/src/linux/net/ipv4/netfilter'

ld -m elf_i386 -r -o ip_conntrack.o ip_conntrack_standalone.o
ip_conntrack_core.

o ip_conntrack_proto_generic.o ip_conntrack_proto_tcp.o
ip_conntrack_proto_udp.o

 ip_conntrack_proto_icmp.o

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fom
it-f

rame-pointer -fno-strict-aliasing -pipe  -march=i686 -DMODULE -DMODVERSIONS
-inc

lude /usr/src/linux/include/linux/modversions.h   -c -o ip_nat_ftp.o
ip_nat_ftp.

c

ip_nat_ftp.c: In function `help':

ip_nat_ftp.c:315: structure has no member named `nat'

make[2]: *** [ip_nat_ftp.o] Error 1

make[2]: Leaving directory `/usr/src/linux/net/ipv4/netfilter'

make[1]: *** [_modsubdir_ipv4/netfilter] Error 2

make[1]: Leaving directory `/usr/src/linux/net'

make: *** [_mod_net] Error 2

*************

I don't know why I am getting this error, since the file (ip_nat_ftp.c )
exist in linux library. Please help if you know what is wrong or what I
should change in make files.

Thank you very much   Robert






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

From: [EMAIL PROTECTED] (Dominique Fober)
Subject: daemon function behavior change
Date: Thu, 18 Jan 2001 12:01:52 +0100


I'm using the daemon() function to put a server application in daemon mode.
This application runs correctly on linux 2.2.15-4mdk or 2.2.17-21mdk 
but it has a strange behavior on linux 2.2.13-7mdk :
once initialized the server consists in 6 different threads
it also logs its messages to a file
on linux 2.2.13-7mdk, the server never log any message and only 3 threads
are running which results in unconsistent services.

Any help to explain this behavior change would be greatly appreciated.
Thanks
Dominique Fober  <[EMAIL PROTECTED]>

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Debugging "outb" and "inb"
Date: Thu, 18 Jan 2001 12:17:24 +0100

[EMAIL PROTECTED] wrote:
> =

> Hi,
> =

> I'm writing an user-process that uses sentences like "outb" and "inb",
> how can I debug it? I've tried with gdb, but it can't execute the code
> "step by step" when it reaches the outb and inb sentences.

Here's a lttle trick I had to resort to when debugging MIPS programs
that used instructions the debugger didn't know: Put a breakpoint just
behind that instruction (with Intel CPUs you'll have to have an
instruction set manual to find out how long the instruction you want to
step over is) and continue execution. That way gdb doesn't really have
to know the instruction.

Don't know if this works with gdb, though.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T.  Pratchett)

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

From: "mpierce" <[EMAIL PROTECTED]>
Subject: Re: 2.2.18 & USB Does It or Doesn't It
Date: 18 Jan 2001 06:53:07 -0600

What happens if you're a northern Ohio yank living in Australia and
you've got a fair dinkum accent?

I've got 2.4.0 working for the zip and cdrw; now if I can get it to work
with ADSL and PPP.

Thanks
Marvin
In article <[EMAIL PROTECTED]>, "Clifford Kite"
<[EMAIL PROTECTED]> wrote:

> Jerry Segers, Jr. <[EMAIL PROTECTED]> wrote:
> 
>> This is because, as I understand it, USB was developed for 2.4 kernels
>> and back ported to 2.2.x in 2.4, they rewrote the scsi bits so the usb
>> backport talks with a texas accent which offends the 2.2.18 scsi
>> driver. all joking aside, usb is supported, usb filesystems are not. if
>> you want to use your zip, either take it out of it's case and hook it
>> in with an ide cable or upgrade to 2.4 (I'd chose the former if you're
>> interested.)
> 
> Waell now, I opted for 2.4.0 since there seemed to no way for me to
> adapt the camera to IDE, but then you must also talk to hardware with a
> Georgia peach accent.  Everyone knows that's the best accent to use for
> hardware. ;)
> 
> -- Clifford Kite <kite@inet%port.com>             Not a guru. (tm)
> /* All the world's a net!  And all the data in it merely packets
>    come to store-and-forward in the queues a while and then are heard no
>    more.  'Tis a network waiting to be switched!
>            -Vint Cerf, RFC 1121 */

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

From: "Morten B�hmer" <[EMAIL PROTECTED]>
Subject: Re: New protocol
Date: Thu, 18 Jan 2001 14:31:12 +0100

I have made some protocols myself, but I'm not very happy about the
implementation. If you get ant information on this
please post it here.

Thank you

--
Med vennlig hilsen/Best Regards,
Morten B�hmer - [EMAIL PROTECTED]
AdCo Partner AS
Bjellandveien 14 - 3172 VEAR
[EMAIL PROTECTED]
http://www.veggers.no
"hebre" <[EMAIL PROTECTED]> wrote in message
news:9440ie$248h$[EMAIL PROTECTED]...
>
> > hebre wrote:
> > >
> > > Does anybody know how write some protocol to use it with Sockets.
> > > I want to use SSL with standard Sockets API. This protocol sould be
over
> > > TCP/IP.
> > >
> > > If You'll put here some links, I'll happy.
> > >
> > > Thanks.
> >
> > First of all a protocol build on top if TCP/IP
> > is best implemented in user space. That is either
> > in program or shared library.
>
> I know, but it's a technical requirements to make it transparent. :(
> >
> > You can probably find a library implementing SSL,
> > if you can it will save you lots of work.
> >
> > The following man pages contains relevant
> > information:
> >
> > socket(2), accept(2), bind(2), connect(2),
> > gethostbyname(3)
> >
> > If you want to implement SSL you will also have
> > to find documentation on that protocol.
> >
> > If you want I can post some code examples using
> > sockets. And perhaps also a reference for
> > documentation on the SSL protocol.
> >
>
> No, thanks.  I have OpenSSL sources. And it is not a big problem to write
my
> own SSL code . I want make SSL using as flexible as possible. External
> libraries is not well. As I see, only new protocol layer over TCP/IP is a
> good implementation.
> But I have no documentation which describes creating such layer. It is not
> concerned to SSL directly. It's an abstract question: How do write some
> protocol, whch will be over TCP/IP and should  be used via Sockets API?
> > --
> > Kasper Dupont
>
> Paul Tanaskov.
>
>



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

Date: Thu, 18 Jan 2001 09:47:10 -0500
From: david lindauer <[EMAIL PROTECTED]>
Subject: Development tools

Hi,

    we are looking at embedding linux on a small circuit board (PC compatible)
and were wondering what types of development tools would be available.
Specifically we are looking for some type of GUI environment, preferably with
the debugger integrated with other tools but possibly with seperate tools and
debugger environments.

Thanks,

David


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

From: Mats Liljegren <[EMAIL PROTECTED]>
Subject: initrd problem
Date: Thu, 18 Jan 2001 16:26:59 +0100

Hi all,

I sent a question about an initrd problem I had without getting any
answers. If the reason for this is that I'm being in the wrong forum,
please let me know! Of course I'd like to know what forum is the right
one, in this case...

Here comes the question again:

I boot a 8MB 486 system using a floppy disk. This disk is formatted with
Minix file system, and uses Lilo as boot loader. It contains a kernel
image (no modules) and an initrd image.

The kernel starts ok, unpacks the initrd image and executes the initial
script (don't remember the name of it, is it /initrc?). It then says
it's mounting Minix file system /dev/ram as root followed by a panic
message saying it can't mount device 0x01 0x01. The initrd image is a
Minix file system.

Reading initrd.txt in the Documentation directory in the Linux kernel
source directory, I get the impression that using "root=/dev/ram"
(lilo), you would use initrd as root file system.

Apparently I'm doing something wrong, as the kernel tries to remount the
root file system.

So my question is, how do I make the initrd image my root file system?

Regards,
  Mats

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

From: "H Brett Bolen" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: measuring time
Date: Thu, 18 Jan 2001 15:14:10 GMT

http://boudicca.tux.org/mhonarc/ma-linux/2000-Feb/msg00361.html

I've used this in winnt, but not under linux.

It counts the cpu clocks -- my 800 mhz machine
returns 800704650 hertz.


Good luck.
b\375



"frederik" <[EMAIL PROTECTED]> wrote in message
news:946cnj$bd4$[EMAIL PROTECTED]...
> Hello,
>
> Does anyone know how it is possible to measure the execution time of a
> certain part of a program (function, procedure, ....). I tried
> gettimeofday() but this seems to have a rather big overhead and this also
> has a big resolution (1ms).
> Are there any ways to perform a more accurate measurement with little
> overhead?
> I am using SuSe Linux v6.4.
>
> Thanks,
>
> Frederik De Backer
> student University of Ghent,
> Belgium.
>
>



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

From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: measuring time
Date: Thu, 18 Jan 2001 16:50:45 +0100

frederik wrote:
> =

> Hello,
> =

> Does anyone know how it is possible to measure the execution time of a
> certain part of a program (function, procedure, ....). I tried
> gettimeofday() but this seems to have a rather big overhead and this al=
so
> has a big resolution (1ms).
> Are there any ways to perform a more accurate measurement with little
> overhead?
> I am using SuSe Linux v6.4.

If you have a PentiumPro or higher, you can use the TSC register. It
runs with full clock speed, so you need to know the clock frequency.

#include <stdio.h>

static __inline__ unsigned long long int rdtsc()
{
    unsigned long long int x;
    __asm__ volatile ("rdtsc" : "=3DA" (x));
    return x;
}

main()
{
    unsigned long long c, d, diff;
    d =3D (unsigned long long)0;

    printf("%lld\n", rdtsc());
}

Josef
-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T.  Pratchett)

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: measuring time
Date: Thu, 18 Jan 2001 16:00:17 +0000

This is a multi-part message in MIME format.

==============7EEE9ED370F1B3C390BFC91
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

frederik wrote:
> 
> Hello,
> 
> Does anyone know how it is possible to measure the execution time of a
> certain part of a program (function, procedure, ....). I tried
> gettimeofday() but this seems to have a rather big overhead and this also
> has a big resolution (1ms).
> Are there any ways to perform a more accurate measurement with little
> overhead?
> I am using SuSe Linux v6.4.
> 
> Thanks,
> 
> Frederik De Backer
> student University of Ghent,
> Belgium.

You can use the TSC if your CPU is equipped with one.
But gettimeofday() should also use the TSC to get a
resolution of 1us.

On my AMD K6/2 350MHz the overhead of calling
gettimeofday() is 320-7000 clock cycles, I think
it depends on state of cache.

The overhead of calling rdtscll is just 9 cycles.

I have attached an example program.

Notice that when using rdtscll() in userspace on
SMP machines you will not know from which CPU the
TSC value is read, and there can be some difference.

-- 
Kasper Dupont

==============7EEE9ED370F1B3C390BFC91
Content-Type: text/plain; charset=us-ascii; name="TSC.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="TSC.c"

#include <asm/msr.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

int main()
{
  long long tsc1,tsc2;
  struct timeval t;
  
  rdtscll(tsc1);
  rdtscll(tsc2);
  printf("TSC overhead %lld cycles\n",tsc2-tsc1);
  rdtscll(tsc1);
  gettimeofday(&t,NULL);
  rdtscll(tsc2);
  printf("gettimeofday overhead cold cache %lld cycles\n",tsc2-tsc1);
  gettimeofday(&t,NULL);
  gettimeofday(&t,NULL);
  rdtscll(tsc1);
  gettimeofday(&t,NULL);
  rdtscll(tsc2);
  printf("gettimeofday overhead hot cache %lld cycles\n",tsc2-tsc1);
  return 0;
}

==============7EEE9ED370F1B3C390BFC91==


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

From: "Sean Bose" <[EMAIL PROTECTED]>
Subject: module make install fails after 2.4 kernel update - help
Date: Thu, 18 Jan 2001 08:35:44 -0800

Hi Friends and Linux Pals
  I updated RedHat 7.0 to the 2.4.0 kernel by downloading and compiling the
kernel source from www.kernel.org   When I do a make install, the driver
modules fail to load, complaining that it cannot resolve symbols like
'call_func' and 'get_module_symbol'.  At this point, let me mention that I
do not have a 'lib/modules/2.4.0' directory and may be its because of this
that it is failing.
  Do you know from where we can find the set of required kernel modules for
kernel 2.4.0.  Are there any other components required to be added for
completeness of the kernel, for purpose of using it as a development system,
after we build it from the kernel source using 'make bzdisk' and boot up
from the floppy.

thanks for the wonderful warmth of the Linux community
  Sean Bose



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

From: [EMAIL PROTECTED] (Mike Dowling)
Subject: Re: Why making netfilter moduls fails in 2.4.0 kernel
Date: 18 Jan 2001 17:14:39 GMT

On Thu, 18 Jan 2001 10:57:10 GMT, Robert <[EMAIL PROTECTED]> wrote:
>ip_nat_ftp.c:315: structure has no member named `nat'

It's nothing to do with modules; I got this when including FTP protocol
support in the Netfilter Configuration directly in the kernel.  Try
including Full Nat support, and the kernel and modules will compile.

If developers are listening, I think that the documentation is somewhat
lacking here.

Can anybody explain why FTP has these special tracking problems?  I
presume that this "tracking" is intended for stateful iptables
firewalls.

Cheers,
Mike



-- 
My email address [EMAIL PROTECTED] above is a valid email
address.  It is a mail alias.  Once spammed, the alias is deleted, and
the integer 'N' incremented.  Currently, mike[42,43] are valid.  If
email to mikeN bounces, try mikeN+1.

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.misc,comp.os.linux.development
Subject: Help w/ Amptron MB/C-Media 8738 sound
Date: 18 Jan 2001 09:56:42 -0700

Hello, hoping someone can point me in the right direction here.

I have RedHat 7.0 (custom 2.2.18 kernel) running on an Amptron PM-598LMR
motherboard and AMD K6/2-500 processor.  The MB has onboard sound via the
C-Media CMI8738 chipset, and I have downloaded the cmpci-4.03 drivers from the
www.cmedia.com.tw website (which are newer than the cmpci-3.21 drivers on the
Amptron.com website).

I can't play .mid files because playmidi says it can't open the
/dev/sequencer.  I can, however, write directly to the /dev/midi? devices by
sending individual MIDI commands/notes.

Under Win998/ME I can play .mid files no problem -- but I noticed it's using
an "MPU-401 emulator" at I/O addr 0x300, which is also where I have the
address specified in the Linux sound module configuration.

Also, sndconfig plays the sound sample but doesn't even try to play the MIDI
sample (which I presume means it doesn't detect /dev/sequencer either).

Have I configured something wrong, or am I missing some software?  Will
installing ALSA fix my problem?

Any help appreciated, thanks.

-- 
Togath ([EMAIL PROTECTED])

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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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