Collector questions

Hello Everybody!
I would like to ask some questions about creating a collector. I
modified the Apache Agent (utility) to tail -F logfile_path | awk
'{print($0); fflush()}' | $SOCAT_BIN -d -u - $SOCAT_OPTIONS & to send
the logfile to the Sentinel. I will check, but the point is that it
transfer the lines.
The Collector look for a Matching rule and I saw it in the debugger and
also in the Sentinel web interface that I got the event/logfile. I also
see in the debugger that the s_RXBufferString is exists. So I have to
use the safesplit or split methods on this.s_RXBufferString, right? Or
Should I use //.exec()? Or it is totally up to me to use whatever I
want?
If I saw it right, the /()()/.exec() makes/eval the regex and We got
RegExp.$1-$9. If I use the /()()/.test() it will just give me wether the
result of the regex is true or false. Right?
When is it allowed to use field assignment (e.InitiatorUserName =
this.username?
What is the effect when I put the instance.SEND_EVENT into an another
function for example normalize()? Or it is still OK to put elsewhere the
send_event untill it is in one of the preparse(),parse(),normalize()
functions?
Do I have to create a variable like var empty_str or it is enough to do
the this.emptry_str? The preparse(),parse(),normalize() are prototype
javascript function so if I read it well, it is ok to use
this.empty_str. Or will the this.empty_str dissappear after it jumps to
the next function (because of the scope)?
How can I decide when to use RXMapp and when s_RXBufferString? What if I
don't see the s_Body, but have s_RXBufferString? I know that
s_RXBufferString is line-oriented, but is i possible that my syslog/file
data will be in the RXMap?
What if i set the this.dun="testuser"; and in the Rec2Evt.map I add the
UserTargetName,dun pair? It should be always present the TargetUserName
when I look it in the Sentinel web interface, right?
Are there any other source to learn how to create collector?
Thank you for your answers!
woodspeed
woodspeed's Profile: https://forums.netiq.com/member.php?userid=7232
View this thread: https://forums.netiq.com/showthread.php?t=51349

woodspeed;246692 Wrote:
> Hello Everybody!
>
>
> I would like to ask some questions about creating a collector. I
> modified the Apache Agent (utility) to tail -F logfile_path | awk
> '{print($0); fflush()}' | $SOCAT_BIN -d -u - $SOCAT_OPTIONS & to send
> the logfile to the Sentinel. I will check, but the point is that it
> transfer the lines.
> The Collector look for a Matching rule and I saw it in the debugger and
> also in the Sentinel web interface that I got the event/logfile. I also
> see in the debugger that the s_RXBufferString is exists. So I have to
> use the safesplit or split methods on this.s_RXBufferString, right? Or
> Should I use //.exec()? Or it is totally up to me to use whatever I
> want?
> If I saw it right, the /()()/.exec() makes/eval the regex and We got
> RegExp.$1-$9. If I use the /()()/.test() it will just give me wether the
> result of the regex is true or false. Right?
> When is it allowed to use field assignment (e.InitiatorUserName =
> this.username?
> What is the effect when I put the instance.SEND_EVENT into an another
> function for example normalize()? Or it is still OK to put elsewhere the
> send_event untill it is in one of the preparse(),parse(),normalize()
> functions?
> Do I have to create a variable like var empty_str or it is enough to do
> the this.emptry_str? The preparse(),parse(),normalize() are prototype
> javascript function so if I read it well, it is ok to use
> this.empty_str. Or will the this.empty_str dissappear after it jumps to
> the next function (because of the scope)?
> How can I decide when to use RXMapp and when s_RXBufferString? What if I
> don't see the s_Body, but have s_RXBufferString? I know that
> s_RXBufferString is line-oriented, but is i possible that my syslog/file
> data will be in the RXMap?
> What if i set the this.dun="testuser"; and in the Rec2Evt.map I add the
> UserTargetName,dun pair? It should be always present the TargetUserName
> when I look it in the Sentinel web interface, right?
> Are there any other source to learn how to create collector?
>
> Thank you for your answers!
Argh formatting! Let me take this from the top, and hopefully I
won't miss anything:
1) favor exec() over test(). Test is slower, can only handle a very
small number of captures (9), where exec is generally same or better
speed, I haven't hit a limit to the matches, and returns a consistent
indexed array.
2) I personally favor using e.FieldName over using the rec2evt.map,
because especially as a programmer I find it gives better flow control.
That goes against documented guidance a bit, but as long as you're okay
with the possibility of needing to
do a larger find and replace in the event of a schema name change, it's
really not that big of a deal (and if you use notepad++, it's really a
non-issue)
3) instance.SEND_EVENT is a global variable, so you're fine to set
it...anywhere. You can also just call e.send() and return false()
from any of the primary functions (parse(), preparse(), normalize() and
the custom versions of the same), although once again, you risk a
breaking change later, but once again, if you have a good editor, it's
not a big deal.
4) Javascript in general favors use of var over setting properties on
objects, and in my own code I tend to follow that rule. However, if
you need a value to transit between the Record methods, putting it on
the this object isn't a bad idea at all.
5) RXMap is only populated if a value coming in from the connector does
not follow the s_<propname>, i_<propname> nomenclature, or if it's one
of a few special fields that we happen to want at the top of the
metadata. For syslog stuff, you can generally safely not mess with
it.
6) So there are three fields that hold the "message string" for most
connectors:
s_raw_message_2 - the original and completely unfiltered string
s_RXBufferString - for most collectors, same as above, for syslog we
clean it up to be syslog RFC-friendly.
s_body - we strip off the syslog header.
Which field you parse depends on what you need. For an RFC-compliant
syslog stream, s_Body is the most convenient because it has all the
'standard' stuff parsed out and available through other connector
metafields; s_RXBufferString is generally good, but for some exceptional
event sources, our "clean up" actually is a bad thing, which leaves
s_raw_message_2. As a general rule for your use case, I would
recommend s_RXBufferString unless you find that s_Body gives you a clean
value.
7) for your Rec2Evt.map question, well yes - assumign that this.dun was
present and p
8) https://www.novell.com/developer/dev..._sentinel.html is the best
place to start and it's our main resource. If you need more of an A-Z
training, our training services group does offer a training class that
you may want to look into.
brandon.langley
brandon.langley's Profile: https://forums.netiq.com/member.php?userid=350
View this thread: https://forums.netiq.com/showthread.php?t=51349

