Re: How to tbstat ??
Posted in 1994
On 12 Dec 1994, Per St|vring S|rensen wrote: } pss@kpdp wrote: } } : Hello World, } } : I would like to get the status of an online from within a C program. } } : Instead of having to do a popen("tbstat -"). I wonder if anybody knows a } : better way of doing it, something like get_online_status() or what ever } : Informix has called it. There gotta be a function somewhere that does the } : job. } } So far I've got 4 answers to my question. All 4 are good in their own way } but I cannot use the proposed methods because they all work on the } assumption the the OnLine is up. I want a method that works no matter what } mode the OnLine current is in. So if you are sitting with a good idea... } please come forward } } Per } } : Looking forward to any good ideas } } : Regards } } : Per } } : -- } } } : Q/A Information & Systems I Kuwait Petroleum (Denmark) I Phone: +45 45984291 } : Per St|vring S|rensen I Hummeltoftevej 49 I Private:+45 45768570 } : pss@q8.dk I DK-2830 Virum I Fax: +45 42851418 } } -- } } } Q/A Information & Systems I Kuwait Petroleum (Denmark) I Phone: +45 45984291 } Per St|vring S|rensen I Hummeltoftevej 49 I Private:+45 45768570 } pss@q8.dk I DK-2830 Virum I Fax: +45 42851418 } Per, The "popen..." should work. If your engine is down, you should get the "shared memory not initialized" error. Then manipulate your program to indicate that the database is off. +----------------------------------------------------------------------------+ | | | | . . | | | ... ... | Darin Melin | | ..... ..... | Software Engineer, DBA | | .. ... .. | Business Systems Integration Group | | . . . | Semiconductor Products Sector | | | Mesa, AZ | | Motorola, Inc. | rp29560@email.sps.mot.com Phone:(602)-655-3627 | | | melin@hermes1.sps.mot.com | | | VP - Arizona Informix Users Group | +----------------------------------------------------------------------------+ | 'connectionLESS IS MORE' -- Data Broker | +----------------------------------------------------------------------------+