From: Arunkumar S <aru...@gm...> - 2014-06-21 00:21:58
|
Hi, I have a CIM Client CLI utility which connects to my SFCB provider to manage the remote system. Now, I have a requirement to copy the log files ( of huge size around 20MB ) from the remote system through CIM. Is there any standard mechanism to achieve this. ? My managed system have strict memory limitation, due to that, I can't allocate string buffer for 20MB and pass the string as CMPI output value from Provider to CLI client. Thanks, Arun |
From: Chris B. <buc...@li...> - 2014-06-24 01:01:19
|
Hi Arun, SFCB does not provide a method for log file retrieval. To do it via the CIM interface, you would need to have a provider with that functionality. You may be able to use HTTP chunking to reduce the size of the buffers SFCB creates when returning data. The chunking feature is enabled by default for SFCB, but the request needs to send "TE: Trailers" as an HTTP header for SFCB to chunk the response. Another way to to this (if you have a provider that supports it) is to issue an ExecQuery request to return a subset of the log file lines (for example, all the log lines for a given date). Alternatively if EQ requests aren't supported, issue a lot of GetInstanceRequests for RecordInLog (or whatever class is relevant to the log file). -Chris On 06/20/2014 08:21 PM, Arunkumar S wrote: > Hi, > > I have a CIM Client CLI utility which connects to my SFCB provider to > manage the remote system. > Now, I have a requirement to copy the log files ( of huge size around > 20MB ) from the remote system through CIM. > > Is there any standard mechanism to achieve this. ? > My managed system have strict memory limitation, due to that, I can't > allocate string buffer for 20MB and pass the string as CMPI output > value from Provider to CLI client. > > Thanks, > Arun > |
From: Dave H. <hel...@li...> - 2014-06-24 21:54:54
|
One way to implement such a provider would be to handle each log or logfile as a separate class, and define various methods against that class to retrieve the log as a sequence of records. Assuming each record has a timestamp, you could have a method like "getEventsByTimestamp",that would allow you to request records within a date range, as Chris suggested. Similarly, you could assign each record in the log a sequence number or recordid, and have a method such as "getLogsByReordID" that would allow you to request a number of records starting with a particular record id, or using the most recent recordid by default. You could return your results as a CMPIArray of string objects, with each object holding one log record. Or you could choose to implement each record as an instance of a CMPI class (which would allow you to store timestamp or other metadata as properties) and return a CMPIArray of CMPIInstances. On 06/23/2014 08:59 PM, Chris Buccella wrote: > Hi Arun, > > SFCB does not provide a method for log file retrieval. > > To do it via the CIM interface, you would need to have a provider with > that functionality. You may be able to use HTTP chunking to reduce the > size of the buffers SFCB creates when returning data. The chunking > feature is enabled by default for SFCB, but the request needs to send > "TE: Trailers" as an HTTP header for SFCB to chunk the response. > > Another way to to this (if you have a provider that supports it) is to > issue an ExecQuery request to return a subset of the log file lines (for > example, all the log lines for a given date). Alternatively if EQ > requests aren't supported, issue a lot of GetInstanceRequests for > RecordInLog (or whatever class is relevant to the log file). > > > -Chris > > On 06/20/2014 08:21 PM, Arunkumar S wrote: >> Hi, >> >> I have a CIM Client CLI utility which connects to my SFCB provider to >> manage the remote system. >> Now, I have a requirement to copy the log files ( of huge size around >> 20MB ) from the remote system through CIM. >> >> Is there any standard mechanism to achieve this. ? >> My managed system have strict memory limitation, due to that, I can't >> allocate string buffer for 20MB and pass the string as CMPI output >> value from Provider to CLI client. >> >> Thanks, >> Arun >> > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > > > > _______________________________________________ > Sblim-devel mailing list > Sbl...@li... > https://lists.sourceforge.net/lists/listinfo/sblim-devel > |