Solaris 9 and trap signal handlers

I'm looking for a reliable means to trap signals on sub functions under ksh. I seem to get unreliable results while attempting to trap user signals via the kill command.
Specifics: I have a ksh script which autoloads several functions, one of which is a background function to display a sweeping character while the main process is executing. Depending on the exit status of the main process, I kill the background process with either USR1 (16) or USR2 (17) signal and depending on the signal, I display a success or fail message. However, most of the time, the background process is simply terminated without calling the trapped function, occasionally it does call the function, which is really confusing me, along with the fact that this code runs fine on AIX?!?!. Any suggestions would be appreciated!
THANKS!
Code:
function WAIT
trap 'Trap_Exit 0; exit 0' 16
trap 'Trap_Exit 1; exit 1' 17
<display code>
function Trap_Exit
if [[ $1 -eq 0 ]]; then
echo "`tput rc` Success"
else
echo "`tput rc` Failed"
fi
function Kill_WAIT
if [[ $1 -eq 0 ]]; then
kill -s USR1 $WPID
return 0
else
kill -s USR2 $WPID
return 1
fi
}

If your raid array is working and you have a recent version of raidctl installed it should show the following when type raidctl:
bash-2.05# raidctl
RAID RAID RAID Disk
Volume Status Disk Status
c1t0d0 OK c1t0d0 OK
c1t1d0 OK
bash-2.05#
(Note: this is from a V20z)
This would indicate that raid is working on the system. If it says anything else I've always assumed that the raid array is not working. I've see a few instances where setting up the raid array in the bios and then executing raidctl from command line didn't indicate a raid array at all. Turns out that the version of raidctl was old and needed patching on those systems or the system needed a restart for some reason or other.

