event trigger/alarm
Posted in 2011
Frank (IDS 11.50 on Red Hat) wanted to trigger a script that snapshots running sessions whenever the engine dynamically allocates a new virtual shared memory segment, and asked how to catch that event via ALARMPROGRAM. Replies: Bob suggested trapping SEVERITY=1 alarms and matching "Dynamically allocated" in the ADD_TEXT parameter; Khaled and Mark said no dedicated alarm event exists, suggesting polling sysmaster (syssegments, sysonlinelog) via the scheduler, or a loop on 'onstat -g seg' totals (sample script given). Fernando offered his ixproclog scripts, which tail online.log and call a customised alarmprogram on configurable message patterns, published at his public repository, and mentioned ALRM_ALL_EVENTS and SHMVIRT_ALLOCSEG as alternatives. Frank thanked everyone; no single confirmed solution is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Triggers, Constraints & Referential Integrity, Logging & Checkpoints
Hi, Folks, IDS11.50 FC8, Redhat Linux. I am going to narrow down which job peoridically caused IDS to add new memory segments. Basically, the plan is, whenever IDS is adding a new memory segment( as in the attached online log messge) , the event will trigger my script to take a snapshot of all current jobs running in IDS. My question is how to determine this event in the alarm script? Any other good choices?( like a sensor.....) Thanks, Frank 03:10:23 Maximum server connections 299 03:10:23 Checkpoint Statistics - Avg. Txn Block Time 0.001, # Txns blocked 9, Plog used 8827, Llog used 102989 03:12:02 Dynamically allocated new virtual shared memory segment (size 32768KB) 03:12:02 Memory sizes:resident:3327048 KB, virtual:3313540 KB, no SHMTOTAL limit 03:15:23 Logical Log 17698 Complete, timestamp: 0x584eb4c3. --0015174ff3d497118004b488d3c9
I'm not sure if the changes in the alarms made recently have changed this. In the past I have created a shell script that constantly monitors (with a tail -f, not pooling) the online.log and can be configured to act on specified messages (regular expressions if I remember well). This script can be configured to call alarmprogram, which I normally costumize so that it recognizes more (customized) events. The advantage of doing that is that the configuration made once for the alarms (SMS, email, syslog etc.) will work for all events. I can provide the script if you don't find a better solution. How fast would you need this? (Eric: If you're reading this, we must talk! :) ) Regards On Tue, Dec 20, 2011 at 4:47 PM, FRANK <yunyaoqu@gmail.com> wrote: > Hi, Folks, > > IDS11.50 FC8, Redhat Linux. > > I am going to narrow down which job peoridically caused IDS to add new > memory segments. > > Basically, the plan is, whenever IDS is adding a new memory segment( > as in the attached online log messge) , the event will trigger my > script to take a snapshot of all current jobs running in IDS. > > My question is how to determine this event in the alarm script? Any > other good choices?( like a sensor.....) > > Thanks, > Frank > > 03:10:23 Maximum server connections 299 > 03:10:23 Checkpoint Statistics - Avg. Txn Block Time 0.001, # Txns blocked > 9, Plog used 8827, Llog used 102989 > 03:12:02 Dynamically allocated new virtual shared memory segment (size > 32768KB) > 03:12:02 Memory sizes:resident:3327048 KB, virtual:3313540 KB, no SHMTOTAL > limit > 03:15:23 Logical Log 17698 Complete, timestamp: 0x584eb4c3. > > --0015174ff3d497118004b488d3c9 > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --00248c7691360936ac04b4890374
You'll need to trap SEVERITY=1 alarms (1st parameter), and check the 'ADD_TEXT' (parameter #4) for the "Dynamically allocated" text. I know it works for "Dynamically allocated 100000 locks" messages. Bob ----- Original Message ----- From: "FRANK" <yunyaoqu@gmail.com> To: ids@iiug.org Sent: Tuesday, December 20, 2011 11:47:50 AM Subject: event trigger/alarm [25675] Hi, Folks, IDS11.50 FC8, Redhat Linux. I am going to narrow down which job peoridically caused IDS to add new memory segments. Basically, the plan is, whenever IDS is adding a new memory segment( as in the attached online log messge) , the event will trigger my script to take a snapshot of all current jobs running in IDS. My question is how to determine this event in the alarm script? Any other good choices?( like a sensor.....) Thanks, Frank 03:10:23 Maximum server connections 299 03:10:23 Checkpoint Statistics - Avg. Txn Block Time 0.001, # Txns blocked 9, Plog used 8827, Llog used 102989 03:12:02 Dynamically allocated new virtual shared memory segment (size 32768KB) 03:12:02 Memory sizes:resident:3327048 KB, virtual:3313540 KB, no SHMTOTAL limit 03:15:23 Logical Log 17698 Complete, timestamp: 0x584eb4c3. --0015174ff3d497118004b488d3c9 ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Fernando,
Thanks a lot! it is great if you can send me your script. I am not
rushing, any time is good.
Thanks again,
Frank
On Tue, Dec 20, 2011 at 12:01 PM, Fernando Nunes <domusonline@gmail.com>wrote:
> I'm not sure if the changes in the alarms made recently have changed this.
> In the past I have created a shell script that constantly monitors (with a
> tail -f, not pooling) the online.log and can be configured to act on
> specified messages (regular expressions if I remember well).
>
> This script can be configured to call alarmprogram, which I normally
> costumize so that it recognizes more (customized) events.
> The advantage of doing that is that the configuration made once for the
> alarms (SMS, email, syslog etc.) will work for all events.
>
> I can provide the script if you don't find a better solution. How fast
> would you need this?
>
> (Eric: If you're reading this, we must talk! :) )
> Regards
>
> On Tue, Dec 20, 2011 at 4:47 PM, FRANK <yunyaoqu@gmail.com> wrote:
>
> > Hi, Folks,
> >
> > IDS11.50 FC8, Redhat Linux.
> >
> > I am going to narrow down which job peoridically caused IDS to add new
> > memory segments.
> >
> > Basically, the plan is, whenever IDS is adding a new memory segment(
> > as in the attached online log messge) , the event will trigger my
> > script to take a snapshot of all current jobs running in IDS.
> >
> > My question is how to determine this event in the alarm script? Any
> > other good choices?( like a sensor.....)
> >
> > Thanks,
> > Frank
> >
> > 03:10:23 Maximum server connections 299
> > 03:10:23 Checkpoint Statistics - Avg. Txn Block Time 0.001, # Txns
> blocked
> > 9, Plog used 8827, Llog used 102989
> > 03:12:02 Dynamically allocated new virtual shared memory segment (size
> > 32768KB)
> > 03:12:02 Memory sizes:resident:3327048 KB, virtual:3313540 KB, no
> SHMTOTAL> > limit
> > 03:15:23 Logical Log 17698 Complete, timestamp: 0x584eb4c3.
> >
> > --0015174ff3d497118004b488d3c9
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Fernando Nunes
> Portugal
>
> http://informix-technology.blogspot.com
> My email works... but I don't check it frequently...
>
> --00248c7691360936ac04b4890374
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636eeffdb59739804b48a593b
Thanks, Bon! Will have a look. Frank On Tue, Dec 20, 2011 at 1:19 PM, rroussey@comcast.net <rroussey@comcast.net>wrote: > You'll need to trap SEVERITY=1 alarms (1st parameter), and check the > 'ADD_TEXT' (parameter #4) for the "Dynamically allocated" text. I know it > works for "Dynamically allocated 100000 locks" messages. > > Bob > > ----- Original Message ----- > From: "FRANK" <yunyaoqu@gmail.com> > To: ids@iiug.org > Sent: Tuesday, December 20, 2011 11:47:50 AM > Subject: event trigger/alarm [25675] > > Hi, Folks, > > IDS11.50 FC8, Redhat Linux. > > I am going to narrow down which job peoridically caused IDS to add new > memory segments. > > Basically, the plan is, whenever IDS is adding a new memory segment( > as in the attached online log messge) , the event will trigger my > script to take a snapshot of all current jobs running in IDS. > > My question is how to determine this event in the alarm script? Any > other good choices?( like a sensor.....) > > Thanks, > Frank > > 03:10:23 Maximum server connections 299 > 03:10:23 Checkpoint Statistics - Avg. Txn Block Time 0.001, # Txns blocked > 9, Plog used 8827, Llog used 102989 > 03:12:02 Dynamically allocated new virtual shared memory segment (size > 32768KB) > 03:12:02 Memory sizes:resident:3327048 KB, virtual:3313540 KB, no SHMTOTAL > limit > 03:15:23 Logical Log 17698 Complete, timestamp: 0x584eb4c3. > > --0015174ff3d497118004b488d3c9 > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001636eeffdbeb5a4004b48a5ff6
There is NO alarm event for this as far as I know. However there are 2 pseudo tables in the sysmaster database that contain this informix: - syssegments that contains the list of all shared memory segments for that instance (seg_class will tell which type of segment has been allocated) - sysonlinelog (column line) that contains all of the online.log messages If you need to react on the event as it occurs, it will hard to do, otherwise if you have time you can define a task run by the scheduler that checks for this two tables. It would have been nice to be able to put triggers but unfortunately this will not work for sysmaster tables. Cordialement, Regards, Khaled Bentebal Directeur Général - ConsultiX Président UGIF - User Group Informix France IIUG - Board of Directors Tél: 33 (0) 1 39 12 18 00 Fax: 33 (0) 1 39 12 18 18 Mobile: 33 (0) 6 07 78 41 97 Email: khaled.bentebal@consult-ix.fr Site Web: www.consult-ix.fr Le 20/12/11 17:47, FRANK a écrit : > Hi, Folks, > > IDS11.50 FC8, Redhat Linux. > > I am going to narrow down which job peoridically caused IDS to add new > memory segments. > > Basically, the plan is, whenever IDS is adding a new memory segment( > as in the attached online log messge) , the event will trigger my > script to take a snapshot of all current jobs running in IDS. > > My question is how to determine this event in the alarm script? Any > other good choices?( like a sensor.....) > > Thanks, > Frank > > 03:10:23 Maximum server connections 299 > 03:10:23 Checkpoint Statistics - Avg. Txn Block Time 0.001, # Txns blocked > 9, Plog used 8827, Llog used 102989 > 03:12:02 Dynamically allocated new virtual shared memory segment (size > 32768KB) > 03:12:02 Memory sizes:resident:3327048 KB, virtual:3313540 KB, no SHMTOTAL > limit > 03:15:23 Logical Log 17698 Complete, timestamp: 0x584eb4c3. > > --0015174ff3d497118004b488d3c9 > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >
Hmmm.... I checked the script. It depends on another one that was written
by someone else (many years ago) and almost re-written by me over the
years... But as of today I cannot supply this second one.
This should be solved in a couple of days. If not, I could change this last
script to avoid the dependence...
Let me try to solve this weird situation... The purpose of this script as I
tried to explain it to act on online.log messages after configuring this on
a simple config script.
The script I'm trying to obtain permission to distribute is a script that
allows us to change the instance on a machine that has more than one (and
that changes the INFORMIX variables accordingly). So, I think this and
other scripts I have could benefit the community and I'm working on trying
to make them available (most customers where I've been already have them
somewhere).
The config script looks like:
#-------------------------------------------------------------------------------
----------------------------------------------------
# Field description:
# 1-Online log
msg|2-alarm_class_id|3-alarm_severity|4-alarm_class_msg|5-function|6-alarm_send|
7-IDS
versions
#-------------------------------------------------------------------------------
----------------------------------------------------
#Checkpoint Completed|900|1|Checkpoint completed|ix_checkpoint|Y|:7:9:10:|
Client host or user|901|3|Connect fail - User not trusted||Y|:7:9:10:|
password is not correct for the database server|901|3|Connect fail - Bad
password||Y|:7:9:10:|
Archive started|902|2|Archive Started||Y|7:9:10:|
Dynamic Server Started|903|3|Engine started||Y|:7:9:10:|
Dynamic Server Stopped|903|3|Engine stopped||Y|:7:9:10:|
Quiescent Mode|903|3|Engine entered Quiescent Mode||Y|:7:9:10:|
On-Line Mode|903|3|Engine entered On-Line Mode||Y|:7:9:10:|
KAIO: out of OS resources|904|4|Kaio out of OS resources||Y|:7:9:10:|
#-----------------------------------------------------------------------
So, for example, when a "KAIO*" message appears I call the alarm program
with class_id = 904 (which I customized in the script), severity 4,
class_msg = "Kaio out of OS resources", and it works for versions 7, 9, 10
(11: should be added). Optionally it could call a funcion specified in the
5th column and defined in another shell script that's loaded by the main
one (so that you can run very specific commands for each particular
situation if needed)
So, this is completely configurable and allows you to easily trap whatever
our R&D did not decide to call the alarm program for.
Another (simpler?) option would be to set ALRM_ALL_EVENTS in ONCONFIG, but
my experience with that was not very good (but it was long ago, and I can't
exactly remember the problems - if any - besides the obvious one: two many
messages)
Regards.
On Tue, Dec 20, 2011 at 6:36 PM, FRANK <yunyaoqu@gmail.com> wrote:
> Fernando,
>
> Thanks a lot! it is great if you can send me your script. I am not
> rushing, any time is good.
>
> Thanks again,
> Frank
>
> On Tue, Dec 20, 2011 at 12:01 PM, Fernando Nunes <domusonline@gmail.com
> >wrote:
>
> > I'm not sure if the changes in the alarms made recently have changed
> this.
> > In the past I have created a shell script that constantly monitors (with
> a
> > tail -f, not pooling) the online.log and can be configured to act on
> > specified messages (regular expressions if I remember well).
> >
> > This script can be configured to call alarmprogram, which I normally
> > costumize so that it recognizes more (customized) events.
> > The advantage of doing that is that the configuration made once for the
> > alarms (SMS, email, syslog etc.) will work for all events.
> >
> > I can provide the script if you don't find a better solution. How fast
> > would you need this?
> >
> > (Eric: If you're reading this, we must talk! :) )
> > Regards
> >
> > On Tue, Dec 20, 2011 at 4:47 PM, FRANK <yunyaoqu@gmail.com> wrote:
> >
> > > Hi, Folks,
> > >
> > > IDS11.50 FC8, Redhat Linux.
> > >
> > > I am going to narrow down which job peoridically caused IDS to add new
> > > memory segments.
> > >
> > > Basically, the plan is, whenever IDS is adding a new memory segment(
> > > as in the attached online log messge) , the event will trigger my
> > > script to take a snapshot of all current jobs running in IDS.
> > >
> > > My question is how to determine this event in the alarm script? Any
> > > other good choices?( like a sensor.....)
> > >
> > > Thanks,
> > > Frank
> > >
> > > 03:10:23 Maximum server connections 299
> > > 03:10:23 Checkpoint Statistics - Avg. Txn Block Time 0.001, # Txns
> > blocked
> > > 9, Plog used 8827, Llog used 102989
> > > 03:12:02 Dynamically allocated new virtual shared memory segment (size
> > > 32768KB)
> > > 03:12:02 Memory sizes:resident:3327048 KB, virtual:3313540 KB, no
> > SHMTOTAL> > > limit
> > > 03:15:23 Logical Log 17698 Complete, timestamp: 0x584eb4c3.
> > >
> > > --0015174ff3d497118004b488d3c9
> > >
> > >
> > >
> > >
> >
> >
>
>
*******************************************************************************
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> > >
> >
> > --
> > Fernando Nunes
> > Portugal
> >
> > http://informix-technology.blogspot.com
> > My email works... but I don't check it frequently...
> >
> > --00248c7691360936ac04b4890374
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001636eeffdb59739804b48a593b
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--00248c7691362e8ac404b48da4f7
afaik there is no alarm for this event; , you have to make the assumption that
if the total shared memory size increases then there was a recent dynamic
allocation of memory.
You may want to tweak the below script to keep it from exiting since the
engine may add several segments which in that event you would get a more
complete set of snaphots.
#!/bin/ksh
x=`onstat -g seg | grep Total: | awk '{print $4}'`
while true
do
y=`onstat -g seg | grep Total: | awk '{print $4}'`
if [[ $y > $x ]] then
echo "Shared memory allocation detected."
dump the onstats here..
exit
fi
sleep 1
done
" Too Many Messages " is NOT a good strategy to decide which are useful
for customers.
For any nontrivial IDS event ( e.g., add a memory segment..), it should
be good to allow users to be able to do some thing s/he likes. You can
define that event severity level as very low( or normal), but it is a
event that attract attention on resources usage.....
So.....
Frank
On Tue, Dec 20, 2011 at 5:32 PM, Fernando Nunes <domusonline@gmail.com>wrote:
> Hmmm.... I checked the script. It depends on another one that was written
> by someone else (many years ago) and almost re-written by me over the
> years... But as of today I cannot supply this second one.
> This should be solved in a couple of days. If not, I could change this last
> script to avoid the dependence...
>
> Let me try to solve this weird situation... The purpose of this script as I
> tried to explain it to act on online.log messages after configuring this on
> a simple config script.
> The script I'm trying to obtain permission to distribute is a script that
> allows us to change the instance on a machine that has more than one (and
> that changes the INFORMIX variables accordingly). So, I think this and
> other scripts I have could benefit the community and I'm working on trying
> to make them available (most customers where I've been already have them
> somewhere).
>
> The config script looks like:
>
>
>
>
#-------------------------------------------------------------------------------
----------------------------------------------------
> # Field description:
> # 1-Online log
>
>
>
msg|2-alarm_class_id|3-alarm_severity|4-alarm_class_msg|5-function|6-alarm_send|
7-IDS
> versions
>
>
>
#-------------------------------------------------------------------------------
----------------------------------------------------
> #Checkpoint Completed|900|1|Checkpoint completed|ix_checkpoint|Y|:7:9:10:|
> Client host or user|901|3|Connect fail - User not trusted||Y|:7:9:10:|
> password is not correct for the database server|901|3|Connect fail - Bad
> password||Y|:7:9:10:|
> Archive started|902|2|Archive Started||Y|7:9:10:|
> Dynamic Server Started|903|3|Engine started||Y|:7:9:10:|
> Dynamic Server Stopped|903|3|Engine stopped||Y|:7:9:10:|
> Quiescent Mode|903|3|Engine entered Quiescent Mode||Y|:7:9:10:|
> On-Line Mode|903|3|Engine entered On-Line Mode||Y|:7:9:10:|
> KAIO: out of OS resources|904|4|Kaio out of OS resources||Y|:7:9:10:|
>
> #-----------------------------------------------------------------------
>
> So, for example, when a "KAIO*" message appears I call the alarm program
> with class_id = 904 (which I customized in the script), severity 4,
> class_msg = "Kaio out of OS resources", and it works for versions 7, 9, 10
> (11: should be added). Optionally it could call a funcion specified in the
> 5th column and defined in another shell script that's loaded by the main
> one (so that you can run very specific commands for each particular
> situation if needed)
>
> So, this is completely configurable and allows you to easily trap whatever
> our R&D did not decide to call the alarm program for.
>
> Another (simpler?) option would be to set ALRM_ALL_EVENTS in ONCONFIG, but
> my experience with that was not very good (but it was long ago, and I can't
> exactly remember the problems - if any - besides the obvious one: two many
> messages)
>
> Regards.
>
> On Tue, Dec 20, 2011 at 6:36 PM, FRANK <yunyaoqu@gmail.com> wrote:
>
> > Fernando,
> >
> > Thanks a lot! it is great if you can send me your script. I am not
> > rushing, any time is good.
> >
> > Thanks again,
> > Frank
> >
> > On Tue, Dec 20, 2011 at 12:01 PM, Fernando Nunes <domusonline@gmail.com
> > >wrote:
> >
> > > I'm not sure if the changes in the alarms made recently have changed
> > this.
> > > In the past I have created a shell script that constantly monitors
> (with
> > a
> > > tail -f, not pooling) the online.log and can be configured to act on
> > > specified messages (regular expressions if I remember well).
> > >
> > > This script can be configured to call alarmprogram, which I normally
> > > costumize so that it recognizes more (customized) events.
> > > The advantage of doing that is that the configuration made once for the
> > > alarms (SMS, email, syslog etc.) will work for all events.
> > >
> > > I can provide the script if you don't find a better solution. How fast
> > > would you need this?
> > >
> > > (Eric: If you're reading this, we must talk! :) )
> > > Regards
> > >
> > > On Tue, Dec 20, 2011 at 4:47 PM, FRANK <yunyaoqu@gmail.com> wrote:
> > >
> > > > Hi, Folks,
> > > >
> > > > IDS11.50 FC8, Redhat Linux.
> > > >
> > > > I am going to narrow down which job peoridically caused IDS to add
> new
> > > > memory segments.
> > > >
> > > > Basically, the plan is, whenever IDS is adding a new memory segment(
> > > > as in the attached online log messge) , the event will trigger my
> > > > script to take a snapshot of all current jobs running in IDS.
> > > >
> > > > My question is how to determine this event in the alarm script? Any
> > > > other good choices?( like a sensor.....)
> > > >
> > > > Thanks,
> > > > Frank
> > > >
> > > > 03:10:23 Maximum server connections 299
> > > > 03:10:23 Checkpoint Statistics - Avg. Txn Block Time 0.001, # Txns
> > > blocked
> > > > 9, Plog used 8827, Llog used 102989
> > > > 03:12:02 Dynamically allocated new virtual shared memory segment
> (size
> > > > 32768KB)
> > > > 03:12:02 Memory sizes:resident:3327048 KB, virtual:3313540 KB, no
> > > SHMTOTAL> > > > limit
> > > > 03:15:23 Logical Log 17698 Complete, timestamp: 0x584eb4c3.
> > > >
> > > > --0015174ff3d497118004b488d3c9
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
*******************************************************************************
> > > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > > >
> > > >
> > >
> > > --
> > > Fernando Nunes
> > > Portugal
> > >
> > > http://informix-technology.blogspot.com
> > > My email works... but I don't check it frequently...
> > >
> > > --00248c7691360936ac04b4890374
> > >
> > >
> > >
> > >
> >
> >
>
>
*******************************************************************************
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> > >
> >
> > --001636eeffdb59739804b48a593b
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Fernando Nunes
> Portugal
>
> http://informix-technology.blogspot.com
> My email works... but I don't check it frequently...
>
> --00248c7691362e8ac404b48da4f7
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a respon
Thanks, Khaled! Frank
On Tue, Dec 20, 2011 at 4:18 PM, Khaled Bentebal <
khaled.bentebal@consult-ix.fr> wrote:
> There is NO alarm event for this as far as I know.
>
> However there are 2 pseudo tables in the sysmaster database that contain
> this informix:
> - syssegments that contains the list of all shared memory segments for
> that instance (seg_class will tell which type of segment has been
> allocated)
> - sysonlinelog (column line) that contains all of the online.log messages
>
> If you need to react on the event as it occurs, it will hard to do,
> otherwise if you have time you can define a task run by the scheduler
> that checks for this two tables.
>
> It would have been nice to be able to put triggers but unfortunately
> this will not work for sysmaster tables.
>
> Cordialement, Regards,
>
> Khaled Bentebal
> Directeur Général - ConsultiX
> Président UGIF - User Group Informix France
> IIUG - Board of Directors
> Tél: 33 (0) 1 39 12 18 00
> Fax: 33 (0) 1 39 12 18 18
> Mobile: 33 (0) 6 07 78 41 97
> Email: khaled.bentebal@consult-ix.fr
> Site Web: www.consult-ix.fr
>
> Le 20/12/11 17:47, FRANK a écrit :
> > Hi, Folks,
> >
> > IDS11.50 FC8, Redhat Linux.
> >
> > I am going to narrow down which job peoridically caused IDS to add new
> > memory segments.
> >
> > Basically, the plan is, whenever IDS is adding a new memory segment(
> > as in the attached online log messge) , the event will trigger my
> > script to take a snapshot of all current jobs running in IDS.
> >
> > My question is how to determine this event in the alarm script? Any
> > other good choices?( like a sensor.....)
> >
> > Thanks,
> > Frank
> >
> > 03:10:23 Maximum server connections 299
> > 03:10:23 Checkpoint Statistics - Avg. Txn Block Time 0.001, # Txns
> blocked
> > 9, Plog used 8827, Llog used 102989
> > 03:12:02 Dynamically allocated new virtual shared memory segment (size
> > 32768KB)
> > 03:12:02 Memory sizes:resident:3327048 KB, virtual:3313540 KB, no
> SHMTOTAL> > limit
> > 03:15:23 Logical Log 17698 Complete, timestamp: 0x584eb4c3.
> >
> > --0015174ff3d497118004b488d3c9
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0015174c1036af22cb04b49d2c89
Thank you, Mark! Frank
On Wed, Dec 21, 2011 at 10:02 AM, MARK JALKIEWICZ <
mark.jalkiewicz@verizon.net> wrote:
> afaik there is no alarm for this event; , you have to make the assumption
> that
> if the total shared memory size increases then there was a recent dynamic
> allocation of memory.
>
> You may want to tweak the below script to keep it from exiting since the
> engine may add several segments which in that event you would get a more
> complete set of snaphots.
>
> #!/bin/ksh
>
> x=`onstat -g seg | grep Total: | awk '{print $4}'`
>
> while true
> do
> y=`onstat -g seg | grep Total: | awk '{print $4}'`
> if [[ $y > $x ]] then
> echo "Shared memory allocation detected."
> dump the onstats here..
> exit
> fi
> sleep 1
> done
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--bcaec53d5a95c5251504b49d3583
Well... Good and bad news. I've setup a public repository of scripts I normally use. The URL is: http://onlinedomus.com/informix/viewvc.cgi The script I talked about in in PUBLIC/informix/scripts/ix and it's called ixproclog* But the bad news is that it depends on another script called setinfx located at PUBLIC/informix/scripts/setinfx/shell/ The purpose of this latest script is to allow easy and quick moving from one Informix environment to another. As an example: ================================================================================ =========== bg@pacman.onlinedomus.com:fnunes-> . setinfx l List of available INFORMIX environments on pacman.onlinedomus.com (setinfx version 1.30) 1) Cheetah (IBM Informix Dynamic Server Version 11.50.UC8W2) 2) Panther Pri (IBM Informix Dynamic Server Version 11.70.UC4) 3) Cheetah (IBM INFORMIX-4GL Version 7.50.UC4) 4) Panther (IBM/Informix-Client SDK Version 3.70.UC4) 5) Test ADM (IBM Informix Dynamic Server Version 11.50.UC8W2) 6) CM (IBM/Informix-Client SDK Version 3.70.UC4) 7) CM (IBM/Informix-Client SDK Version 3.70.UC4) Choose an environment number (1-7 q to quit) : ================================================================== or you could just run ". setinfx 1" For this to happen you'd need to create two config files: 1) ~informix/etc/infx_env.lst contains the list of environments. Could look like this: #Description|INFORMIXSERVER|ONCONFIG|INFORMIXDIR|SERVERDIR|INFORMIXSQLHOSTS|TYPE :S=server,D=4GL/tools|Empty|HOSTNAME(can ber LOCAL)|Script to execute Cheetah|cheetah|onconfig.cheetah|/usr/informix/srvr1150uc8w2|=|/home/informix/et c/sqlhosts|S||pacman|TERMCAP.sh Panther Pri|panther|onconfig.panther|/usr/informix/srvr1170uc4|=|/home/informix/etc/sqlh osts|S||pacman|TERMCAP_PRI.sh Cheetah|cheetah||/usr/informix/tool750uc4|/usr/informix/srvr1150uc7|/home/inform ix/etc/sqlhosts|D||pacman|TERMCAP.sh Panther|panther||/usr/informix/csdk370uc4|/usr/informix/srvr1150uc7|/home/inform ix/etc/sqlhosts|D||pacman|TERMCAP.sh Test ADM|test|onconfig.test|/usr/informix/srvr1150uc8w2|=|/home/informix/etc/sqlhosts |S||pacman|TERMCAP.sh CM|bigbrother|cmsm.cfg|/usr/informix/csdk370uc4/|/usr/informix/srvr1170uc4|/usr/ informix/csdk370uc4/etc/sqlhosts.cmsm|D||pacman|TERMCAP.sh CM|bg||/usr/informix/csdk370uc4/|/usr/informix/srvr1170uc4|/usr/informix/csdk370 uc4/etc/sqlhosts.cmsm|D||pacman|TERMCAP.sh 2) ~informix/etc/setinfx.params Defines some options. Could look like this: admingroups: informix system_ld_library_path :/lib path_informixdir_bin: BEGIN /usr/informix/tool /usr/informix/srvr where: - the line with "admingroups:" contains a list of space separated unix groups that will "see" the environments for "servers" (7th field in the file above == "S" or "s") system_ld_library_path: contains possible system paths to add to LD_LIBRARY_PATH. This will be placed first in the list for client environments (7th field of file above == "D"). This is optional and was introduced for performance reasons - path_informixdir_bin: BEGIN indicates that $INFORMIXDIR/bin will be placed at the head of PATH. Can be "END" for opposite effect - the rest of the lines are prefixes that will be searched and removed from PATH and LD_LIBRARY_PATH before setting new ones, each time you switch environments. For this to work you'd need "setinfx" and "setinfx_utils" on the user PATH. --------------- If you're still here, after setting the above for your environment you should also use the follwoing pieces for "ixproclog": - ixproclog (the script) - ixproclog.def (the config file) This latest would look like: #------------------------------------------------------------------------------- ---------------------------------------------------- # Field description: # 1-Online log msg|2-alarm_class_id|3-alarm_severity|4-alarm_class_msg|5-function|6-alarm_send| 7-IDS versions #------------------------------------------------------------------------------- ---------------------------------------------------- #Checkpoint Completed|900|1|Checkpoint completed|ix_checkpoint|Y|:7:9:10:| Client host or user|901|3|Connect fail - User not trusted||Y|:7:9:10:| password is not correct for the database server|901|3|Connect fail - Bad password||Y|:7:9:10:| Archive started|902|2|Archive Started||Y|7:9:10:| Dynamic Server Started|903|3|Engine started||Y|:7:9:10:| Dynamic Server Stopped|903|3|Engine stopped||Y|:7:9:10:| Quiescent Mode|903|3|Engine entered Quiescent Mode||Y|:7:9:10:| On-Line Mode|903|3|Engine entered On-Line Mode||Y|:7:9:10:| KAIO: out of OS resources|904|4|Kaio out of OS resources||Y|:7:9:10:| You'd have to configure this for your needs... Each line specifies an event driven action with 7 pipe separated fields: 1) The online message that you want to trap and act upon 2) The class id used to call the ALARMPROGRAM 3) The alarm severity used to call the ALARMPROGRAM 4) The class message used to call the ALARMPROGRAM 5) Some function that you can define in a file named "ixproclog.inc" 6) Call (Y) or not (N) the alarprogram (you may prefer just to use a customized function) 7) The versions of IDS where this is aplicable (separated by ":" ========================= If you're still here, than you'd need to run something like: ixproclog DAEMON This would source the "setinfx_utils" which would define a function to get all the server environments from the infx_env.lst file. For each one of this, a function would be launched in backgroud with "ixproclog WORKER <n>" where <n> would be the environment number: panther@pacman.onlinedomus.com:fnunes-> ./ixproclog DAEMON awk: warning: escape sequence `\\\\.' treated as plain `.' Launched WORKER 1 with PID 12324 Launched WORKER 2 with PID 12325 Launched WORKER 5 with PID 12326 each one will launch a tail -1f for the respective online.log and every time a message is written it will try to match it against the entries in "ixproclog.def" and act accordingly. =============================================================================== Overcomplex? Yes. Flexible? YES! :) If your version has it, you could check SHMVIRT_ALLOCSEG If by any change you decide to go with this complex path, feel free to ask any questions. Of course, please test on a non production environment first, until you feel confortable. Regards. On Tue, Dec 20, 2011 at 10:32 PM, Fernando Nunes <domusonline@gmail.com>wrote: > Hmmm.... I checked the script. It depends on another one that was written > by someone else (many years ago) and almost re-written by me over the > years... But as of today I cannot supply this second one. > This should be solved in a couple of days. If not, I could change this > last script to avoid the dependence... > > Let me try to solve this weird situation... The purpose of this script as > I tried to explain it to act on online.log messages after configuring this > on a simple config script. > The script I'm trying
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g