Re: Onbar
Posted in 2000
Topics: Backup & Restore, Server Administration
Info Temp wrote:
>
> Disclaimer: I am not a DBA
>
> Question: Shouldn't the grep below be something more like 'grep 100.00$` to capture all of the logs at 100.00
> percent? Running the grep as shown in your script from the command line resulted in one line on our system for a
> log that was 96.16 percent full and didn't come up with any of the 10 that showed 100 percent. In fact, it
> appears to me that the line it grabbed might be the log that is currently in use.
The problem with using onstat is that it will always return all logs as
full. You would get better results by using the SMI tables. Something
like:
SELECT COUNT(*)
FROM sysmaster:syslogs
WHERE uniqid >= (
SELECT MIN(tx_loguniq)
FROM sysmaster:systrans
WHERE tx_loguniq > 0
)
AND used = size
This is just off the top of my head because I'm not at the orifice to
test it. But it might give you a starting point.
Maybe this is one for the FAQ (IF it works :)?
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |What year 2000 bug? year 2000 bug? |/// / ////|
| |year 2000 bug? year 2000 bug? year |// / /////|
| |2000 bug? year 2000 bug? year 1900 |/ ////////|
+----------------------+-----------------------------------+-----------+
In article <85j3nk$6jk$1@news.xmission.com>, Mark D. Stock <mdstock@myda
s.freeserve.co.uk> writes
>The problem with using onstat is that it will always return all logs as
>full. You would get better results by using the SMI tables. Something
>like:
>
>SELECT COUNT(*)
>FROM sysmaster:syslogs
>WHERE uniqid >= (
> SELECT MIN(tx_loguniq)
> FROM sysmaster:systrans
> WHERE tx_loguniq > 0
> )
>AND used = size>
>This is just off the top of my head because I'm not at the orifice to
>test it. But it might give you a starting point.
>
>Maybe this is one for the FAQ (IF it works :)?
>
>Cheers,
Will be added the weekend..
--
David Williams
>
> The problem with using onstat is that it will always return all logs as
> full.
No. It returns only the full logs if you grep them out. The flags on the output of 'onstat -l' mark the full logs, in
our version (7.2 & 7.3) they look 'U--'.
It is a very simple solution. It can surely be different in a new version. Such as the internal format of sysmaster.
Regards
Peter
--
Peter Dzvonyar
SAP-Consultant R/3 BC
_______________________________________________________________
email: Peter.Dzvonyar@ops.de p.dzvonyar@t-online.de
_______________________________________________________________