[Spacewalk-list] Retrieve uptime via the API

Justin Sherrill jsherril at redhat.com
Sat Jul 25 03:28:20 UTC 2009


Brandon Galbraith wrote:
> Luis,
> 
> If someone responds offlist, or you find out, could you let me know? I'm
> looking for a solution to this as well.
> 
> Thanks!
> -brandon
> 
> On Fri, Jul 24, 2009 at 11:24 AM, Luis Garcia <luis.garciavega at gmail.com
> <mailto:luis.garciavega at gmail.com>> wrote:
> 
>     Hiya Spacewalkers,
> 
>     Is there a way, via the api, to retrieve the uptime of a particular
>     system?  I've searched the system,  system.config, system.custominfo
>     and system.search documentation,  but I wasn't able to find anything.
> 
>     I don't need a fancy date or anything. just the numbers of days up
>     would work.
> 
>     Reading the comments on the backend/server/handlers/xmlrpc/queue.py
>     file, it seems like the system sends the uptime to the spacewalk
>     server, and then the server calculates the actual date and time of the
>     last reboot.
> 
>     Any Ideas?
> 
>     Thanks,
>     ~Luis
> 
>     _______________________________________________
>     Spacewalk-list mailing list
>     Spacewalk-list at redhat.com <mailto:Spacewalk-list at redhat.com>
>     https://www.redhat.com/mailman/listinfo/spacewalk-list
> 
> 
> 
> 
> -- 
> Brandon Galbraith
> Mobile: 630.400.6992
> FNAL: 630.840.2141
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list

Looking through the spacewalk api docs located here:
https://fedorahosted.org/spacewalk/wiki/ApiDocs

I don't see see that information listed.  I'll see if i can get it into
the 0.6 api additions though.  We'd probably just add something like
'last_boot' to the system.getDetails()  call.

I went ahead and added that work task to this list (search for last_boot):
https://fedorahosted.org/spacewalk/wiki/ApiAdditions

Cheers!

-Justin

-- 
Justin Sherrill, RHCA          1801 Varsity Drive.
Software Engineer                Raleigh, NC 27603
Red Hat, Inc.




More information about the Spacewalk-list mailing list