aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 839b2c59d9be5fcb0e69132d38e6054b933104c0 (plain)
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
# quickstat
xinetd service to retrieve basic system information

### Build Requirements
* xinetd
* make
* m4

### Run requirements
* xinetd
* iostat

### Installation
1. Run ```make setup``` and provide the port number to run service as
2. Run ```sudo make install```

### Usage
Query the machine running quickstat (via xinetd) using the following URL:  
```http://HOST:PORT/stats```  
  
The resulting JSON will look like this:   
```
{
	"cpu": {
		"pctuser": "4.93",
		"pctsystem": "3.22",
		"pctwait": "0.66",
		"pctidle": "91.15",
		"1minavg": "0.23",
		"5minavg": "0.33",
		"15minavg": "0.36"
	},
	"mem": {
		"total": "439364",
		"used": "80512",
		"free": "11920"
	},
	"swap": {
		"total": "0",
		"used": "0",
		"free": "0"
	},
	"disk": [{
		"device": "sda",
		"read-kbps": "0.29",
		"write-kbps": "23.97"
	}],
	"partition": [{
		"device": "/dev/sda1",
		"mount": "/",
		"total": "27990468",
		"used": "10520320",
		"free": "17470148"
	}, {
		"device": "/dev/sda2",
		"mount": "/boot",
		"total": "102182",
		"used": "24270",
		"free": "77912"
	}]
}
```