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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH POWERSTAT 8 "23 January, 2014"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
powerstat \- a tool to measure laptop power consumption.
.br
.SH SYNOPSIS
.B powerstat
.RI [ \-b ]
.RI [ \-d " secs]
.RI [ \-h ]
.RI [ \-i " idle]
.RI [ \-p ]
.RI [ \-r ]
.RI [ \-s ]
.RI [ \-z ]
.RI [ delay " [count]]
.br
.SH DESCRIPTION
powerstat is a program that measures the power consumption of a mobile PC
that has a battery power souce. The output is like vmstat but also shows
power consumption statistics. At the end of a run, powerstat will calculate
the average, standard deviation and min/max of the gathered data.
Note that running powerstat as root will provide extra information about
processes that have fork'd, exec'd and exited.
.SH OPTIONS
powerstat options are as follow:
.TP
.B \-b
redo a sample measurement if a system is busy, the default for busy is considered less than 98% CPU idle. The
CPU idle threshold can be altered using the \-i option.
.TP
.B \-d
specify delay before starting, default is 15 seconds. This gives the machine time to settle down and to
dim the laptop display when in idle mode.
.TP
.B \-h
show help.
.TP
.B \-i
specify the idle threshold (in % CPU idle) to force a re-sample measurement if the CPU is less idle than this
level. This option implicitly enables the \-b option.
.TP
.B \-p
redo a sample measurement if any processes fork(), exec() or exit().
.TP
.B \-r
redo if system is not idle and any processes fork(), exec() or exit(), an alias for \-p \-b
.TP
.B \-s
this dumps a log of the process fork(), exec() and exit() activity on completion.
.TP
.B \-S
use standard averaging to calculate power consumption instead of using
a 120 second rolling average of capacity samples. This is only useful
if the battery reports just capacity values and is an alternative method
of calculating the power consumption based on the start and current battery
capacity.
.TP
.B \-z
forcibly ignore zero power rate readings from the battery, don't use this unless you know what you are doing.
.SH EXAMPLES
.LP
Measure power with the default of 10 samples with an interval of 10 seconds
.RS 8
powerstat
.RE
.LP
Measure power with 60 samples with an interval of 1 second
.RS 8
powerstat 1 60
.RE
.LP
Measure power and redo sampling if we are not idle and we detect fork()/exec()/exit() activity
.RS 8
sudo powerstat \-r
.RE
.LP
Measure power and redo sampling if less that 95% idle
.RS 8
powerstat \-i 95
.RE
.LP
Wait to settle for 1 minute then measure power every 20 seconds and show any fork()/exec()/exit() activity at end of the measuring
.RS 8
powerstat \-d 60 \-s 20
.RE
.SH SEE ALSO
.BR vmstat (8),
.BR powertop (8)
.SH AUTHOR
powerstat was written by Colin King <colin.king@canonical.com>
.PP
This manual page was written by Colin King <colin.king@canonical.com>,
for the Ubuntu project (but may be used by others).
|