Merge tag 'upstream/1.0.2'
[psensor-pkg-debian.git] / src / server / psensor-server.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.44.1.
2 .TH PSENSOR-SERVER "1" "June 2014" "psensor-server 1.0.2" "User Commands"
3 .SH NAME
4 psensor-server \- Temperature and system monitoring Web server
5 .SH SYNOPSIS
6 .B psensor-server
7 [\fIOPTION\fR]...
8 .SH DESCRIPTION
9
10 .PP
11 psensor\-server is an HTTP server for monitoring hardware sensors remotely.
12 .PP
13
14 It provides a JSON Web service which can be used by psensor(1) to
15 monitor remotely the hardware sensors of a computer.
16
17 It can provide information about:
18   * the temperature of the motherboard and CPU sensors (using lm\-sensors).
19   * the temperature of the Hard Disk Drives (using hddtemp).
20   * the rotation speed of the fans (using lm\-sensors).
21
22 It is also possible to connect to the psensor\-server with a browser, a
23 simple Web page is displaying the sensors information and the CPU
24 usage.
25
26 The URL http://hostname:3131/api/1.0/sensors/[id] returns a JSON
27 object containing all information about a sensor. [id] is the uniq
28 identifier of the sensor.
29
30 Here is an example of the JSON object of type 'sensor':
31
32 { "id": "lmsensor acpitz\-virtual\-0 temp1", 
33   "name": "temp1", 
34   "type": 257, 
35   "min": 47.800000, 
36   "max": 60.800000,
37   "measures": [ { "value": 47.800000, "time": 1311374873 },
38                 { "value": 49.800000, "time": 1311374878 },
39                 { "value": 49.800000, "time": 1311374883 } ],
40   "last_measure": { "value": 49.800000, "time": 1311374883 }
41 }
42
43 Fields of the type 'sensor':
44
45    * id: the uniq identifier of the sensor.
46    * name: a humean readable name of the sensor (might not be uniq).
47    * type: the type of sensor. Look at src/lib/psensor.h for the
48      different types.
49    * min: the minimal value of the sensor.
50    * max: the maximal value of the sensor.
51    * measures: all measures of the sensor.
52    * last_measure: the last value of the sensor.
53    * time: the time of a measure as the number of seconds since
54      1970/01/01.
55
56 The URL http://hostname:3131/api/1.0/sensors returns a JSON array
57 containing all JSON objects of type 'sensor'.
58
59 psensor\-server can be stopped by sending an HTTP
60 request with the URL 'http://hostname:port/api/1.0/server/stop'.
61 .SH OPTIONS
62 .TP
63 \fB\-h\fR, \fB\-\-help\fR
64 display this help and exit
65 .TP
66 \fB\-v\fR, \fB\-\-version\fR
67 display version information and exit
68 .TP
69 \fB\-p\fR,\-\-port=PORT
70 webserver port
71 .TP
72 \fB\-w\fR,\-\-wdir=DIR
73 directory containing webserver pages
74 .TP
75 \fB\-d\fR, \fB\-\-debug\fR=\fILEVEL\fR
76 set the debug level, integer between 0 and 3
77 .TP
78 \fB\-l\fR, \fB\-\-log\-file\fR=\fIPATH\fR
79 set the log file to PATH
80 .HP
81 \fB\-\-sensor\-log\-file\fR=\fIPATH\fR set the sensor log file to PATH
82 .HP
83 \fB\-\-sensor\-log\-interval\fR=\fIS\fR set the sensor log interval to S (seconds)
84 .SH "SENSOR LOG FILE"
85
86 Sensors can be logged using the \-\-sensor-log-file option.
87
88 It is using a text format, each line is terminated with a NEWLINE
89 char.
90
91 The first line is: I,%D,%V
92
93 %D is the starting time of the log expressed as the number of seconds
94 since EPOC.
95
96 %V is the version of psensor-server.
97
98 Following lines gives the ordered list of sensors: S,%I,%T
99
100 %I is the uniq identifier of the sensor.
101
102 %T is the hexadecimal representation of the sensor type.
103
104 Then, the values of all sensors are written: %D,%V...
105
106 %D is the number of seconds elapsed since the starting time of the
107 log.
108
109 %V... is the list separated by a comma of the current value of all
110 sensors. The ordering is the same than the list of sensor identifiers.
111
112 The value is expressed as a float with one digit precision. Temperatures
113 are using Celsius unit.
114
115 The value is written only if it has changed.
116
117 Example:
118 I,1345974927,0.7.0.4
119 S,lmsensor coretemp-isa-0000 Physical id 0,101
120 S,lmsensor coretemp-isa-0000 Core 0,101
121 S,lmsensor coretemp-isa-0000 Core 1,101
122 0,37.0,37.0,36.0
123 5,36.0,,36.0
124
125 Five seconds after the log starts, the temperature of the second
126 sensor (Core 0) is still 37C.
127 .SH WARNING
128
129 psensor\-server does not provide any way to restrict the connection to
130 the HTTP server, worst, no effort has been made against malicious HTTP
131 attacks.  You should make the psensor\-server port available only to a
132 network or computer you trust by using the usual network security
133 tools of the system (for example, iptables(8) ).
134 .SH "REPORTING BUGS"
135 Report bugs to: jeanfi@gmail.com
136 .PP
137 psensor home page: <http://wpitchoune.net/psensor>
138 .SH COPYRIGHT
139 Copyright \(co 2010\-2012 jeanfi@gmail.com
140 License GPLv2: GNU GPL version 2 or later <http://www.gnu.org/licenses/old\-licenses/gpl\-2.0.html>
141 .br
142 This is free software: you are free to change and redistribute it.
143 There is NO WARRANTY, to the extent permitted by law.
144 .SH "SEE ALSO"
145
146 psensor(1), sensors(1), sensors\-detect(8)