nv-l
[Top] [All Lists]

Réf. : [NV-L] Réf. : [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Varia

To: nv-l@lists.tivoli.com
Subject: Réf. : [NV-L] Réf. : [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Variable Names
From: "Gavin Newman" <NEWMANGJ@banksa.com.au>
Date: Thu, 10 Aug 2000 08:43:30 +0930
Alexis

At any point in time there should only be one or two devices stored in memory. 
What happens within the daemon is that when a device goes down I create a 
structure in memory to store relevant information. When the device comes back 
up again the structure data is updated and the structure remains in memory. 
Included in the stored information is the time the struct was created or 
modified. Periodically a thread of the daemon runs through the structures in 
the memory linked list and frees up those that represent a device that is 
currently up and where the structure has not been accessed for 60 minutes. In 
this way the list is kept nice and small but I don't have the overhead of 
repeatedly creating & deleting the structure when a device is flapping.

As far as I can see the daemon uses very little CPU and has no perceptible 
effect on the Netview processor, even on my brain dead development box. On the 
production system which has heaps of CPU & RAM the daemon load is absolutely 
minimal. In any event it has to be faster than spawning a shell script or PERL 
script being a compiled executable. If it ever does become a problem I will 
roll up my sleeves and re-code it all in assembler (I'm old and grey enough to 
remember how to write this much ignored language)

Cheers - Gavin

>>> <alexis.henry@bnpparibas.com> 09/08/2000 17:46:35 >>>
It was a pleasure.
At the very begining i bored a lot of people on the list, i think it is time for
me to help as well as i can.

Only one question: how many devices will you store in memory ? Don't you slow
the Netview box doing so ?

I agree what you said about the rules editor, such a  pity there's no way to
write  with a text based editor.

Regards.
Alexis




Internet

NEWMANGJ@banksa.com.au on 09/08/2000 01:20


Veuillez répondre à nv-l@tkg.com 

Pour :    nv-l
cc :
ccc : Alexis Henry
Objet :   [NV-L] Réf. : [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Variable
      Names



Alexis

Thanks for your perserverence with this and your assistance. I ended up writing
a daemon process which manages an in-memory store for device status and call
that from an in-line action. This has the required result and was much more fun
to write.

Life would be a lot easier if Netview allowed a C-like text based programming
language for the rules editor instead of the GUI. The GUI seems to be aimed at
small non-complex rules, when writing large complex rules it seems that the GUI
gets in the way especially when the rule covers more real estate than the screen
can display and also when the GUI reorganises the layout of nodes every time a
new node is added. Just as you get a mental picture of the entire rule the GUI
seems to shift the nodes around - tres confusing non! (Excuse my attempt at
schoolboy French but I last touched that language in 1965!)

Regards - Gavin

>>> <alexis.henry@bnpparibas.com> 08/08/2000 17:42:18 >>>
I tried to do it exporting environment variable but i failed. I don't see how to
do it the way you want it.
So try to do it using shell script as i explain to you. I think that the better
way to do it is to put your data and their value in a file.
With grep and cut command you can do it easily.

Just my two cents.

Good luck.


Alexis Henry
Banque Nationale de Paris.





Internet

NEWMANGJ@banksa.com.au on 08/08/2000 01:39


Veuillez répondre à nv-l@tkg.com 

Pour :    nv-l
cc :
ccc : Alexis Henry
Objet :   [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Variable Names



Alexis

Thanks again for your reply.

Yes, I want to create a global variable in the rules with the name of the
variable being the contents of $NVATTR_3 ie the name of the device that is down.
The reason for this is that I want to be able to keep a variable for each device
that is currently down.

Cheers - Gavin

>>> <alexis.henry@bnpparibas.com> 07/08/2000 17:03:55 >>>
Yes my trick is to be done in a shell script.
If i understand the matter i don't see how to do it otherwise.

Let me ask a question so i can be sure i understand you: do you want to set a
variable whose name is the value of $NVATTR_3 ? If so i don't see any other way
to do it. If you don't want to write a shell script you can do it on one line in
an action node an try to export this data. I don't know if that will work.

I will try to do it.

As soon as i am successful i will mail the way to do it to you.

Alexis




Internet

NEWMANGJ@banksa.com.au on 07/08/2000 01:51


Veuillez répondre à nv-l@tkg.com 

Pour :    nv-l
cc :
ccc : Alexis Henry
Objet :   [NV-L] Re: Réf. : [NV-L] Global Variable Names



Alexis

Does your trick refer to doing it in a shell script?? What I want to do is
establish the variable in the actual rule - is in the Set Global Variable node I
want to create a variable that takes the name of the device that the event
refers to and then assign a value for it.

Cheers - Gavin

>>> <alexis.henry@bnpparibas.com> 04/08/2000 16:58:06 >>>

Hi Gavin !

There is a trick to do so but it is quite a strange way to do it.
If i understand well you should do it this way:

echo $var | read $(echo $NVATTR_3).
(let assume that "var" is the data you want to set in what you named $$NVATTR_
3)


I explain: "read" is an Aix command that set a data with a stream comming from
<STDIN> wich name is the first argument in the command line.
Here i do $(echo $NVATTR_3) so the shell return "fred" because $NVATTR_3 is
"fred"

So:    echo $var | read $(echo $NVATTR_3)   ==>  echo $var | read fred
Then if you run "echo $fred" you will see the value  in "var".
The $fred data now exists.

Alexis Henry
Banque Nationale de Paris.







NEWMANGJ@stgeorge.com.au on 04/08/2000 04:31:22

Veuillez répondre à nv-l@tkg.com 

Pour :    nv-l@tkg.com 
cc :   (ccc : Alexis Henry/DOSI/BNP)
Objet :   [NV-L] Global Variable Names



_____________________________________________________________________________________________________________________________________




Ce message et toutes les pièces jointes (ci-après le "message") sont établis à
l'intention exclusive de ses destinataires et sont confidentiels. Si vous
recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur.

Toute utilisation de ce message non conforme à sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf autorisation
expresse.

L'internet ne permettant pas d'assurer l'intégrité de ce message, BNP PARIBAS
(et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans
l'hypothèse où il aurait été modifié.

----------------------------------------------------------------------------------



This message and any attachments (the "message") are intended solely for the
addressees and are confidential. If you receive this message in error, please
delete it and immediately notify the sender.

Any use not in accord with its purpose, any dissemination or disclosure, either
whole or partial, is prohibited except formal approval.

The internet can not guarantee the integrity of this message. BNP PARIBAS (and
its subsidiaries) shall (will) not therefore be liable for the message if
modified.
_____________________________________________________________________________________________________________________________________






**********************************************************************
   *****   IMPORTANT INFORMATION    *****
This document should be read only by those persons to whom
it is addressed and its content is not intended for use by
any other persons. If you have received this message in
error, please notify us immediately. Please also destroy and
delete the message from your computer. Any unauthorised form
of reproduction of this message is strictly prohibited.
Bank SA is not liable for the proper and complete transmission
of the information contained in this communication, nor for any
delay in its receipt.
**********************************************************************
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l 






_____________________________________________________________________________________________________________________________________



Ce message et toutes les pièces jointes (ci-après le "message") sont établis à
l'intention exclusive de ses destinataires et sont confidentiels. Si vous
recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur.

Toute utilisation de ce message non conforme à sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf autorisation
expresse.

L'internet ne permettant pas d'assurer l'intégrité de ce message, BNP PARIBAS
(et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans
l'hypothèse où il aurait été modifié.

----------------------------------------------------------------------------------


This message and any attachments (the "message") are intended solely for the
addressees and are confidential. If you receive this message in error, please
delete it and immediately notify the sender.

Any use not in accord with its purpose, any dissemination or disclosure, either
whole or partial, is prohibited except formal approval.

The internet can not guarantee the integrity of this message. BNP PARIBAS (and
its subsidiaries) shall (will) not therefore be liable for the message if
modified.
_____________________________________________________________________________________________________________________________________


_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l 
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l 






_____________________________________________________________________________________________________________________________________


Ce message et toutes les pièces jointes (ci-après le "message") sont établis à
l'intention exclusive de ses destinataires et sont confidentiels. Si vous
recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur.

Toute utilisation de ce message non conforme à sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf autorisation
expresse.

L'internet ne permettant pas d'assurer l'intégrité de ce message, BNP PARIBAS
(et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans
l'hypothèse où il aurait été modifié.

----------------------------------------------------------------------------------

This message and any attachments (the "message") are intended solely for the
addressees and are confidential. If you receive this message in error, please
delete it and immediately notify the sender.

Any use not in accord with its purpose, any dissemination or disclosure, either
whole or partial, is prohibited except formal approval.

The internet can not guarantee the integrity of this message. BNP PARIBAS (and
its subsidiaries) shall (will) not therefore be liable for the message if
modified.
_____________________________________________________________________________________________________________________________________

_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l 
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l 






_____________________________________________________________________________________________________________________________________

Ce message et toutes les pièces jointes (ci-après le "message") sont établis à 
l'intention exclusive de ses destinataires et sont confidentiels. Si vous 
recevez ce message par erreur, merci de le détruire et d'en avertir 
immédiatement l'expéditeur.

Toute utilisation de ce message non conforme à sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf autorisation 
expresse.

L'internet ne permettant pas d'assurer l'intégrité de ce message, BNP PARIBAS 
(et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans 
l'hypothèse où il aurait été modifié.
        
----------------------------------------------------------------------------------
This message and any attachments (the "message") are intended solely for the 
addressees and are confidential. If you receive this message in error, please 
delete it and immediately notify the sender.

Any use not in accord with its purpose, any dissemination or disclosure, either 
whole or partial, is prohibited except formal approval.

The internet can not guarantee the integrity of this message. BNP PARIBAS (and 
its subsidiaries) shall (will) not therefore be liable for the message if 
modified.
_____________________________________________________________________________________________________________________________________


<Prev in Thread] Current Thread [Next in Thread>
  • Réf. : [NV-L] Réf. : [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Variable Names, Gavin Newman <=

Archive operated by Skills 1st Ltd

See also: The NetView Web