Similar Messages

  • Garbage collector question

    I have a question about the garbage collection. You cant activate the garbage collector when you want but in JProbe tool you can request it pushing a button. Can i do this in my application?. I tried using System.gc() and Runtime.getRuntime.gc() but i cant get the same result. Any ideas?
    Thanks in advance and excuse me, my english is not so good.

    In Jprobe if you request a garbage collection you get
    a deep garbage collection that release much of the
    used heap size. But if i put in my code System.gc()
    only a little of space is released.The amount of released memory depends of course on the number of "unused" objects. If you allocate an array of bytes that's allmost the maximum size of the heap the JVM can use and you make it available for garbage collection by releasing the refernce the effect running the garbage collector is much bigger than if you only allocate an array of, let's say 32 bytes, and do the same. A complex GUI application allocates and releases lots of objects so it's possible to release a huge amount of heap space whereas a not so compex application uses fewer objects and there are less object to release by the garbage collector.

  • Garbage Collector Questions

    Howdy all,
    I've got a few questions about flash's garbage collector.  I'm building a  game and have all elements in a container sprite called _gameContainer.
    _gameConatiners contains other sprites such as _hudContainer which  contains more containers such as _gameoverContainer, _menuContainer,  etc.  So there's a whole hierarchy of containers that are all contained  in _gameContainer which is added directly to the document class (not the  stage btw).
    So the whole thing should basically be Stage -> Document Class -> _gameContainer -> etc.
    When the player loses or wants to restart the game, I'm removing all  event listeners (which are defined as weak, but still rather make sure  there's no loose ends), stopping all music/sounds, removing  _gameContainer from the stage, and then setting _gameContainer to null.   From there I am re-calling my init function which creates everything  (_gameContainer, and everything inside of it, as well as creating all the  standard eventlisteners).
    Am I doing everything upside down?  Is this *a* proper way of restarting  a game?  Mind you I dont say "the" proper way since I'm sure there's a  hundred different ways to do this.
    Also, on a separate note... If I have something such as an enemy, I keep all  enemy logic contained in the class linked to the movieclip on the  stage.  Who should be calling add/removechild?  Should I be using a  factory method that takes care of all this, or should I have the engine  create the enemy, and then have the enemy remove itself from stage?   Currently I'm using a mix of both, but generally I'll have a function in  the engine/caller add it to stage, then have the class have an  ADDED_TO_STAGE event listener.  When it comes time to remove the class, I  have it call it's own removeself function such as: (_container is a  reference to it's container as mentioned above such as _hudContainer)
    protected function removeSelf():void
        if(_container.contains(this)) {
            _container.removeChild(this);
        _container.parent.parent.dispatchEvent(new Event(Engine.START_GAME));
    Thanks!

    Wonderful question Travisism.
    The garbage collection is strange.  First I'm curious why you lump displayObjects into _gameConatiners.  Does _gameConatiners get added to the stage at any point?  Why not just add the proper hud at the point its required?
    Anyhow.  By removing listeners ,removeChild(_gameConatiners), and setting _gameConatiners=null does not mean these classes are killed.  null only marks the memory locations as having no more references to them.  When this occurs these objects may be removed from memory.  Why do I say may, that is because it takes a specific amount of memory utilized to trigger the garbage collection.
    Now just merely setting _gameConatiners=null may not ever kill your objects off.  You would be required to profile this and make sure they are dieing properly.  From the sounds of it you have a lot of inner children.
    There is reason to believe that in some cases, when an object is removed from the main stacks that its children will be removed as well.  Though, if the inner workings are so large, often the objects within referencing each other effects the way the garbace collection is stating they are still in use.  Thus keeping these objects alive.
    Its always best to kill off every reference being used.  You can do this by ensuring each object in your movieClip class declared a kill method, and continue trickeling down each object.  This ensures each object will be properly marked.
    As far as your movieClips a factory method is only for the creation of objects, never for the removal.
    You're best bet is to have an object that holds all objects on the stage in a collection.  When you destroy the game. Itterate through this collection and remove them from the stage there.
    This would fit into your engine concept.  There is no reason to use a displayObject for that since its just an object.  Better Yet use a Vector.<DisplayObject> to optimize this.
    Back to your question is this *a* proper way to reset.
    Yeah and No.  The asnwer is based on the memory usage your application eats, and the amount of time to rebuild all objects.  Ideally you should Pool any resources that can be reused versus having to rebuild.
    For example.  If you have a screen that says Game Over.  why would you have to rebuild it on a reset?  There is no information that was changed.   Each clip instantiation takes memory allocated and time.
    Unfortunately without seeing what you have its difficult to say.  But init methods are good and it can be wise to rebuild objects to being again, but as i said it depends.
    Lastly, your line:
    _container.parent.parent.dispatchEvent(new Event(Engine.START_GAME));
    Should not have parent.parent references within.  If you are creating a new Event, at least fall back on eventBubbling to allow the event to travel to the parent.parent.
    You should never target parents like that in a class.  Best practices is to pass in parent.parent as a reference to the class.
    What if you were to add one more layer of parents to the _container.  Then you would have to continue modifying parent.parent.parent.  At least if you bubble the event you dont have to be concerend at all about who listens to it.

  • ST03 Total Collector question

    Recently, SAP_COLLECTOR_FOR_PERMONITOR job was failing due to TSV_TNEW_PAGE_ALLOC_FAILED error in RSCOLL00 program. To fix the issue, I configured the table TCOLL according to the note 966309, I checked off Gen.Total under Expert Mode >Worload Collector > Total Collector> Control > RFC Server Profile. I even applied the correction in the note 1074281 so that Total Collector would work properly. This seem to have solve the issue of SAP_COLLECTOR_FOR_PERMONITOR.
    From my understanding when I checked off "Gen. Total" for RFC Server profile, it should not be calculating RFC steps number Under TOTAL for Day, Month and Week. However, the numbers for RFC steps seems approximate.
    Any suggestion on why the RFC number are still being calculated? or, am i missing something here?
    Best,
    Manish

    Hey Manish,
    When you check off the "Gen. Total" for RFC Server profile,
    it does not calculates the number of RFC steps in the "RFC Server profile" section, however, it should create the number of RFC per DAY in the workload and other sections...

  • Question in Product Cost Collectors

    Hi All,
    I have one question in Product Cost Collectors.
    We are using REM and we have multiple products with same BOM routing. Is it possible to assign several materials to to one Product Cost Collector inorder to reduce number of cost collectors.
    For example, for routing we can create  a Group and assign serveral materials to a group.
    Thanks and Regards
    Purushothaman

    Hi Purushottam,
    In REM, it is required to create it for every material.
    Even if material has more than one production version, need to create separate Product Cost Collector.
    Some more explanation on Product Cost Collector -
    u2022 Object in cost accounting used in Repetitive Manufacturing.
    u2022 A separate product cost collector can be created for each production version or material. The collected costs are settled to inventory at the end of the period.
    u2022 The functions performed for product cost collector during the period end closing process include :
    u2022     Work in process (WIP) caculation
    u2022     Variance calculation
    u2022     Settlement
    u2022 In Repetitive Manufacturing, all costs attributed to the production of a material are collected on a product cost collector and settled periodically (period-based Controlling).                                                             
    u2022 The product cost collector is settled periodically according to the posting period  (for example monthly) .                                                       
    u2022 For a material , product cost collector is made for each  version
    u2022 The actual cost collected can be viewed through product cost collector.
    Hope it is clear now.
    Srini

  • Assassin's Creed Unity Collector's Edition Shipping Question

    Hi,
    I am a best buy elite plus member. I have preordered the collector's edition for Assassin's Creed Unity from bestbuy.com. I noticed that the the only shipping issue is standard and that someone has to sign for it. Is there any chance of gaining expedited shipping for it?
    Solved!
    Go to Solution.

    Good day projectgamma,
    Thank you for being such a loyal Best Buy customer as a My Best Buy Elite Plus member! As a benefit, you should receive free expedited shipping on all of your orders, so I’m truly disheartened to hear that standard shipping appears to be what was chosen on the order.
    Using the email address you registered with the forum, I believe I was able to locate the order and the My Best Buy member ID. That being said, in order to look into this further for you, I am sending you a private message to gather some more details. You can check your private messages by signing into the forum and clicking the envelope icon in the top right corner of the page.
    Sincerely, 
    Tasha|Social Media Specialist | Best Buy® Corporate
     Private Message

  • New user and disgusting features - solveable questions?

    Hello all there
    I am a new iPod owner, migrated from a hateful 2 year old (now completely broken due to hate) MP3 player, and despite there are some interesting features, I have found some others that are making me considering asking my money back.
    Luckily I have no problems regarding USB or other things as a lot of you have experienced, I put the CD first of all and installed everything. No problems installing anything and the device was happily detected as an extraible unit which I liked very much (my previous player appeared as a "thing" instead as a drive)
    Its sound is pretty good, I like the sound I get. It's pretty customizable in terms of menus, and some other things like simplicity, despite there are things like the touchpads that I will never like and this is no exception, but this one works finer than any I have tested.
    What I don't have liked up to date, and I own it for 2 days (it's november 2nd), are some ugly or very ugly (should I say very very ugly? :D) features it lacks or it's designed to lack of. I like music very much and so I want it to be played the best way a player can provide. I also want players to be simple as a plastic duck mechanism, and somehow this player fills the bill, but not in these cases I want to expose and ask.
    1) 10 GB already copied and no album/artist/genre displayed
    Of all my media library, consisting of a folder with subfolders and files inside these subfolders (and no 'simple icon' for any program), where I do the things I want, like extracting songs from my CDs and turning them into MP3 files inside folders with the name "Band - Album", I chose folders for a size of 10 GB and, via explorer, copied & pasted on the root of the new drive, the iPod.
    No album/artist/genre/simple thing was found when I ejected the drive and started to browse.
    I must say, it froze twice before and after the copy. Luckily I knew, from reading the manual, how to make it work again. I expect things to freeze, despite it only shows bad programming from the company.
    But I saw the library as before I put it on for the first time. And there are 10 GB of MP3 files.
    My first question I asked to myself was: should I use the iTunes? I answered myself: I can't be bothered to be slaved to use a program with a player. That's one of the things I hated from my old player. And this one appears to be a removable drive. Good. But there are 10 GB of MP3 files and I can't play any of these albums.
    Somehow I used the iTunes and it started to do things. Like copying a whole folder with my albums (ALL OF THEM!!!!) to the player, or so it seemed to me. Well, first of all I don't want a program to copy everything it wants by simply saying it "This is my media folder where I decide what to be played here" (something like importing library was selected or pushed, I can't remember). I aborted it quickly as I saw the bar. FFS, to have a structured folder of my media doesn't mean I want ALL OF IT inside my player!!! How on earth you want me to select among 3,500 songs if you display them all to me in a complete raw list!!! Anyway, in the process it seemed to copy 3 albums before I stopped (needless to say, these albums were already in the player!!!). 2 were "sorted" and one was "unsorted", I mean, in the correct song order. The "unsorted" was alphabetically done according to WHATEVER so the order was never pure.
    I saw folders like Contacts, Notes and so on (what do we do us that don't use Outlook or Outlook Express and want to use these features? "Brilliant" one, designers... ¬_¬ Luckily I don't care about them) so I tried creating an 'Albums' folder and putting albums inside. Same success.
    So I asked myself again: are there ID3 tags needed always? The answer is simple: no. Because among these albums there are albums with and without tags. All of them unseen.
    My questions thus are these regarding the unavailability issues:
    Q1,1: how can I make these albums visible to the iPod?
    Q1,2:

    ... beautiful feature to truncate posts...
    It continues here.
    ... Q1,2: from now on, and for this player, am I a slave to iTunes?
    Q1,3: will anybody make a simple program for linux for using these devices? Luckily I have found some tools for Mandrake. But I would appreciate things were less complicated or companies take a look at this market.
    Q1,4: will anybodoy make, at once, a choice in a menu that allows the user to NOT TO SORT THE PLAYER BY THE ID3 TAGS??? My classical sort was and is in my 'puters to sort media by folders consisting of "Name of artist - Name of album", be it single, double, triple or quadruple, and inside, files with or without tags. For more than 1 CD albums I use the same folder, with songs named "CD# song_# song title". In these cases there are no tags because the stupid song# tag forces things that uses it to sort albums according to it. In albums like "Gov't Mule - Live... With A Little Help From Our Friends (collectors edition - 4 discs)" I ended up, in my old player, with first playing the first song of each CD, then after these 4 first songs, their 2nd 4 songs, then the 3rd ones... So I wiped the ID tags and finally it was sorted well, so I was happy. Is it so hard to ask for an option like "Do not read ID tags"????????
    2) Live albums
    I am a fanatic of live albums. I love to listen to them more than any studio album. I have single, double, triple and quadruple live albums I could listen to for hours, and from start to finish, and enjoy them all.
    I love to hear the public cheering and screaming, singing the songs, etc etc due to excitement the live albums give. My old MP3 CD player made, and a lot of car MP3 CD players make, a 2-3 seconds pause between songs. As for studio albums, but not for all of them (see Marillion's "Misplaced Childhood") show no problems, but for us that want continuity for albums like live ones, it is a disappointment.
    This player puts pauses between songs.
    Ok, less than 1 second pause, but I hate pauses. The feeling of the album is broken. There are silences where they shouldn't be. I ended up so excited I had to stop playing it.
    Q2,1: can I correct it from the control panel of the iPod or the iTunes? If not, will it be corrected on future updates?
    3) The sorting mania
    From some time I have seen players sort the albums in numerous ways: by genre, album name alone, artist name, year, etc. etc. etc. So let's suppose I want to make my list, WITHOUT HAVING TO MAKE A FIXED PLAYLIST JUST BECAUSE THESE ARE THE SONGS I WANT TO LISTEN FOR TODAY OR FOR 3 DAYS AND WHO KNOWS WHAT WILL I LISTEN TO NEXT WEEK, of some albums from some different artists. Some of them are simply called "Live" (for example, Golden Earring, Johnny Winter, Foghat, but I don't want to listen to Johnny Winter).
    By having sorted it by album name, they would appear as "Live". Which one belongs to who? If I go via Artist, I would have to jump as a frog from artist to artist and then browse their album list. If I go from Genre, I simply dunno because it is so mad I don't want to test it.
    Q3,1: If they are sorted my way (full list of albums named in my case "Artist - album 1", "Artist - album 2", but you can sort it the way you want to), I only have to move up and down and click on "Add me this one". Is it possible or must I go the crazy way?
    The package is beautiful. The player is also beautiful. Maybe I am a weird user because my demands are not expected. But I am a player user and I have my preferences. Nobody seems to care about people that want no complication. I am seriously thinking about getting my money back any way I can. I am asking friends if they can be interested in getting it because I am so extremely disappointed for an € 319 player I want my money back.
    Please, people that makes MP3 players, make things easier. Or just think about us and ask us what they would be. There is people that doesn't want any other sort than a simple album list. And that th

  • Urgent help with quick translation questions

    Hello,
    I am somewhat new to Java. I have a translation to hand in in a few hours (French to English). Argh! I have questions on how I worded some parts of the translation (and also if I understood it right). Could you, great developers, please take a look and see if what I wrote makes sense? I've put *** around the words I wasn't sure about. If it sounds strange or is just plain wrong, please let know. I also separated two terms with a slash, when I was in doubt of which one was the best.
    Many thanks in advance.
    1) Tips- Always ***derive*** the exceptions java.lang.Exception and java.lang.RuntimeException.
    Since these exceptions have an excessively broad meaning, ***the calling layers will not know how to
    distinguish the message sent from the other exceptions that may also be passed to them.***
    2) The use of the finally block does not require a catch block. Therefore, exceptions may be passed back to the
    calling layers, while effectively freeing resources ***attributed*** locally
    3) TIPS- Declare the order for SQL ***statements/elements*** in the constant declaration section (private static final).
    Although this recommendation slightly hinders reading, it can have a significant impact on performance. In fact, since
    the layers of access to data are ***low level access***, their optimization may be readily felt from the user’s
    perspective.
    4) Use “inlining.”
    Inlining is a technique used by the Java compiler. Whenever possible, during compilation, the compiler
    copies the body of a method in place of its call, rather than executing a ***memory jump to the method***.
    In the example below, the "inline" code will run twice as fast as the ***method call***
    5)tips - ***Reset the references to large objects such as arrays to null.***
    Null in Java represents a reference which has not been ***set/established.*** After using a variable with a
    large size, it must be ***reassigned a null value.*** This allows the garbage collector to quickly ***recycle the
    memory allocated*** for the variable
    6) TIPS Limit the indexed access to arrays.
    Access to an array element is costly in terms of performance because it is necessary to invoke a verification
    that ***the index was not exceeded.***
    7) tips- Avoid the use of the “Double-Checked Locking” mechanism.
    This code does not always work in a multi-threaded environment. The run-time behavior ***even depends on
    compilers.*** Thus, use the following ***singleton implementation:***
    8) Presumably, this implementation is less efficient than the previous one, since it seems to perform ***a prior
    initialization (as opposed to an initialization on demand)***. In fact, at runtime, the initialization block of a
    (static) class is called when the keyword MonSingleton appears, whether there is a call to getInstance() or
    not. However, since ***this is a singleton***, any occurrence of the keyword will be immediately followed by a
    call to getInstance(). ***Prior or on demand initializations*** are therefore equivalent.
    If, however, a more complex initialization must take place during the actual call to getInstance, ***a standard
    synchronization mechanism may be implemented, subsequently:***
    9) Use the min and max values defined in the java.lang package classes that encapsulate the
    primitive numeric types.
    To compare an attribute or variable of primitive type integer or real (byte, short, int, long, float or double) to
    ***an extreme value of this type***, use the predefined constants and not the values themselves.
    Vera

    1) Tips- Always ***derive*** the exceptions java.lang.Exception and java.lang.RuntimeException.***inherit from***
    ***the calling layers will not know how to
    distinguish the message sent from the other exceptions that may also be passed to them.***That's OK.
    while effectively freeing resources ***attributed*** locally***allocated*** locally.
    3) TIPS- Declare the order for SQL ***statements/elements*** in the constant declaration section (private static final).***statements***, but go back to the author. There is no such thing as a 'constant declaration section' in Java.
    Although this recommendation slightly hinders reading, it can have a significant impact on performance. In fact, since
    the layers of access to data are ***low level access***, their optimization may be readily felt from the user’s
    perspective.Again refer to the author. This isn't true. It will make hardly any difference to the performance. It is more important from a style perspective.
    4) Use “inlining.”
    Inlining is a technique used by the Java compiler. Whenever possible, during compilation, the compiler
    copies the body of a method in place of its call, rather than executing a ***memory jump to the method***.
    In the example below, the "inline" code will run twice as fast as the ***method call***Refer to the author. This entire paragraph is completely untrue. There is no such thing as 'inlining' in Java, or rather there is no way to obey the instruction given to 'use it'. The compiler will or won't inline of its own accord, nothing you can do about it.
    5)tips - ***Reset the references to large objects such as arrays to null.***Correct, but refer to the author. This is generally considered bad practice, not good.
    Null in Java represents a reference which has not been ***set/established.******Initialized***
    After using a variable with a
    large size, it must be ***reassigned a null value.*** This allows the garbage collector to quickly ***recycle the
    memory allocated*** for the variableAgain refer author. Correct scoping of variables is a much better solution than this.
    ***the index was not exceeded.******the index was not out of range***
    The run-time behavior ***even depends on compilers.***Probably a correct translation but the statement is incorrect. Refer to the author. It does not depend on the compiler. It depends on the version of the JVM specification that is being adhered to by the implementation.
    Thus, use the following ***singleton implementation:***Correct.
    it seems to perform ***a prior initialization (as opposed to an initialization on demand)***.I would change 'prior' to 'automatic pre-'.
    ***this is a singleton***That's OK.
    ***Prior or on demand initializations***Change 'prior' to 'automatic'.
    ***a standard
    synchronization mechanism may be implemented, subsequently:***I think this is nonsense. I would need to see the entire paragraph.
    ***an extreme value of this type******this type's minimum or maximum values***
    I would say your author is more in need of a technical reviewer than a translator at this stage. There are far too serious technical errors in this short sample for comfort. The text isn't publishable as is.

  • MenuStrip and a Question about Class win32_product

    Hello,
    I have a bunch of questions I'm hoping someone can answer.
    1.) I would like to add a menu separator and a checkbox under a dropdownitem for a toolstripmenuitem
         Similar to what you would see in ISE or Internet Explorer.
         I then need to pass the state of this checkbox into a function
    2.) I have created a file menu item and would like to create a separator and then add a list of MRU items restricted to only displaying the five previous opened config files.
    3.) Can someone propose an alternative to using the get-wmiobject win32_Product class
    The below function I wrote to get the Product Version for some VMware products, but it is slow making the initial connection.   Looking at the Uninstall registry key won't work because it doesn't contain the product version.
    I know it looks odd.  I could not find a good way to detect which servers the products were installed on.   So instead I pass the servers that would host these products based on our build standards.
    Function get-version($vcenter,$sso,$vum,$credentials) {
    Write-Host "Getting Version information. This usually takes awhile. Be Patient " -NoNewline
    $Roles = "VMware vCenter Server","VMware vCenter Inventory Service","VMware vSphere Web Client","vCenter Single Sign On","VMware vSphere Update Manager","vSphere Syslog Collector"
    $i = 0
    $output = @()
    $Servers = "$vcenter","$vcenter","$vcenter","$sso","$vum","$vum"
    $ErrorActionPreference = 'silentlycontinue'
    ForEach ($input in $Servers) {
    IF ($psversiontable.psversion.major -ge 3) { Write-Progress -activity "Getting Version Information - Takes awhile. Be Patient." -status $Roles[$i] -PercentComplete (($i / $roles.Length) * 100) } Else { ticker }
    $object = New-Object PSObject
    $object | Add-Member NoteProperty "Role" $Roles[$i]
    $object | Add-Member NoteProperty "Hostname" $Servers[$i]
    $object | Add-Member NoteProperty "IP Address" (Get-WmiObject Win32_networkadapterconfiguration -ComputerName $Servers[$i] -Credential $credentials | ? {$_.IPEnabled} | Select-Object IPaddress).IPaddress[0]
    $object | Add-Member NoteProperty "Version" (Get-WmiObject win32_Product -ComputerName $Servers[$i] -Credential $credentials | Where-Object {$_.Name -eq $Roles[$i]}).version
    $output += $object
    $i++
    IF ($PSVersionTable.PSVersion.Major -ge 3) { Write-Progress -activity "Completed Getting Version Information" -Completed } Else { write-host "...Done!" -NoNewline }
    write-host ""
    $output
    } # End Function get-Version
    Walter

    Your code doesn't relay make much sense.
    What is this line for:
    $Servers = "$vcenter","$vcenter","$vcenter","$sso","$vum","$vum"
    Funtion get-version($vcenter,$sso,$vum,$credentials
    Why are you using credentials.  Only and admin can call remotely?
    Are you trying to get all of these roles? Aren't these produces?
    $Roles  = "VMware vCenter Server","VMware vCenter Inventory Service","VMware vSphere Web Client","vCenter Single Sign On","VMware
    vSphere Update Manager","vSphere Syslog Collector"
    ¯\_(ツ)_/¯

  • Optimization of the JVM memory - Garbage Collector

    Hi ,
    Just a question about JVM memory management.
    There is memory limitation of memory usage limitation (1.6M) in JVM.
    Is there any possibility to use "Garbage collector" mechanism to optimize the memory usage?
    Or any suggestions for the JVM memory optimization?
    Thanks a lot!!!

    nicolasmichael wrote:
    Hi,
    the "memory limitation" does not have anything to do with garbage collection, but with the address space your operating system provides. On a 32bit operating system, your virtual address space is limited to <= 4 GB, depending on your operating system (for example 1.something GB on Windows and 3.something GB on Solaris). No.
    Windows 32 bit has a 2 GB application space and can be configured to allow a 3GB space.
    The Sun VM does not allow more because of the way that the executable is linked.
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4358809]

  • Possible Bug in Garbage Collector?

    Hello all
    I'm new to these forums but I searched for this problem and couldn't find exactly the same thing - apologies if I missed something.
    I've written an image browser which displays thumbnails, and when you click on a thumbnail it loads the image in a new window. This new window is just a JFrame, with a single JLabel, with an ImageIcon in it, representing the picture. The path name of the picture is passed when this JFrame is created, and the picture is loaded within the JFrame. Therefore, when I close the JFrame, I expect the memory associated with the image to disappear.
    This works. However, when I open a fairly large image (around 1500x1500 pixels), and then close the window, the garbage collector doesn't free the memory. After this, if i continue to open windows with smaller images, they too have the same problem. However, this doesn't happen with smaller images until I open a larger image.
    I think this is a problem with the garbage collector, is this familiar to anyone? Can anyone help? Unfortunately I can't really paste code since this is a university assignment. But you can try it - just load a jframe with a large picture, close it, and as long as the program runs the memory will not be deallocated.
    Any help would be massively appreciated.
    Thanks

    Since you're not willing to post your code it's very hard to comment.
    One question: Are you calling System.gc() after closing these frames? In fact you should probably call it 3 times to make sure the garbage collector takes you seriously. Try this and let us know if you're still showing the leak

  • Mail report question

    Hi there,
    This may be a crazt question but I was curious if there was a way to get information from apple mail in report format.
    I would like to create report showing waht folder the email is in.
    My reason for doing this I seem tobe missing emails.  So instead of going in to each folder, I wondered if I could generate a report of some kind to do it.  Maybe an Applescript?  I do not know how to create scripts.
    Or is there a way to add an additonal header in MAIL that would show the folder the email is saved in?
    Thanks and I look forward to your reply.
    ...Bruce

    OK, so first some background:
    1) The basic process goes like this:
    a) one release doc (edited by the developer, presumably) and the
    template docs are copied to the build area
    b) Each doc is unzipped (ODT's are just ZIP files) into a subdir
    c) The doc contents are copied around; this is to allow Ant to
    replace its special @VAR@ variables in the document content
    d) The docs are zipped back up into ODTs
    e) The ODTs are converted into PDFs using OOo's macro functionality
    Here are the troubleshooting steps I would apply:
    1) Make sure the external.odt file exists - check the build area
    (//content/build/<pluginname>/tmp/) and can be opened using normal
    OpenOffice
    2) Check that the release.odt file exists (same location) and can be
    opened using normal OpenOffice
    3) See if you can manually convert the external.odt file into a PDF -
    the command we use is simply:
    soffice -invisible
    macro:///Standard.Collectors.External2PDF(${pkgdir}/tmp/external.odt)
    (replace ${pkgdir} with the build directory path).
    If all that works, then the Ant build process should work.
    Also - what does that OpenOffice error popup say?
    DCorlette
    DCorlette's Profile: http://forums.novell.com/member.php?userid=4437
    View this thread: http://forums.novell.com/showthread.php?t=416875

  • JNI / Garbage Collection question

    I have a C++ library I am calling into from our application. The question I have is I want the library to return a jintarray or a jstringarray (not sure which yet). If they create that array in the function and then return it to me as the return type, will the Garbage collector automatically free the memory for that array once I am done using it, or do I need to manually free it some how since the array was created in the c code?
    Thanks,
    Jeffrey Haskovec

    Java objects whether they are create in java or JNI are all managed by the VM.

  • CORBA and garbage collector

    Hi,
    I�m writing a server with a method create(), which returns a new object supplying a home banking service for the clients.
    My question is : when a given client has finished with the home banking object, do I need to call the gc, or is there an efficient one with CORBA (a kind of distributed garbage collector) ?
    Thank you in advance

    Maybe you heard about Distributed Garbage Collector (DGC)? Don't rely on this, since IIOP does not support this. Use PortableRemoteObject.unexportObject() to make remote objects that are no longer in use available for garbage collection.
    Bert

  • Implement custom.js in Generic Event Collector

    Sentinel Log Manager 1.2
    Collector: Generic Event Collector
    Hello,
    sorry for this low end question, but I'm going crazy. I try to
    implement a custom.js to get some data into CustomerVar fields.
    My problem, if I start with simple code and implement the file like
    described here http://tinyurl.com/cgvtaab. If I checked my Sentinel Log
    Manager no additional data was writen to the event record. I stripped my
    code to a realy simple example, to exclude errors here:
    Collector.prototype.customInit = function() {
    this.protoEvt.CustomerVar21 = "test log";
    return true;
    Record.prototype.customPreparse = function(e) {
    return true;
    Record.prototype.customParse = function(e) {
    return true;
    The collector runs in "custom" execution mode.
    Thanks for help
    Michael
    michaelkuerschner
    michaelkuerschner's Profile: https://forums.netiq.com/member.php?userid=6939
    View this thread: https://forums.netiq.com/showthread.php?t=50155

    Hi folks,
    Couple quick things:
    1) You were absolutely correct to put your code in customInit() as you
    originally did - commenters are correct that the init code is only run
    on startup, but in this case what you're doing is modifying the static
    global protoEvt, which is the template on which all subsequent Events
    are based. If you do run through this in the debugger, then what you
    should see is that immediately after the 'curEvt = new
    Event(instance.protoEvt)' line in main.js (which should be at the bottom
    of your assembled Collector), your 'curEvt' global variable should have
    that CustomerVar21 set in it. Further, when you get to the Event.send()
    bit, the Event you are constructing should have that pre-set. You can of
    course look at the protoEvt object in the debugger as well to make sure
    that it actually was modified by your customInit().
    2) I saw that you actually did call out that you set Custom execution
    mode, but you did not mention AFAIK that you did the 'Add Auxiliary
    File' step to upload your edited custom.js into the Collector. Can we
    assume you did that?
    BTW, just a tip on the debugger: read through:
    http://www.novell.com/developer/plug...tor_debug.html
    Note the bit about scrolling to the bottom of your file to find the main
    loop - this is where all the action happens, so put your breakpoints
    there (typically).
    DCorlette
    DCorlette's Profile: https://forums.netiq.com/member.php?userid=323
    View this thread: https://forums.netiq.com/showthread.php?t=50155

Maybe you are looking for

  • Not able to open R12 on fire fox

    Guys, This morning I have updated my firefox and since then I am not able to go beyond self service page in R12. I am getting the below error: "In order to access this application, you must install the J2SE Plugin version 1.6.0_07. To install this pl

  • How to enable email notifications in a OracleAS Portal Approval Chain

    How can I setup my Portal (10gR2 -10.1.4) to send a notification email on events in a approval chain? I wish to send emails to approvers and to publishers, with the result of the approval chain.

  • How can I call a servlet from a javascript

    Hello I have a JSP page that has 2 aim : save and list. I want to use javascript like this to call my save and list methods : <SCRIPT language="JavaScript"> function savedata(){ document.kaydetsorgula.action = "hatBilgisiKaydetKontroller.java"; docum

  • You Tube

    I've got a problem with You Tube. Everytime I try to open something, it works a few seconds, and then it stops. I can't play anything. Could be a problem with the internet connection? Please help me.

  • Browser crashing Macbook, I think

    Hi everyone, My Macbook is crashing multiple times per day. It seems to correlate to when I have a browser open, and happens in both Safari and Firefox. I get the beachball for a few seconds (during which I can still switch programs) and then the com