Jan 20

Curl is a great little program that can be used to fetch content from webservers. It’s options are expansive, but at it’s most basic curl is used to fetch data from a web server. One of my most used features of curl is it’s ability to log output in a very granular manner, separating out how much time it took to get the dns resolution from the dns server, how long it took to connect to the server, how long to negotiate the http protocol, etc.  The curl manpage will show all the data that curl can display, but my favourites are Total transaction time, Time it took to get DNS resolution and the time it took to connect to the webserver. This pretty much tells me at a glance where the slow down might be with a single command.  The command I run looks like this

curl ‘http://www.cyborgworkshop.org’ -w ‘Total time: %{time_total}, Time in DNS: %{time_namelookup}, Time to Connect time: %{time_connect}\n’

And the output looks like this

Total time: 1.842, Time in DNS: 0.002, Time to Connect time: 0.016

Jan 13

nmap is a really excellent  network tool that most folks are familiar with.  I find that I tend to use it to first discover hosts on a network and then to get more specific information from a targeted node. The first part of that discovery is the ping sweep, which can be done thusly.

nmap -sP 192.168.1.1-254

Pretty simple. 192.168.1.1 is the start IP and 192.168.1.254 is the stop IP. nmap will ping every address in that range and return the IP of hosts that respond.