Similar Messages

  • 10g Signal Handlers and Dynamic Binding Problems on Mac OS X

    I have the following env vars set up, and it seems the client libs show a deadl\
    ock behavior post installation. SqlPlus exhibits a similar problem with 10g cli\
    ent libs on the Mac, since it simply hangs for 20 secs before returning the pro\
    mpt. I have G4 10.3.4 Mac, and 3.3 (1640) gcc, and still haunted by this probl\
    em...
    ORACLE_HOME=/Users/Oracle/10g/orahome
    ORACLE=ORACLE_HOME/bin
    ORACLE_BASE=/Users/Oracle/10g
    DYLD_LIBRARY_PATH=/Users/Oracle/10g/orahome/lib
    a) ktrace sqlplus user/pass@db
    b) kdump -R | grep sigaction gives:
    885 sqlplus 5.877734 CALL sigaction(0x2,0xbffff500,0xbffff570)
    885 sqlplus 0.001252 RET sigaction 0
    885 sqlplus 0.002032 CALL sigaction(0xd,0xbfff90f0,0xbfff9160)
    885 sqlplus 0.001831 RET sigaction 0
    885 sqlplus 0.001293 CALL sigaction(0x12,0xbfffb6e0,0xbfffb750)
    885 sqlplus 0.001234 RET sigaction 0
    885 sqlplus 0.001551 CALL sigaction(0x12,0xbfffbda0,0xbfffbe10)
    885 sqlplus 0.001401 RET sigaction 0
    885 sqlplus 0.001331 CALL sigaction(0x2,0xbfffd090,0xbfffd100)
    885 sqlplus 0.001333 RET sigaction 0
    This shows a 5.9 sec delay for the first sigaction, and a full response is received some long 20 secs later on the prompt.
    Some feedback from engineering regarding this issue since the 9i release has been:
    "This is a known problem with signal handlers and the lazy binding we have on Mac OS X. A small change to how Oracle library's signal
    handler is installed using _signal_nobind(3) and
    _dyld_lookup_and_bind_fully(3) could help to solve this problem.
    The problem that we are trying to avoid is a possible dead lock from
    code that could be called in a signal handler when the thread that
    gets the signal is in the middle of lazy binding a symbol. So when a
    signal handlers installed the default action is to cause it to be
    bound fully. This is made very expensive by the mismatch of the
    interfaces to signal(3) and segvec(2) like routines which are passed
    an address and the dynamic linker that wants a global symbol name. So the end result is to call the routine _dyld_bind_fully_image_containing_address(3) with the address of the signal handler to be bound. Which binds everything in the image (in this case the Oracle shared library).
    We have had problems like this before. For example: [This is what is
    done in usleep(3)]
    usleep()
    /* code removed for this example */
    setvec(vec, sleepx);
    #ifdef __DYNAMIC__
    _dyld_lookup_and_bind_fully("_usleep", NULL, NULL);
    (void) _sigvec_nobind(SIGALRM, &vec, &ovec);
    #else
    (void) sigvec(SIGALRM, &vec, &ovec);
    #endif
    static void sleepx(int unused)
    ringring = 1;
    The use of _sigvec_nobind(2) (or _signal_nobind(3) ) and the use of
    _dyld_lookup_and_bind_fully(3) will cause just the needed symbols used by the signal handler. "
    It seems this issue hasn't been resolved in the most recent 10g client release.Can anyone shed some light one this issue?
    For better demonstration, here is a series of steps we took here:
    sigaction.c - C file produced by "proc sigaction.pc"
    sigaction.pc - ProC source file
    gcc_sig* - Shell script to compile sigaction.c
    ktrace.sigtest - raw ktrace output from running sigtest
    ktrace.sqlplus - raw ktrace output from running sqlplus
    kdump.sqlplus - output of kdump -R on ktrace.sqlplus
    kdump.sigtest - output of kdump -R on ktrace.sigtest
    sigaction.lis - auxiliary file produced by proc
    1. sigaction.pc:
    #include <stdio.h>
    #include <stdlib.h>
    #include "/Users/oracle/10g/orahome/precomp/public/sqlca.h"
    int main(int argc, char **argv) {
    char user[30], passwd[30], db[40];
    char con_str[100], date[10], *icp;
    strcpy(user, "XXXXXXXX");
    strcpy(passwd, "XXXXXXXX");
    strcpy(db, "db_name");
    sprintf(con_str,"%s/%s@%s",user,passwd,db);
    EXEC SQL CONNECT :con_str;
    EXEC SQL SELECT SYSDATE INTO :date FROM DUAL;
    printf("SYSTEM DATE = %s\n",date);
    EXEC SQL COMMIT RELEASE;
    2. gcc_sig:
    #!/bin/sh
    CFLAGS="-I$ORACLE_HOME/precomp/public -I/usr/include"
    CFLAGS="$CFLAGS -I$ORACLE_HOME/lib -L$ORACLE_HOME/lib"
    ORALIBS="-L$ORACLE_HOME/lib -lclntsh $ORACLE_HOME/lib/nautab.o $ORACLE_HOME/lib/naeet.o"
    CC="gcc -g"
    PROG=$1
    OUTPUT=$2
    $CC $CFLAGS $PROG -o $OUTPUT $ORALIBS
    3. Generate the rest of the output files for your viewing of the results based on the commands provided above.
    Thanks!

    It's a delay, not a deadlock, that originatesfrom the way Oracle
    libraries handle dymaic bindings.to "dynamic" bindings. Maybe prebinding could help ?
    export DYLD_PREBIND_DEBUG=1ronr@[email protected]:/Users/ronr
    sqlplus "/ as sysdba"dyld: sqlplus: prebinding disabled because library: /Users/oracle/product/server/10.1/lib/libsqlplus.dylib got slid
    dyld: in map_image() determined the system shared regions ARE used
    dyld: 2 two-level prebound libraries used out of 5
    Ronald
    http://homepage.mac.com/ik_zelf/oracle/

  • RunInstaller hangs on Solaris 8 and 8.1.7 install

    Hello,
    We have a new 220R Solaris 8 ( Generic_108528-13 ) box
    with the Oracle 8.1.7, the java installer comes up but
    during the install process it hangs. Usually at the eom.conf
    section ( about 75% complete). This is a Out of the Box
    configuration and I have installed successfully on other
    Solaris 8 and Oracle 8i builds, just not this one.
    Here's a partial truss that the jre cycles through every
    second or so:
    Received signal #14, SIGALRM, in lwp_sema_wait() [caught]
    lwp_sema_wait(0xFF16FA10) Err#91 ERESTART
    sigprocmask(SIG_SETMASK, 0xFEA0BDE4, 0x00000000) = 0
    lwp_sema_post(0xFAE71E30) = 0
    setitimer(ITIMER_REAL, 0xFEA0B730, 0x00000000) = 0
    lwp_sema_wait(0xFAE71E30) = 0
    sigprocmask(SIG_SETMASK, 0xFF17AD70, 0x00000000) = 0
    setcontext(0xFEA0B6C8)
    sigprocmask(SIG_BLOCK, 0xFF16FA00, 0x00000000) = 0
    setitimer(ITIMER_REAL, 0xFEA0BC68, 0x00000000) = 0
    sigprocmask(SIG_UNBLOCK, 0xFF16FA00, 0x00000000) = 0
    lwp_sema_post(0xFE0D1E30) = 0
    lwp_sema_wait(0xFE0D1E30) = 0
    lwp_sema_post(0xFF16FA10) = 0
    lwp_sema_wait(0xFF16FA10) = 0
    sigprocmask(SIG_BLOCK, 0xFF16FA00, 0x00000000) = 0
    setitimer(ITIMER_REAL, 0xFEA0BC68, 0x00000000) = 0
    sigprocmask(SIG_UNBLOCK, 0xFF16FA00, 0x00000000) = 0
    lwp_sema_post(0xFE171E30) = 0
    lwp_sema_wait(0xFE171E30) = 0
    write(16, " <02\00202 kFE u < k\002".., 1520) = 1520
    read(16, 0xFE170D90, 32) Err#11 EAGAIN
    Thanks

    fixed it,
    when I took out all PATH's ( setenv PATH .... ) it worked.
    Here is what I had had for a PATH list:
    setenv PATH /bin:/usr/bin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin:/usr/ucb
    setenv PATH ${PATH}:${ORACLE_HOME}/bin
    setenv PATH ${PATH}:.
    I'm guessing that the install was accessing a make from the wrong
    location. that's only a guess.... anyways I commented the all
    PATH variables out and the runInstaller worked/completed it task.
    Jay

  • Urgent: Child process closed admin channel on Solaris 9 and 6.1 SP5

    Hi
    I'm facing this issue on Solaris 9 and Sun AppServer 6.1 SP5, the appserver crashes for some reason and restarts itself. There doesnt seem to be any specific instance which leads to this error. I notice that if I leave my application running for a while I end up seeing this error and I need to kill the instance that was running and restart the server instance.
    This is what i see in the log files before the server restarts itself.
    " failure (12181): CORE3107: Child process closed admin channel"
    It seems like i'm not the only one seeing this issue:
    http://swforums.sun.com/jive/thread.jspa?threadID=55040&messageID=210473
    http://forum.sun.com/jive/thread.jspa?threadID=95718&messageID=328813
    Anybody knows what could be going on?
    Thanks

    After the corefile is written, use pstack on it. In the pstack file you a stacktrace of the crashing function. Alas, this information is only useful when you have the sources.
    Also, usually there are other, more specific lines in the errors logfile e.g.:
    [27/Jan/2006:07:38:55] catastrophe (15456): CORE3260: Server crash detected (signal SIGSEGV)
    [27/Jan/2006:07:38:55] info (15456): CORE3262: Crash occurred in function INTprepare_nsapi_thread from module /opt/SUNWwbsvr/bin/https/lib/libns-httpd40.so
    [27/Jan/2006:07:38:55] failure (15455): CORE3107: Child process closed admin channel
    If you post them, maybe somebody can give you a hint...

  • How to create snmp trap signal

    hello friends,
    I am going to create NMS tool for my wireless devices.
    We are using java for front end monitoring.
    For my project work, how can I create SNMP Trap signal.?
    Any examples is there.
    thank you.
    Rgds,
    ram

    There are many ways to modify the array to do what you want. One of my favorites is to use the "Insert Into Array" function. Just build an array of each waveform you wish to generate and arrays of 0 or NaN (depending on what you agilent device will accept) for the no signal gaps. Append them all together and you will have your arbitrary waveform for your generator.
    Kyle K.
    Product Manager for Product Data
    National Instruments

  • Wu-ftpd installable for solaris 10 and solaris 9

    Hi,
    I could see only "proftpd" is available http://www.sun.com/software/solaris/freeware
    But I am looking for the "wu-ftpd" server which is compatable with Solaris 9 and Solaris 10.
    Any one help me from where I can get the "wu-ftpd" installable for solaris 9 and solaris 10 sparc server.
    thanks,
    Amudha

    Hi Robert,
    Thanks for your reply.
    I too saw that the ftp version used in solaris 10 by default is wu-ftpd, but I am not sure about it, because when I tried to ftp to my solaris box the version it is started is not "FTP server (Version wu-2.6.2(5)".
    I have got the wu-ftpd installable. But I could not get the proper document for configuring the same.
    Question1: How to stop existing ftp service and start newly instlaled wu-ftpd in Solaris 9 and Solaris 10 servers?
    Earlier solaris 8 version I change the ftpd version in /etc/inetd.conf file and give HUP signal to inetd then this new wu-ftpd version will be used.
    Question 2: It always starts the system inbuilt ftp server and also I am getting ftp log in failure for any user which I add newly or even existing users.
    could any one help to resolve these issues? Thanks in advance for your help.
    Amdudha

  • I'm new to Solaris 10 and need help to setup ftp server

    hello!
    I just installed Solaris 10 and I'm trying to setup an ftp server (with ftpd) but I don't know how to do that
    my server doesn't need any security or authentication
    I'm looking for the default shared files directory
    Also wondering what to change in what configuration file...
    This OS looks quite similar to some linux I used before but the differencies are big enough to drive me crazy
    anyway thanks for your help.
    Any advice is welcome :-)

    cd /etc/ftpd
    vi ftpusers
    put a # in front of root and any other users that you wish to be able to ftp
    then svcadm restart ftp
    If you want to set up an anonymous ftp server, there is a little more involvement

  • My iPhone 4 with iOS 6 is making me start to hate Apple. Any App and at any time I open and I can not view it or move for more than 2 minutes, they close themselves. During connections, it also gives this problem and the signal disappears after a few seco

    My iPhone 4 with iOS 6 is making me start to hate Apple. Any App and at any time I open and I can not view it or move for more than 2 minutes, they close themselves. During connections, it also gives this problem and the signal disappears after a few seconds back but often the person on the other end has hung up ... I can not stand it anymore, someone suggests something?
    Besides these problems, there is the battery, which was bad got worse, she is not lasting more than 10 hours, even without using the phone.
    Sometimes it even seems that the problem was solved, but my joy did not last long after I celebrate all the problems return, is incredible ...
    thanks.
    Sorry my bad Inglês.

    Try a reset hold home/sleep buttons until Apple logo appears
    If that does not improve try a restore
    http://support.apple.com/kb/HT4137
    For your information
    We are NOT Apple here we are all users helping other users
    so emotion is ignored

  • My TV is mounted on a wall so I can't connect the Apple TV device. Is it possible to connect to an HD Cable Box and send signal to TV that way? Other problem is that Box only has one HDMI socket .. Help!

    My TV is mounted on a wall so I can't connect the Apple TV device. Is it possible to connect to an HD Cable Box and send signal to TV that way? Other problem is that Box only has one HDMI socket so would also have to use a splitter. Tried Apple Support but couldn't offer a solution. I can't be the only person with this issue surely?
    Help!

    No, unless you are using a home theatre system already, your only option is to connect to the TV.

  • How to find out the version of the SFK that is installed on Solaris 9 and 8

    On Solaris 8 and 9, I would I like to find out the version of the SFK and the leadville driver that is installed.
    Is it possible to find out this information ? Thanks.

    DatabaseMetaData.getDriverVersion()
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html#getDriverVersion()

  • Error on install of 125136-18 and 125137-18 on jdk-6u16 on Solaris 9 and 10

    We have jdk-6u16 installed on Solaris 9/10 (sparc and sparcv9). When trying to install the patches to update to 6u17 (125136-18 and 125137-18) the patches error with the following below, and leave SUNWj6cfg and SUNWj6rtx in I-Lock status.
    Any suggestions?
    # patchadd 125136-18
    Checking installed patches...
    Verifying sufficient filesystem capacity (dry run method)...
    Installing patch packages...
    Pkgadd failed. See /var/tmp/125136-18.log.5887 for details
    Patchadd is terminating.
    # cat 125136-18.log.5887
    /var/sadm/pkg/SUNWj6cfg/install/postinstall: /var/tmp/125136-18.SUNWj6cfg: does not exist
    pkgadd: ERROR: postinstall script did not complete successfully
    Installation of <SUNWj6cfg> failed.

    On Solaris 9, its state is either cpu0 or cpu1,
    depending on the time I call 'top'. Does that mean
    it is actually running on either cpu0 or cpu1?Should be.
    What
    is the difference between the 'cpu0' state and the
    'run' state?A thread can be sleeping (it doesn't have anything to do), or runnable. Although it's runnable, it doesn't mean that it's running right at that instant.
    Note that it's difficult to get a good view of the situation with 'top' (or almost any other program). Because whenever 'top' looks, 'top' will always be running, even though it's only running a fraction of the time.
    And does it mean all 4 threads are
    running/assigned to cpu0 (or cpu1)? No. Each thread is independently executed. But since you only have 2 processors, and since 'top' has to be running when it runs, you'll only ever see your process on at most one other cpu.
    You might want to use 'prstat' and 'prstat -L'. The first shows one line per process, the second one line per thread.
    On Solaris 10, the state shows 'cpu'. Does it mean
    it is running? And does it mean that each thread may
    run on a different CPU therefore the state does not
    show any particular CPU number? Is it correct that
    Solaris 9 assign the CPU on a per-process basis and
    Solaris 10 on a per-thread basis?I don't know exactly what top does or doesn't do. You might try 'prstat' instead.
    There is no difference at this level between Solaris 9 and 10. All will schedule on a per-thread basis.
    Darren

  • How do I install dual-boot Solaris 8 and Solaris 9 on one hard disk ?

    I tried to install Solaris 8 and Solaris 9 on same disk using CDs, but
    the second installation overwrote the first Solaris which was installed
    previoudly on the half-disk size partition of same disk.
    How do I install two Solarises on one hard disk ?
    Thanks
    Yakov

    There are no tricks to get Solaris to dual boot on the same drive. Just allocate and pick the free slices not used by the first Solaris install when you put in the second install. Technically speaking there is nothing preventing you from running seven separately bootable Solaris instances on the same drive (one of 8 available slices is overlap -- slice 2) provided you use a swap file on a root partition instead of reserving a whole slice for swap.

  • I cannot connect to internet eevnthough i have wifi,when im trying to login on FB it says unable to connect and same with YM it saysinternet connections appears to be offline,when in fact the WIFI smartbro is connected,and the signal is very strong...

    my itouch cannot connect to internet...but the other day i can use the wifi im connected,but since yesterday eventhough im connected to wifi and the signal is very strong,when im trying to login on FB it says unable to connect to FB,same with YM it says internet connection is offline when in fact i have a strong signal of wifi..

    - Reset the iPod. Nothing is lost
    - Power off and then back on the router
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - iOS: Recommended settings for Wi-Fi routers and access points
    Do other devices successfully connect to the network?
    Does the iPod successfully connect to other networks?

  • How to output the digital clock and synchronization signal from the NI USB-6211

    Hello,
    I need to connect the NI USB-6211 to control a digital to analog convertor chip (AD5541). However, this chip requires three input signals :1) Clock input, 2) Logic input or a synchronization signal  and 3) Signal Serial Data input (CS, SCLK, DIN).
    how to output the digital clock and the synchronization signal from the NI USB-6211?

    Hi SaberSaber,
    You should be able to use the counters to generate a pulse train that could be used for clock and synch purposes.  
    Hope this helps.  Let us know if you have more questions.  
    Dave C.
    Applications Engineer
    National Instruments

  • Sapinst not started for PI 7.1 on Solaris 1064bit and Oracle10

    Hello,
    We are running NW 7.10 PI 7.1 installation on Sun Solaris 10 and Oracle 10.2.0.4 platform. We are using the following installation DVDs for installing PI.
    Installation Master   = 51033240_21
    Java Component = 51033242
    UC Kernel = 51033245
    We are doing following to run ./sapinst
    1. log on as root
    2. set JAVA_HOME, TEMP and DISPLAY
    3. go to master DVD and run ./sapinst
    The instgui is not showing any error Problematicc sentence structure ./SAPinst is just getting frozen. We used another script ./sapinstgui from the same directory and it shows us some logon screen with port 21212 in the GUI. However, when we try clicking logon it does nothing.
    We've ensured that port 21212 or any other port that supposed to be used by SAPinst are not blocked on the firewall or not used by any other application. Host and DNSfiles are also okay. Based on one of the previous forum   /etc/nss*.conf files also exist in our PI host.  Not sure why the SAPinst GUI is not started.
    We've also ensured that we need any new SAPinst support pach from marketplace, however current installation master dvd is the latest one release in March 09 and there are no further patches released by SAP.
    Please help if anyone of you have faced this issue before.
    Harshal

    I tried ./sapinst SAPINST_DIALOG_PORT=<free_port_number> as well as the default port number. Both of them fails.
    normally  ./sapinst itself should establish all the port automatically that it uses. Which currently is not happening.
    Do you want me to copy installation master dvd for Solaris on windows work station from where i'm initiating it through Xmanager session and try running ?  The installation master dvd that i'm currenty using is for Solaris platform which meanase ./sapinst is compiled for Solaris, how will it be supported by Windows ?
    Harshal

Maybe you are looking for