Linux-Development-Sys Digest #112, Volume #8     Wed, 30 Aug 00 11:13:14 EDT

Contents:
  Re: Linux Performance Monitoring ([EMAIL PROTECTED])
  Re: open a file in kernel space ("Z")
  Re: open a file in kernel space (Thomas Schwere)
  Detecting applications faults (Rosimildo da Silva)
  Linux/unix programs  6082 ([EMAIL PROTECTED])
  Re: Detecting applications faults (Michel Talon)
  Re: open a file in kernel space ("Andy Jeffries")
  Re: Detecting applications faults (Rosimildo da Silva)
  Re: open a file in kernel space (Elizabeth Clarke)
  Re: Detecting applications faults (Michel Talon)
  moding buffers in twise in request block ("[EMAIL PROTECTED]")
  Linux tandem/double computer system? (Reinhard Moeller)
  Re: LARGE_FILE oddities ("Lawrence K. Chen, P.Eng.")
  Re: open a file in kernel space ("Andy Jeffries")
  Re: LARGE_FILE oddities (Andreas Jaeger)
  Re: Detecting applications faults (Josef Moellers)
  Re: Detecting applications faults (Mitch DSouza)
  Re: LARGE_FILE oddities ("Lawrence K. Chen, P.Eng.")
  HELP REQUEST - MPC860T Linux Development ("Jeff Gentry")
  Re: Detecting applications faults (Josef Moellers)

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

From: [EMAIL PROTECTED]
Subject: Re: Linux Performance Monitoring
Date: Wed, 30 Aug 2000 10:16:12 GMT

Kevin Lacquement <[EMAIL PROTECTED]> wrote:
> Mime-Version: 1.0
> Content-Type: text/plain; charset=iso-8859-2
> Content-Transfer-Encoding: base64

> So the post hit the 'net using base64 encoding, which is usually used
> for binary attachments.  I beleive that the proper way to post text is
> quoted-printable, which is what you're using, or unencoded, as
> Christopher is using.  This is, however, just from memory; the RFCs
> and/or experts should be consulted for a better answer.

I believe base64 is acceptable, if not prefered by everyone, for
foreign character sets. I would assume his newsreader would have
picked a different encoding for 8859-1.

-- 
Matt Gauthier <[EMAIL PROTECTED]>

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

From: "Z" <[EMAIL PROTECTED]>
Subject: Re: open a file in kernel space
Date: Wed, 30 Aug 2000 12:20:59 +0100

Once upon a while Thomas Schwere <[EMAIL PROTECTED]> wrote:

> Hi there
> 
> How can I open a file and read from it in kernel space?
> 
> Thanks,
> Thomas
>

The answer is, you don't!!!
There is no need to do this.
If you don't agree with my second statement, than write a
user space program and transfer data thru write or ioctl 
functions.


        Z
-- 
LISP is worth learning for the profound enlightenment experience you 
will have when you finally get it; that experience will make you a 
better programmer for the rest of your days.         Eric S. Raymond

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

Date: Wed, 30 Aug 2000 12:58:04 +0200
From: Thomas Schwere <[EMAIL PROTECTED]>
Subject: Re: open a file in kernel space

My device driver has to implement a function which configures a card.
The configuration data is stored in a file. The request to configure my
card comes from another module in the kernel space. There is no request
from the user space which could talk to the driver with the
ioctl-method.
How can I achieve this? How can I access the file data within the kernel
space?

Thanks
Thomas

Z wrote:

> Once upon a while Thomas Schwere <[EMAIL PROTECTED]> wrote:
>
> > Hi there
> >
> > How can I open a file and read from it in kernel space?
> >
> > Thanks,
> > Thomas
> >
>
> The answer is, you don't!!!
> There is no need to do this.
> If you don't agree with my second statement, than write a
> user space program and transfer data thru write or ioctl
> functions.
>
>         Z
> --
> LISP is worth learning for the profound enlightenment experience you
> will have when you finally get it; that experience will make you a
> better programmer for the rest of your days.         Eric S. Raymond

--
                                           //\\\\
                                           | ~ ~ |
                                          (  O O  )
___________________________________oOOo______( )_____oOOo_______

 Thomas Schwere                 Phone:  +41 1 445 16 61
 Supercomputing Systems AG      Fax:    +41 1 445 16 10
 Technoparkstrasse 1            Url:    www.scs.ch
 CH-8005 Zurich                 Email:  [EMAIL PROTECTED]
 Switzerland
                                                   Oooo
