| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
The sysctl uptime fixture was little endian, which fails on sparc
hardware. Added a big endian fixture and endian detection.
|
| |
|
|
|
|
| |
Due to "netstat -rn" returning multiple protocols (IPv4 and IPv6) the
"default_interface" can get more than one entry in to it, causing the
macaddress resolving to break. This limits it to just one interface.
|
| |
|
|
|
|
|
|
| |
This stubs out the platform side of the code, and uses fixtures emitting the
right output from the interface configuration tools.
Paired-With: Matt Robinson <matt@puppetlabs.com>
Paired-With: Max Martin <max@puppetlabs.com>
|
| |
|
|
|
|
|
|
|
| |
'who -b' doesn't report the year of the last system boot on (at least)
Solaris 10, and OpenSolaris 2009.06. Try using 'kstat -p
unix:::boot_time', which reports as seconds since the epoch on these
systems before falling back to 'who -b'.
Reviewed-by: Paul Berry <paul@puppetlabs.com>
|
| |\ |
|
| | | |
|
| | |
| |
| |
| | |
* With tests for 9.8.0, 10.3.0 and 10.6.4
|
| |/
|
|
|
|
|
|
|
| |
Regexp tested the s_context or VxID field if /proc/self/status and
returned false for 0 and true for any other number. 0 indicates a host,
which is still virtual.
Fix changes regexp to correctly report hosts as virtual. Tested against
vserver 2.1 and 2.3.
|
|
|
Rewrite of uptime facts and supporting utility methods. Works on unix,
BSD, windows. No longer makes redundant system calls.
Uses Facter::Util::Uptime utility methods:
* Implemented uptime_seconds_unix using /proc/uptime or who -b on unix,
sysctl on BSD.
Added unit tests for the behaviors of get_uptime_seconds_unix: read
from proc/uptime, read uptime from "sysctl -b kern.boottime", read
uptime from "who -b", and return nil if nothing else works.
* Implemented uptime_seconds_win using the Win32 API.
Facts implemented:
* uptime_{seconds,hours,days}
Returns the respective integer value.
* uptime
Returns human readable uptime statistic that preserves original
behavior.
Examples:
3 days
1 day
5:08 hours
0:35 hours
|