File: mrtg-uptime.pod

package info (click to toggle)
mrtgutils 0.8.3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 124 kB
  • ctags: 42
  • sloc: ansic: 497; makefile: 32
file content (77 lines) | stat: -rw-r--r-- 2,019 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
=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