_________________________________________oooO______(  )_________
                                         (  )       ) /
                                          \ (      (_/
                                           \_)



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

From: Rosimildo da Silva <[EMAIL PROTECTED]>
Subject: Detecting applications faults
Date: Wed, 30 Aug 2000 11:06:27 GMT

Hi,

Is there any mechanism under Linux to detect when an
application, Daemon, etc that caused a core dump.


Windows NT has a mechanism called "Application Error Debug"
that automatically calls a debug to handle the crash.
The default one installed is "Dr Watson". 


Is there anything similar under Linux ?


Regards,
-- 
Rosimildo da Silva            [EMAIL PROTECTED] 
ConnectTel, Inc.              Austin, TX -- USA      
Phone : 512-338-1111          Fax : 512-918-0449     
Mobile: 512-632-7579                                 
Company Page: http://www.connecttel.com              
Home Page: http://members.xoom.com/rosimildo/

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

From: [EMAIL PROTECTED]
Subject: Linux/unix programs  6082
Date: 30 Aug 2000 11:45:45 GMT

mailto:[EMAIL PROTECTED]

I sell

Slackware Linux 7.1 (support for udma 66)
Mandrake Linux 7.1 (support for UDMA 66)
FreeBSD 4.1
Debian 2.2
Linux & Unix Books CD ( 88 books in html format)
SuSE Linux 6.4 (kernel 2.2.14) 6 CDs ( support ultra ata 66)
SuSE Linux 6.4 for ALPHA (kernel 2.2.14) 5 CD-ova
Slackware 7.0 (kernel 2.2.13)
Red Hat 6.2 (kernel 2.2.14)
Corel Linux 1.0 (kernel 2.2.12)
Bonus: Corel Draw 3.5, Word Perfect 8.0 ...

Linux Software compilation
CD(audio/record):cdrecord,alsaplayer,blandeenc,cdda2wav,cdparanoia
                 III,demcd,freeamp, gtoaster, kmp, mp3tool, ripperX, 
                 xaudio, xmms
Games:           battalion, blackpenguin, quake2
Internet:        gnomeicu, licq, mail, Xdownloader, Xchat, apache, flash_linux,
                 netscape6
Baze:            mysql,Informix
Multimedia:      DJvuedit, gimp, imagick, Q-cad
Office:          lyx, linux-ar-4, WordPerfect8, cooledit, StarOffice 5.1
Utils:           wine, apsfilter, bzip, enlightenment, xscreensaver, AVP
                 WinLinux, XFree86 v.4 (download) and much more


and many other linux and windows programs ...

mailto:[EMAIL PROTECTED]




gginlfuhbiikrijd


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

From: Michel Talon <[EMAIL PROTECTED]>
Subject: Re: Detecting applications faults
Date: Wed, 30 Aug 2000 13:55:28 +0200

Rosimildo da Silva <[EMAIL PROTECTED]> wrote:
> Hi,

> Is there any mechanism under Linux to detect when an
> application, Daemon, etc that caused a core dump.


> Windows NT has a mechanism called "Application Error Debug"
> that automatically calls a debug to handle the crash.
> The default one installed is "Dr Watson". 

Dr. Watson sure is not as skilled as S. Holmes, because Windows error messages
are almost always bogus (i.e. everywhere except on a measure 0 set).

> Is there anything similar under Linux ?

As you said there is a coredump. Run file on it, will say to what program it
belongs. Run gdb on said executable and coredump will say you where it
crashed. If you have a program which runs wild you can also strace it to see
what are the system calls and where they fail.

> Regards,
> -- 
> Rosimildo da Silva            [EMAIL PROTECTED] 
> ConnectTel, Inc.              Austin, TX -- USA      
> Phone : 512-338-1111          Fax : 512-918-0449     
> Mobile: 512-632-7579                                 
> Company Page: http://www.connecttel.com              
> Home Page: http://members.xoom.com/rosimildo/

-- 
Michel Talon

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

From: "Andy Jeffries" <[EMAIL PROTECTED]>
Subject: Re: open a file in kernel space
Date: Wed, 30 Aug 2000 13:12:46 +0100

> How can I achieve this? How can I access the file data
> within the kernel space?

Have a look at the kHTTPd page (do a google.com search for it), it 
has a nice clear example of opening and reading from a file in Kernel
space.

Alternatively, have a look at the source code for BestCrypt for Linux
(www.jetico.sci.fi), it has an example of a userspace app passing in a
file descriptor and having the kernel module convert that to an inode
and use it.

Hope that helps (BTW, we are going to be trying to do this with 
Scramdisk for Linux....hence how I know of those two examples).


-- 
Andy Jeffries
Lead-developer of Scramdisk for Linux
Developer of original Scramdisk Delphi Component

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

From: Rosimildo da Silva <[EMAIL PROTECTED]>
Subject: Re: Detecting applications faults
Date: Wed, 30 Aug 2000 12:18:17 GMT

Michel Talon wrote:
> 
> Rosimildo da Silva <[EMAIL PROTECTED]> wrote:
> > Hi,
> 
> > Is there any mechanism under Linux to detect when an
> > application, Daemon, etc that caused a core dump.
> 
> > Windows NT has a mechanism called "Application Error Debug"
> > that automatically calls a debug to handle the crash.
> > The default one installed is "Dr Watson".
> 
> Dr. Watson sure is not as skilled as S. Holmes, because Windows error messages
> are almost always bogus (i.e. everywhere except on a measure 0 set).
> 
> > Is there anything similar under Linux ?
> 
> As you said there is a coredump. Run file on it, will say to what program it
> belongs. Run gdb on said executable and coredump will say you where it
> crashed. If you have a program which runs wild you can also strace it to see
> what are the system calls and where they fail.
> 

Michel, thanks for your reply.


But, I'd like to write an utility that detects that an application
crashed and sends a notification ( e-mail ) to some admin.

Is there any kernel function to nofity my application of a crash ?

Regards,
-- 
Rosimildo da Silva            [EMAIL PROTECTED] 
ConnectTel, Inc.              Austin, TX -- USA      
Phone : 512-338-1111          Fax : 512-918-0449     
Mobile: 512-632-7579                                 
Company Page: http://www.connecttel.com              
Home Page: http://members.xoom.com/rosimildo/

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

From: Elizabeth Clarke <[EMAIL PROTECTED]>
Subject: Re: open a file in kernel space
Date: 30 Aug 2000 13:42:36 +0000

Thomas Schwere <[EMAIL PROTECTED]> writes:

> My device driver has to implement a function which configures a card.
> The configuration data is stored in a file. The request to configure my
> card comes from another module in the kernel space. There is no request
> from the user space which could talk to the driver with the
> ioctl-method.
> How can I achieve this? How can I access the file data within the kernel
> space?

Just use open, read, close on it as you might in user-space. Don't try to use 
fopen, fread, etc because they dont exist.

Beth

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

From: Michel Talon <[EMAIL PROTECTED]>
Subject: Re: Detecting applications faults
Date: Wed, 30 Aug 2000 14:53:42 +0200

Rosimildo da Silva <[EMAIL PROTECTED]> wrote:
> Michel Talon wrote:
>> 
>> Rosimildo da Silva <[EMAIL PROTECTED]> wrote:
>> > Hi,
>> 
>> > Is there any mechanism under Linux to detect when an
>> > application, Daemon, etc that caused a core dump.
>> 
>> > Windows NT has a mechanism called "Application Error Debug"
>> > that automatically calls a debug to handle the crash.
>> > The default one installed is "Dr Watson".
>> 
>> Dr. Watson sure is not as skilled as S. Holmes, because Windows error messages
>> are almost always bogus (i.e. everywhere except on a measure 0 set).
>> 
>> > Is there anything similar under Linux ?
>> 
>> As you said there is a coredump. Run file on it, will say to what program it
>> belongs. Run gdb on said executable and coredump will say you where it
>> crashed. If you have a program which runs wild you can also strace it to see
>> what are the system calls and where they fail.
>> 

> Michel, thanks for your reply.


> But, I'd like to write an utility that detects that an application
> crashed and sends a notification ( e-mail ) to some admin.

> Is there any kernel function to nofity my application of a crash ?

I don't remember in Linux, but in FreeBSD as soon as a coredump occurs there
is a kernel message which can be logged with syslog (eventually to a distant
machine).


-- 
Michel Talon

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

From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: moding buffers in twise in request block
Date: Wed, 30 Aug 2000 15:05:48 +0200

Hi,

I'm writing a kernal block device driver.

In my request block,
when the command is read
    I put information into my buffer ( temporarily )
    I then modify this data to what it should be.

The problem with this is that the information I get out of my device if
the data that I put in first. (ie temporarily data)

I must use the temp data buffer because i need a user space buffer.

I'm reading from a file in my read request to,
does this mean that I can't disable interrupts.

PLEASE help

Thanks,
Richard.


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

From: Reinhard Moeller <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Linux tandem/double computer system?
Date: Wed, 30 Aug 2000 14:59:13 +0200
Reply-To: [EMAIL PROTECTED]

Hello,

I am interested if there is somebody who connected two similar
Linux computers in order to have a failsafe system.
Is there recommendable literature? Commercial products?
Links?

Help is greatly appreciated.

        Reinhard Moeller

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
           PD Dr. Reinhard Moeller             Fuhlrottstr. 10
           University of Wuppertal             42119 Wuppertal 
           Dept. of Electrical Engineering     F.R.G
           Graphics and Simulation Group       Tel. +202-439-3042
           e-mail: [EMAIL PROTECTED]      Fax. +202-439-2944
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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

From: "Lawrence K. Chen, P.Eng." <[EMAIL PROTECTED]>
Subject: Re: LARGE_FILE oddities
Date: Wed, 30 Aug 2000 09:31:38 -0400



"Lawrence K. Chen, P.Eng." wrote:
> 
> I was experimenting to see what kind of errors (errno) that I would get if I
> tried to exceed 2GB using 32bit file I/O.  Since we're planning to let our
> betatest version go out where internally it could access 8GB files, but the
> file API is only 32bit.  (fcntl support for F_SETLK64/F_GETLK64 is missing,
> and what is defined makes it broken....which prevents our app for working on
> current releases of RedHat & SuSE).
> 

Okay, did some more investigation into this oddity.

F_SETLK64/F_GETLK64 are defined on RedHat 6.2 (2.2.14), but are not defined
for SuSE 6.4 (2.2.14).

Guess it shows the deviations even in the same kernel release.

I guess glibc took the low road, and went with not having it available on any.

RedHat is interesting in that fcntl_setlk/fcntl_getlk copy the flock struct
into a flock64 struct and do the equivalent of fcntl_setlk64/fcntl_getlk64.

Hopefully my workaround will work....by using just the 32bit flock structure. 
Since the application only locks one of two regions in a file.  Just the first
page or the second page to the end of file. [0,PAGESIZE] or [PAGESIZE,0].


-- 
Snail: Lawrence K. Chen             Email: [EMAIL PROTECTED] 
       4411 Camden Circle           URL 1: http://www.bigfoot.com/~TheDreamer/ 
       Dublin, OH 43016-3553        URL 2: http://members.xoom.com/TheDreamer/ 
Phone: 614-791-2130                   Fax: 614-792-7544           ICQ: 5235156

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

From: "Andy Jeffries" <[EMAIL PROTECTED]>
Subject: Re: open a file in kernel space
Date: Wed, 30 Aug 2000 14:37:52 +0100

> Just use open, read, close on it as you might in user-space. Don't try
> to use  fopen, fread, etc because they dont exist.

Are you sure this works OK?  It's just that I have examined the Bestcrypt
source code (because it does something damn similar to what we are
wanting to do) and have had a conversation with Dick Johnson (Kernel
Developer) and it didn't seem to be that easy.

Although that might have been what the kHTTPd example does.  Just to
confirm, ARE YOU SURE?!  If you are, thank you a million times, you 
have just made our project about 50 times easier!!!!


-- 
Andy Jeffries
Lead-developer of Scramdisk for Linux
Developer of original Scramdisk Delphi Component

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

From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: LARGE_FILE oddities
Date: 30 Aug 2000 15:58:20 +0200

>>>>> Lawrence K Chen, P Eng writes:

 > "Lawrence K. Chen, P.Eng." wrote:
>> 
>> I was experimenting to see what kind of errors (errno) that I would get if I
>> tried to exceed 2GB using 32bit file I/O.  Since we're planning to let our
>> betatest version go out where internally it could access 8GB files, but the
>> file API is only 32bit.  (fcntl support for F_SETLK64/F_GETLK64 is missing,
>> and what is defined makes it broken....which prevents our app for working on
>> current releases of RedHat & SuSE).
>> 

Support for F_SETLK64/F_GETLK64 will be in Linux 2.4.0 final (it got
introduced in 2.4.0test7).  F_SETLK64 is a new constant and this needs
support in glibc which you'll only find in glibc 2.2 (which isn't
available yet either).

 > Okay, did some more investigation into this oddity.

 > F_SETLK64/F_GETLK64 are defined on RedHat 6.2 (2.2.14), but are not defined
 > for SuSE 6.4 (2.2.14).

 > Guess it shows the deviations even in the same kernel release.
It's not defined in the official 2.2.x at all.  RedHat has ported the
LFS kernel patches - SuSE has done something similiar for SuSE 7.0.

 > I guess glibc took the low road, and went with not having it available on any.

 > RedHat is interesting in that fcntl_setlk/fcntl_getlk copy the flock struct
 > into a flock64 struct and do the equivalent of fcntl_setlk64/fcntl_getlk64.
This is solved differently in the glibc/kernel development versions.

 > Hopefully my workaround will work....by using just the 32bit flock structure. 
 > Since the application only locks one of two regions in a file.  Just the first
 > page or the second page to the end of file. [0,PAGESIZE] or [PAGESIZE,0].

This will not work, forget it.  Wait for kernel 2.4.0 and glibc 2.2 if
you need file locking on large files.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs [EMAIL PROTECTED]
   private [EMAIL PROTECTED]
    http://www.suse.de/~aj

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Detecting applications faults
Date: Wed, 30 Aug 2000 16:36:16 +0200

Michel Talon wrote:
> =

> Rosimildo da Silva <[EMAIL PROTECTED]> wrote:
> > Michel Talon wrote:
> >>
> >> Rosimildo da Silva <[EMAIL PROTECTED]> wrote:
> >> > Hi,
> >>
> >> > Is there any mechanism under Linux to detect when an
> >> > application, Daemon, etc that caused a core dump.
> >>
> >> > Windows NT has a mechanism called "Application Error Debug"
> >> > that automatically calls a debug to handle the crash.
> >> > The default one installed is "Dr Watson".
> >>
> >> Dr. Watson sure is not as skilled as S. Holmes, because Windows erro=
r messages
> >> are almost always bogus (i.e. everywhere except on a measure 0 set).=

> >>
> >> > Is there anything similar under Linux ?
> >>
> >> As you said there is a coredump. Run file on it, will say to what pr=
ogram it
> >> belongs. Run gdb on said executable and coredump will say you where =
it
> >> crashed. If you have a program which runs wild you can also strace i=
t to see
> >> what are the system calls and where they fail.
> >>
> =

> > Michel, thanks for your reply.
> =

> > But, I'd like to write an utility that detects that an application
> > crashed and sends a notification ( e-mail ) to some admin.
> =

> > Is there any kernel function to nofity my application of a crash ?
> =

> I don't remember in Linux, but in FreeBSD as soon as a coredump occurs =
there
> is a kernel message which can be logged with syslog (eventually to a di=
stant
> machine).

What you can also do is to write a small application that periodically
checks the /proc filesystem to see whether a given process still exists,
e.g.

while :
do if [ -d /proc/$PID ]; then sleep 5; continue; fi
   echo "Process $PID has died" | mail root
   break
done

It won't tell you that a core file was written, though.
-- =

Josef M=F6llers (Pinguinpfleger bei FSC)

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

From: Mitch DSouza <[EMAIL PROTECTED]>
Subject: Re: Detecting applications faults
Date: Wed, 30 Aug 2000 18:30:03 +0400

Rosimildo da Silva wrote:
> 
> Hi,
> 
> Is there any mechanism under Linux to detect when an
> application, Daemon, etc that caused a core dump.
> 
> Windows NT has a mechanism called "Application Error Debug"
> that automatically calls a debug to handle the crash.
> The default one installed is "Dr Watson".
> 
> Is there anything similar under Linux ?
> 

man trap (assuming ksh/bash)


For eg.

$  trap ls SIGINT 
<I press Control-C here>
$ _wxdialuptest15159.046  lpq.000947e2            nsform39ACAB06DBD670C


Where i pressed Control-C the shell trapped it and ran the command 'ls'

Of course you can get it to do anything you want, log to system logs, email,
etc...

Dave.

Ps. The SIGNAL for coredump is SIGSEGV

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

From: "Lawrence K. Chen, P.Eng." <[EMAIL PROTECTED]>
Subject: Re: LARGE_FILE oddities
Date: Wed, 30 Aug 2000 10:43:57 -0400



Andreas Jaeger wrote:
> 
> >>>>> Lawrence K Chen, P Eng writes:
> 
>  > Okay, did some more investigation into this oddity.
> 
>  > F_SETLK64/F_GETLK64 are defined on RedHat 6.2 (2.2.14), but are not defined
>  > for SuSE 6.4 (2.2.14).
> 
>  > Guess it shows the deviations even in the same kernel release.
> It's not defined in the official 2.2.x at all.  RedHat has ported the
> LFS kernel patches - SuSE has done something similiar for SuSE 7.0.
> 
Took a closer look at the RedHat....and it wasn't a pure RedHat 6.2 system
either.  Its a DELL RedHat6.2 system.....which is 2.2.14-6.1.1 instead of the
2.2.14-5.0 that comes off of the RedHat 6.2 CD.
> 
>  > Hopefully my workaround will work....by using just the 32bit flock structure.
>  > Since the application only locks one of two regions in a file.  Just the first
>  > page or the second page to the end of file. [0,PAGESIZE] or [PAGESIZE,0].
> 
> This will not work, forget it.  Wait for kernel 2.4.0 and glibc 2.2 if
> you need file locking on large files.
> 
Okay....I guess since our product is a beta....it'll just be one of the known
'features' that if they run the LFS version, they get no locking or run the
regular version to get locking (and the regular version doesn't run on SuSE). 
Though I hear most of the interest for beta testing is coming from German
customers, and they want SuSE.....

Though I'll probably kick of another build without LFS, but will run on SuSE.

-- 
Snail: Lawrence K. Chen             Email: [EMAIL PROTECTED] 
       4411 Camden Circle           URL 1: http://www.bigfoot.com/~TheDreamer/ 
       Dublin, OH 43016-3553        URL 2: http://members.xoom.com/TheDreamer/ 
Phone: 614-791-2130                   Fax: 614-792-7544           ICQ: 5235156

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

From: "Jeff Gentry" <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux.corel,alt.os.linux.mandrake,alt.os.linux.slackware,comp.os.linux.advocacy,comp.os.linux.m68k,comp.os.linux.powerpc
Subject: HELP REQUEST - MPC860T Linux Development
Date: Wed, 30 Aug 2000 14:47:26 GMT

I am working on a new development effort based on
the Motorola MPC860T PowerQUICC. I want to use
embedded Linux with hard real-time capabilities. I would
also like it to be based on a distribution that will support
the internal Ethernet physical layer on the chip. I will need
cross development tools since my host runs
Windows 95/98/NT and the target will be a
Motorola FADS board.

I've searched a lot of sites and read a lot of documentation
over the last week. If anyone has a suggestion or is working
on a similar development I would appreciate the feedback.

Thanks,

Linux Newbie





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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Detecting applications faults
Date: Wed, 30 Aug 2000 17:02:20 +0200

Mitch DSouza wrote:
> =

> Rosimildo da Silva wrote:
> >
> > Hi,
> >
> > Is there any mechanism under Linux to detect when an
> > application, Daemon, etc that caused a core dump.
> >
> > Windows NT has a mechanism called "Application Error Debug"
> > that automatically calls a debug to handle the crash.
> > The default one installed is "Dr Watson".
> >
> > Is there anything similar under Linux ?
> >
> =

> man trap (assuming ksh/bash)
> =

> For eg.
> =

> $  trap ls SIGINT
> <I press Control-C here>
> $ _wxdialuptest15159.046  lpq.000947e2            nsform39ACAB06DBD670C=

> =

> Where i pressed Control-C the shell trapped it and ran the command 'ls'=

> =

> Of course you can get it to do anything you want, log to system logs, e=
mail,
> etc...

Your technique only applies to a shell.
I guess, what Rosimildo is after is a technique to supervise any
application, not necessarily the ones he has written himself.

> Dave.
> =

> Ps. The SIGNAL for coredump is SIGSEGV

There is no "SIGNAL for coredump". There are signals (e.g. SIGABRT,
SIGFPE, SIGSEGV, SIGTRAP, SIGIOT) which will generate a core dump if not
caught or ignored. See signal(7) for details.

What you might do is write a wrapper around an application you'd like to
monitor which forks and execs the application and waits for the
application to finish. It then picks up the exitstatus (using wait(2))
and analyses the exitstatus. I can vaguely remember that the exitstatus
contains a flag which indicates whether a core dump was written or not.
Unfortunately, I cannot find this. Perhaps others can fill in.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)

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


** 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