-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
51 lines (40 loc) · 1.53 KB
/
README
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
This is a node.js project that pings different specified hosts, in an attempt to find out about host uptime and network over time
This software will probably not work under other versions of "PING" as it relies to the error codes given by the Ubuntu version.
The MySQL tables are as follows:
CREATE TABLE IF NOT EXISTS `pinghosts` (
`id` int(11) NOT NULL,
`url` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `pings` (
`host` varchar(255) NOT NULL,
`date` datetime DEFAULT NULL,
`sent` int(11) DEFAULT NULL,
`received` int(11) DEFAULT NULL,
`loss` int(11) DEFAULT NULL,
`min` float DEFAULT NULL,
`avg` float DEFAULT NULL,
`max` float DEFAULT NULL,
`mdev` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
TODO: Should add a index and a relation back to pinghosts from ping.
== Testing Ping return ==
Ping lol.dk
Output (OSX Lion):
"--- lol.dk ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss, 3 packets out of wait time
round-trip min/avg/max/stddev = 109.832/109.856/109.886/0.022 ms"
(With no answer, server is blocking us):
--- amino.dk ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
== Testing curl -i return ==
Output (OSX Lion):
"curl -I http://allinthehead.com/
HTTP/1.1 200 OK
Date: Wed, 11 Apr 2012 13:16:34 GMT
Server: Apache
X-Cache: asy_jpcache v2 - file
ETag: "jpd-1069839312.35461"
Vary: Cookie,Accept-Encoding
Content-Length: 35461
Content-Type: text/html; charset=utf-8"