Find the answer to your Linux question:
Results 1 to 5 of 5
Hello all i dont have much knowledge about traplog under /var/log traplog is getting generated . what for this traplog ? can anyone suggest any site from where i can ...
  1. #1
    Just Joined!
    Join Date
    Dec 2010
    Location
    India
    Posts
    45

    traplog info

    Hello all
    i dont have much knowledge about traplog

    under /var/log traplog is getting generated .
    what for this traplog ? can anyone suggest any site from where i can get info about generation of traplog . I searched in the net but unable to find any relevant thing.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    You running any sort of snmp? They can be configured to create a traplog. What is in the file?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Dec 2010
    Location
    India
    Posts
    45
    i am getting traplogs when passing sigbus signal

    in my code i have done SIGBUS signal handling.

    void
    sigHandle(int xx)
    {
    switch(xx)
    {
    case SIGHUP:
    printf("sighup");
    //code --
    break;
    case SIGINT:
    printf("sigint");
    case SIGQUIT:
    printf("sigquit");
    case SIGBUS:
    printf("sigbus");
    case SIGTERM:
    printf("sigterm");
    //code --
    break;
    default:
    break;
    }
    now inside my main function i have defined a signal handler

    struct sigaction sa;
    sa.sa_handler = sigHandle;
    if(sigaction(SIGBUS, &sa, NULL) != 0)
    {
    //print message
    }
    similarly for othersignals


    the code is not generating trap for other signals but particularly for sigbus signal it is generatin trap . ?

    Is there any specific way by which i have to do signal handling for SIGBUS ??

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    check the trap file to see what is being written to it. It might be the information from your code.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  5. #5
    Just Joined!
    Join Date
    Dec 2010
    Location
    India
    Posts
    45
    as per the designlogs and trap logs

    when i am sending SIGINT signal it it is passing thru all the cases and ends with sigterm(as break is there at teh end of sigterm) , similarly for other signal but the trap is mainly occurring when we pass SIGBUS signal.

    date:time: process:EE: fault.c(152): 9486:9486: Generating TRAPINFO for: pid=9486[process name], tid=9486[process], sig=7
    SIGBUS is defined as Sig 7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...