Am 15.06.2009 um 10:34 schrieb Felix Schäfer:

> Am 08.06.2009 um 16:15 schrieb Paul Nasrat:
>
>> Facter.add(:uptime) do
>>   confine :kernel => %w{SunOS AIX}
>>   setcode do
>>      #generic uptime command processing
>>   end
>> end
>
>
> To make sure I don't forget anyone: I have the generic outputs of
> 'uptime' for OpenSuse, Gentoo (whcih naturally have decided to differ
> by a ',') and OS X, can anyone with a SunOS, AIX, or wherever else
> 'uptime' is available (maybe some other BSD?) send me the output of:
> """
> LANG='C' uptime
> """

I'd like to correct that. I almost wish I hadn't started on that path,  
because it seems not only every OS, but every other distribution has  
its own version for the output of uptime. If anyone is interested in  
having a look at the code (or test it once I'm happy with it, which  
for now I am not!), I've created a new branch[1] on my github fork,  
the most interesting file being lib/facter/util/uptime.rb[2].

Anyway, my problem here is that not only do the different systems have  
different outputs, but they sometimes differ quite a lot on key times,  
like some showing '1:00' and others '1 hr', or '0:03' and '3 mins',  
and so on. To be sure I don't forget anyone, I'd like to write tests  
with a large number of different inputs from various systems. I can  
cover some Linux distributions (I think I have some VMs lying around  
for Ubuntu, RHEL5, OpenSUSE, and a machine with Gentoo) and OS X  
Leopard, and I have limited access (no reboot) to a SunOS 5.10 Box,  
but I'd need some help on other platforms. I'd need the output of the  
following for at least a day, having it for 2 days from boot being  
even better:
"""
while true; do LANG='C' uptime >> uptime.facter; sleep 60; done
"""
Just send me the file, I'll take care of having a look at it.

TIA,

Felix


[1] http://github.com/thegcat/facter/tree/uptime
[2] 
http://github.com/thegcat/facter/blob/59a7e6980d83337ec17ef2426bdfc72a942481ba/lib/facter/util/uptime.rb
 
  at the time of this writing
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to