You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by iamithink <le...@gmail.com> on 2009/06/01 19:17:32 UTC

How to get number of optimizes

Hello,

I'm looking for a simple way to automate (in a shell script) a request for
the number of times an index has been optimized (since the Solr webapp has
last started).  I know that this information is available on the Solr stats
page (http://host:port/solr/admin/stats.jsp) under Update
Handlers/stats/optimizes, but I'm looking for a simpler way than to retrieve
the page using wget or similar and parse the HTML.  More generally, is there
a convenient way to get at the other data presented on the Stats page?  I'm
currently using Solr 1.2 but will be migrating to 1.3 soon in case that
makes a difference.

Thanks... 
-- 
View this message in context: http://www.nabble.com/How-to-get-number-of-optimizes-tp23818563p23818563.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to get number of optimizes

Posted by iamithink <le...@gmail.com>.
Thanks for the quick response.  I agree that for this one-off task the grab
and parse method works fine, but I'll keep the JMX interface in mind for
other tasks in the future.

Here's my particular hack solution in case this helps anyone else:

wget -q -O- http://hostname:port/solr/admin/stats.jsp | awk
'/optimizes/{getline;print}'



Eric Pugh-4 wrote:
> 
> Not sure if it's simpler, but the JMX interface is more structured.
> 
> I think that just grabbing the page and parsing out the content with  
> your favorite tool (Ruby & Hpricot????) is pretty simple.
> 
> Eric
> 
> On Jun 1, 2009, at 1:17 PM, iamithink wrote:
> 
>>
>> Hello,
>>
>> I'm looking for a simple way to automate (in a shell script) a  
>> request for
>> the number of times an index has been optimized (since the Solr  
>> webapp has
>> last started).  I know that this information is available on the  
>> Solr stats
>> page (http://host:port/solr/admin/stats.jsp) under Update
>> Handlers/stats/optimizes, but I'm looking for a simpler way than to  
>> retrieve
>> the page using wget or similar and parse the HTML.  More generally,  
>> is there
>> a convenient way to get at the other data presented on the Stats  
>> page?  I'm
>> currently using Solr 1.2 but will be migrating to 1.3 soon in case  
>> that
>> makes a difference.
>>
>> Thanks...
>> -- 
>> View this message in context:
>> http://www.nabble.com/How-to-get-number-of-optimizes-tp23818563p23818563.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
> 
> -----------------------------------------------------
> Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 |
> http://www.opensourceconnections.com
> Free/Busy: http://tinyurl.com/eric-cal
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-get-number-of-optimizes-tp23818563p23818964.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to get number of optimizes

Posted by Eric Pugh <ep...@opensourceconnections.com>.
Not sure if it's simpler, but the JMX interface is more structured.

I think that just grabbing the page and parsing out the content with  
your favorite tool (Ruby & Hpricot????) is pretty simple.

Eric

On Jun 1, 2009, at 1:17 PM, iamithink wrote:

>
> Hello,
>
> I'm looking for a simple way to automate (in a shell script) a  
> request for
> the number of times an index has been optimized (since the Solr  
> webapp has
> last started).  I know that this information is available on the  
> Solr stats
> page (http://host:port/solr/admin/stats.jsp) under Update
> Handlers/stats/optimizes, but I'm looking for a simpler way than to  
> retrieve
> the page using wget or similar and parse the HTML.  More generally,  
> is there
> a convenient way to get at the other data presented on the Stats  
> page?  I'm
> currently using Solr 1.2 but will be migrating to 1.3 soon in case  
> that
> makes a difference.
>
> Thanks...
> -- 
> View this message in context: http://www.nabble.com/How-to-get-number-of-optimizes-tp23818563p23818563.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

-----------------------------------------------------
Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com
Free/Busy: http://tinyurl.com/eric-cal





Re: How to get number of optimizes

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hello,

That stats page is really XML + XSLT that transforms the XML to HTML.  View the source of the stats page.  That should make it very easy to parse the stats response/page and extract the data you need.

 Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: iamithink <le...@gmail.com>
> To: solr-user@lucene.apache.org
> Sent: Monday, June 1, 2009 1:17:32 PM
> Subject: How to get number of optimizes
> 
> 
> Hello,
> 
> I'm looking for a simple way to automate (in a shell script) a request for
> the number of times an index has been optimized (since the Solr webapp has
> last started).  I know that this information is available on the Solr stats
> page (http://host:port/solr/admin/stats.jsp) under Update
> Handlers/stats/optimizes, but I'm looking for a simpler way than to retrieve
> the page using wget or similar and parse the HTML.  More generally, is there
> a convenient way to get at the other data presented on the Stats page?  I'm
> currently using Solr 1.2 but will be migrating to 1.3 soon in case that
> makes a difference.
> 
> Thanks... 
> -- 
> View this message in context: 
> http://www.nabble.com/How-to-get-number-of-optimizes-tp23818563p23818563.html
> Sent from the Solr - User mailing list archive at Nabble.com.