QPING(1) Network Queuing Env. 3.3 Last changed: 4-13-98 NNAAMMEE qqppiinngg - Determines whether the local NQS daemon is running and responding to requests SSYYNNOOPPSSIISS qqppiinngg [--vv] IIMMPPLLEEMMEENNTTAATTIIOONN IRIX systems UNICOS/mk systems UNICOS systems AIX systems Digital UNIX systems HP-UX systems Solaris systems DDEESSCCRRIIPPTTIIOONN The qqppiinngg command determines whether the local Network Queuing System (NQS) daemon is running. When qqppiinngg successfully connects to the daemon, it returns an exit status of 0; otherwise, it returns a nonzero error code. The qqppiinngg command supports the following option: --vv (Verbose) Writes a message to ssttddoouutt that describes the result of the attempt to connect to the local NQS daemon. For a list of the messages that are displayed, see the MESSAGES section. WWAARRNNIINNGGSS You can use the qqppiinngg command only on the local NQS system. The qqppiinngg command determines whether the local NQS daemon is running by opening the local request pipe to see whether the other side of the pipe has already been opened by another process. If it has, qqppiinngg assumes that the other process is the NQS daemon and that the daemon is still responding to requests. Because qqppiinngg does not actually send a packet across the pipe, a return code of 0 does not ensure that the daemon is actually reading from the pipe and responding to requests. EEXXIITT SSTTAATTUUSS If the local NQS daemon is running and processing requests, the exit status is 0. If qqppiinngg fails to establish a connection with the local NQS daemon, the exit status is 1. If an error occurs during qqppiinngg execution, if qqppiinngg is interrupted by a signal, or if qqppiinngg has a command-line option that is not valid, the exit status is greater than 1. MMEESSSSAAGGEESS If you specify the --vv option, one of the following messages is displayed: RReessuulltt CCooddee MMeessssaaggee TTCCMMLL__CCOOMMPPLLEETTEE qqppiinngg ssuucccceessssffuull -- NNQQSS ddaaeemmoonn iiss aavvaaiillaabbllee.. TTCCMMLL__IINNSSHHUUTTDDOOWWNN qqppiinngg ffaaiilleedd -- TThhee NNQQSS ddaaeemmoonn iiss iinn tthhee pprroocceessss ooff sshhuuttttiinngg ddoowwnn.. TTCCMMLL__IINNTTEERRNNEERRRR qqppiinngg ffaaiilleedd -- IInntteerrnnaall eerrrroorr.. TTCCMMLL__NNOOEESSTTAABBLLSSHH qqppiinngg ffaaiilleedd -- UUnnaabbllee ttoo eessttaabblliisshh iinntteerrpprroocceessss ccoommmmuunniiccaattiioonnss wwiitthh NNQQSS ddaaeemmoonn.. TTCCMMLL__NNOOLLOOCCAALLDDAAEE qqppiinngg ffaaiilleedd -- TThhee NNQQSS ddaaeemmoonn iiss nnoott rruunnnniinngg.. TTCCMMLL__PPRROOTTOOFFAAIILL qqppiinngg ffaaiilleedd -- PPrroottooccooll ffaaiilluurree iinn iinntteerrpprroocceessss ccoommmmuunniiccaattiioonnss wwiitthh NNQQSS ddaaeemmoonn.. _o_t_h_e_r qqppiinngg ffaaiilleedd -- UUnneexxppeecctteedd ccoommpplleettiioonn ccooddee _c_o_d_e ffrroomm NNQQSS ddaaeemmoonn.. EEXXAAMMPPLLEESS Example 1: The following C program fragment executes qqppiinngg to determine whether the local NQS daemon is available: #include #include #include main() { int wait_status; if ((wait_status = system("/_n_q_e_b_a_s_e//bbiinn//qqppiinngg"")))) ==== --11)) {{ pprriinnttff((""ffoorrkk oorr eexxeecc ffaaiilleedd,, eerrrrnnoo == %%dd\\nn"",, eerrrrnnoo));; }} eellssee iiff ((wwaaiitt__ssttaattuuss ==== 00)) {{ pprriinnttff((""QQppiinngg ssuucccceeeeddeedd NNQQSS DDaaeemmoonn iiss aavvaaiillaabbllee\\nn""));; }} eellssee {{ pprriinnttff((""QQppiinngg ffaaiilleedd NNQQSS DDaaeemmoonn iiss NNOOTT aavvaaiillaabbllee\\nn""));; }} }} For the format of the wait status when it is not --11, see wwaaiitt(2). Example 2: The following standard shell script executes qqppiinngg to determine whether the local NQS daemon is available: #!/bin/sh qping qpingstat=$? if [ $qpingstat -eq 0 ] then echo Qping complete NQS Daemon is available else echo Qping failed NQS Daemon is NOT available fi Example 3: The following C shell script executes qqppiinngg to determine whether the local NQS daemon is available: #!/bin/csh qping set qpingstat=$status if ($qpingstat == 0) then echo Qping complete NQS Daemon is available else echo Qping failed NQS Daemon is NOT available endif Example 4: The following Korn shell script executes qqppiinngg to determine whether the local NQS daemon is available: #!/bin/sh qping qpingstat=$? if [ $qpingstat -eq 0 ] then echo Qping complete NQS Daemon is available else echo Qping failed NQS Daemon is NOT available fi SSEEEE AALLSSOO qqcchhkkppnntt(1), qqddeell(1), qqlliimmiitt(1), qqmmssgg(1), qqssttaatt(1), qqssuubb(1) for information on batch request submission wwaaiitt(2) for the format of the wait status in the _U_N_I_C_O_S _S_y_s_t_e_m _C_a_l_l_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2012 nnqqeeiinnffoo(5) for information on the nnqqeeiinnffoo file _N_Q_E _U_s_e_r'_s _G_u_i_d_e, publication SG-2148, for information on using NQE and NQS This man page is available only online.