SYNOPSISmrtg-uptime ([-t sys|idle] [-m multiplier] [-u s|m|h|d])*2 [-c #cores]
DESCRIPTIONmrtg-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 -c that only affects idle uptime.
- -t sys|idle
- Sets the uptime parameter in the output. If just one is set, the other one will be zero. The parameter sys refers to the time the system has been up. The parameter idle refers to the time the machine has spent idle.
- -m 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.
- -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.
- -c #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 #cores (an integer) to get the average idle time per core. Default is 1.
EXAMPLESPrints the average idle uptime of a core in a dual-core and the system uptime, both in minutes.
- mrtg-uptime -t idle -t sys -u m -c 2
Prints the uptime in hours and in seconds.
- mrtg-uptime -t sys -u h -t sys -u s
AUTHORSRandolph Chung <[email protected]> is the orginal writer of mrtgutils.
Luciano Bello <[email protected]> wrote mrtg-uptime and this manpage.
HISTORYThis document first appeared with mrtgutils-0.8.2