=head1 NAME 

mrtg-uptime - Returns uptime and idle data from /proc/uptime

=head1 SYNOPSIS

B<mrtg-uptime> ([B<-t> sys|idle] [B<-m> I<multiplier>] [B<-u> s|m|h|d])*2 [B<-c> I<#cores>]

=head1 DESCRIPTION

mrtg-uptime returns the information from /proc/uptime.
The output is written in a form useful as input for the MRTG utility.
Every parameter can be accepted twice and allow to control the two values in the output, with the exception of B<-c> that only affects idle uptime.

=over 

=item B<-t> sys|idle

Sets the uptime parameter in the output.
If just one is set, the other one will be zero.
The parameter B<sys> refers to the time the system has been up.
The parameter B<idle> refers to the time the machine has spent idle.

=item B<-m> I<multiplier>

Sets the multiplier to be used in the output.
For example, if the value is 280936.41 and a multiplier of 100, the output would be 28093641.
If it is defined once, affect both output values.
The default multiplier is 1.

=item B<-u> s|m|h|d

Sets the unit of the parameter.
It can be expressed in (s)econds, (m)inutes, (h)ours, or (d)ays.
If it is defined once, affect both output values.
The default is seconds.

=item B<-c> I<#cores>

Because the idle uptime measures the cumulative time each processor, ignoring the amount of cores, the resulting value is the sum of how much time each core has spent idle.
This parameter divides the value by I<#cores> (an integer) to get the average idle time per core.
Default is 1.

=back

=head1 EXAMPLES

Prints the average idle uptime of a core in a dual-core and the system uptime, both in minutes.

=over

mrtg-uptime -t idle -t sys -u m -c 2

=back

Prints the uptime in hours and in seconds.

=over

mrtg-uptime -t sys -u h -t sys -u s

=back


=head1 SEE ALSO

mrtg(1)

=head1 AUTHORS

Randolph Chung E<lt>tausq@debian.orgE<gt> is the orginal writer of mrtgutils.

Luciano Bello E<lt>luciano@debian.orgE<gt> wrote mrtg-uptime and this manpage.

=head1 HISTORY 

This document first appeared with mrtgutils-0.8.2
