<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="IncrediMail 1.0" name=GENERATOR></HEAD>
<BODY style="BACKGROUND-POSITION: 0px 0px; FONT-SIZE: 12pt; MARGIN: 5px 10px 10px; FONT-FAMILY: Arial" bgColor=#ffffff background="" scroll=yes ORGYPOS="0">
<TABLE id=INCREDIMAINTABLE cellSpacing=0 cellPadding=2 width="100%" border=0>
<TBODY>
<TR>
<TD id=INCREDITEXTREGION style="FONT-SIZE: 12pt; CURSOR: auto; FONT-FAMILY: Arial" width="100%">
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I've copied and pasted your command lines and nothing appears in both host_name_vars and service_description_vars. I thing your regexes are incorrect/incomplete.</DIV>
<DIV> </DIV>
<DIV>(sed -n '/^[^#].*host_name/{s/.*host_name[\t ]*\([^\t ]*\)/\1/;p}' /usr/local/nagios/etc/hosts.cfg| sort | uniq > host_name_vars)</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV id=IncrediOriginalMessage><I>-------Message original-------</I></DIV>
<DIV> </DIV>
<DIV id=receivestrings>
<DIV dir=ltr style="FONT-SIZE: 11pt"><I><B>De :</B></I> <A href="mailto:ae@op5.se">Andreas Ericsson</A></DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt"><I><B>Date :</B></I> 06/10/05 10:46:03</DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt"><I><B>A :</B></I> <A href="mailto:nagios-users@lists.sourceforge.net">'nagios-users@lists.sourceforge.net'</A>; <A href="mailto:nagios-devel@lists.sourceforge.net">nagios-devel</A></DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt"><I><B>Sujet :</B></I> [Nagios-users] host_name and service_description examples</DIV></DIV>
<DIV> </DIV>
<DIV>Ahoy all, and sorry for cross-posting.</DIV>
<DIV> </DIV>
<DIV>I'm working on improving the hash-functions in Nagios in an effort to</DIV>
<DIV>boost performance. To do that, I need some real-world example input of</DIV>
<DIV>host_name and service_description variables to get accurate timing</DIV>
<DIV>results of the various hash-functions I'm considering.</DIV>
<DIV> </DIV>
<DIV>Please understand that I'll be posting the test-data variables along</DIV>
<DIV>with the example timing code, so if your variables of that kind contain</DIV>
<DIV>sensitive information you shouldn't send it.</DIV>
<DIV> </DIV>
<DIV>You can use the two commands below to extract host_names and</DIV>
<DIV>service_descriptions from your configuration.</DIV>
<DIV> </DIV>
<DIV>Note that <cfg-files> should be replaced with something like</DIV>
<DIV>/usr/local/nagios/etc/*.cfg on a default installation. Mind the</DIV>
<DIV>line-breaks. Both sed-commands should be on a single line.</DIV>
<DIV> </DIV>
<DIV>sed -n '/^[^#].*host_name/{s/.*host_name[\t ]*\([^\t ]*\)/\1/;p}'</DIV>
<DIV><cfg-files> | sort | uniq > host_name_vars</DIV>
<DIV> </DIV>
<DIV>sed -n '/^[^#].*service_description/{s/.*service_description[\t ]*\([^\t</DIV>
<DIV>]*\)/\1/;p}' <cfg-files> | sort | uniq > service_description_vars</DIV>
<DIV> </DIV>
<DIV>Please compress the files host_name_vars and service_description_vars</DIV>
<DIV>prior to sending it to me. bzip2 does the best job with text-files.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thanks for helping out.</DIV>
<DIV> </DIV>
<DIV>--</DIV>
<DIV>Andreas Ericsson                   <A href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</A></DIV>
<DIV>OP5 AB                             <A href="http://www.op5.se">www.op5.se</A></DIV>
<DIV>Lead Developer</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>-------------------------------------------------------</DIV>
<DIV>This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput</DIV>
<DIV>a projector? How fast can you ride your desk chair down the office luge track?</DIV>
<DIV>If you want to score the big prize, get to know the little guy.</DIV>
<DIV>Play to win an NEC 61" plasma display: <A href="http://www.necitguy.com/?r=20">http://www.necitguy.com/?r=20</A></DIV>
<DIV>_______________________________________________</DIV>
<DIV>Nagios-users mailing list</DIV>
<DIV><A href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</A></DIV>
<DIV><A href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</A></DIV>
<DIV>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.</DIV>
<DIV>::: Messages without supporting info will risk being sent to /dev/null</DIV>
<DIV> </DIV>
<DIV> </DIV></TD></TR>
<TR>
<TD id=INCREDIFOOTER width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD width="100%"></TD>
<TD id=INCREDISOUND vAlign=bottom align=middle></TD>
<TD id=INCREDIANIM vAlign=bottom align=middle></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><SPAN id=IncrediStamp><SPAN ltr??><A href="http://www.incredimail.com/index.asp?id=412&lang=12"><IMG alt="" hspace=0 src="cid:5CE04A73-6448-4F75-8339-A8990EA36908" align=baseline border=0></A></SPAN></SPAN></BODY></HTML>