succd: rewrite processing loop
This commit is contained in:
parent
3d81a1f56c
commit
960be9cd23
3 changed files with 50 additions and 66 deletions
|
|
@ -84,7 +84,8 @@ type apiData struct {
|
|||
// not being served via websockets).
|
||||
func (s *webServer) apiData(skipSystem bool) *apiData {
|
||||
state := s.d.snapshot()
|
||||
volts, mbar := state.pirani()
|
||||
volts := state.piraniVolts100.avg
|
||||
mbar := state.piraniMbar100.mbar
|
||||
rough, high := state.vacuumStatus()
|
||||
|
||||
var hostname, load string
|
||||
|
|
@ -164,7 +165,7 @@ func (s *webServer) viewMetrics(w http.ResponseWriter, r *http.Request) {
|
|||
// library.
|
||||
// TODO(q3k): serve the rest of the data model
|
||||
state := s.d.snapshot()
|
||||
_, mbar := state.pirani()
|
||||
mbar := state.piraniMbar100.mbar
|
||||
fmt.Fprintf(w, "# HELP sem_pressure_mbar Pressure in the SEM chamber, in millibar\n")
|
||||
fmt.Fprintf(w, "# TYPE sem_pressure_mbar gauge\n")
|
||||
fmt.Fprintf(w, "sem_pressure_mbar %f\n", mbar)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue