Merge tag 'upstream/0.8.0.6'
[psensor-pkg-debian.git] / src / server / description.txt
1 [DESCRIPTION]
2
3 /psensor-server is a/
4
5 It provides a JSON Web service which can be used by psensor(1) to
6 monitor remotely the hardware sensors of a computer.
7
8 It can provide information about:
9   * the temperature of the motherboard and CPU sensors (using lm\-sensors).
10   * the temperature of the Hard Disk Drives (using hddtemp).
11   * the rotation speed of the fans (using lm\-sensors).
12
13 It is also possible to connect to the psensor\-server with a browser, a
14 simple Web page is displaying the sensors information and the CPU
15 usage.
16
17 The URL http://hostname:3131/api/1.0/sensors/[id] returns a JSON
18 object containing all information about a sensor. [id] is the uniq
19 identifier of the sensor.
20
21 Here is an example of the JSON object of type 'sensor':
22
23 { "id": "lmsensor acpitz\-virtual\-0 temp1", 
24   "name": "temp1", 
25   "type": 257, 
26   "min": 47.800000, 
27   "max": 60.800000,
28   "measures": [ { "value": 47.800000, "time": 1311374873 },
29                 { "value": 49.800000, "time": 1311374878 },
30                 { "value": 49.800000, "time": 1311374883 } ],
31   "last_measure": { "value": 49.800000, "time": 1311374883 }
32 }
33
34 Fields of the type 'sensor':
35
36    * id: the uniq identifier of the sensor.
37    * name: a humean readable name of the sensor (might not be uniq).
38    * type: the type of sensor. Look at src/lib/psensor.h for the
39      different types.
40    * min: the minimal value of the sensor.
41    * max: the maximal value of the sensor.
42    * measures: all measures of the sensor.
43    * last_measure: the last value of the sensor.
44    * time: the time of a measure as the number of seconds since
45      1970/01/01.
46
47 The URL http://hostname:3131/api/1.0/sensors returns a JSON array
48 containing all JSON objects of type 'sensor'.
49
50 psensor\-server can be stopped by sending an HTTP
51 request with the URL 'http://hostname:port/api/1.0/server/stop'.
52
53 [SENSOR LOG FILE]
54
55 Sensors can be logged using the \-\-sensor-log-file option.
56
57 It is using a text format, each line is terminated with a NEWLINE
58 char.
59
60 The first line is: I,%D,%V
61
62 %D is the starting time of the log expressed as the number of seconds
63 since EPOC.
64
65 %V is the version of psensor-server.
66
67 Following lines gives the ordered list of sensors: S,%I,%T
68
69 %I is the uniq identifier of the sensor.
70
71 %T is the hexadecimal representation of the sensor type.
72
73 Then, the values of all sensors are written: %D,%V...
74
75 %D is the number of seconds elapsed since the starting time of the
76 log.
77
78 %V... is the list separated by a comma of the current value of all
79 sensors. The ordering is the same than the list of sensor identifiers.
80
81 The value is expressed as a float with one digit precision. Temperatures
82 are using Celcius unit.
83
84 The value is written only if it has changed.
85
86 Example:
87 I,1345974927,0.7.0.4
88 S,lmsensor coretemp-isa-0000 Physical id 0,101
89 S,lmsensor coretemp-isa-0000 Core 0,101
90 S,lmsensor coretemp-isa-0000 Core 1,101
91 0,37.0,37.0,36.0
92 5,36.0,,36.0
93
94 Five seconds after the log starts, the temperature of the second
95 sensor (Core 0) is still 37C.
96
97 [WARNING]
98
99 psensor\-server does not provide any way to restrict the connection to
100 the HTTP server, worst, no effort has been made against malicious HTTP
101 attacks.  You should make the psensor\-server port available only to a
102 network or computer you trust by using the usual network security
103 tools of the system (for example, iptables(8) ).
104
105 [SEE ALSO]
106
107 psensor(1), sensors(1), sensors\-detect(8)