How to check HTTP Header and Connection Stats from the Command Line

A few days ago, I discussed with somebody whether a file was cached by Cloudflare or not, and this involved getting the HTTP header, and checking for CF-RAY field to see if data is going through one of Cloudflare data centers. This can be done with curl:

In the command above, -s stands for silent so that curl does not show the progress meter, -v stands for verbose to show the header, and -o /dev/null is used to discard the packet load. You can also use -I option (fetch the HTTP-header only) with curl, which – if all you need is the HTTP header – provides a cleaner output:

I also came across httpstat Python script recently via n0where, doing much of the same thing, except it also adds transfer statistics. It can be installed by downloading httpstat.py, or better using pip:

Let’s try it with this very […]

FOSDEM 2015 Schedule – January 31 – February 1 2015

FOSDEM (Free and Open Source Software Developers’ European Meeting) takes place every year during the first week-end of February. This year the developer-oriented event expects to bring over 5000 geeks to share ideas and collaborate on open source projects. Contrary to most other events, it’s free to attend, and you don’t even need to register, just show up. FOSDEM 2015 will take place on January 31- February 1 in Brussels. There will be 551 sessions divided into 5 keynotes, 40 lightning talks, 6 certification exams, and with the bulk being developer rooms and main tracks,  divided into 7 main tracks this year: Languages, Performance, Time, Typesetting, Hardware, Security and Miscellaneous. I’m not going to attend, but it’s still interested to see what will be talked about, and I’ve concocted my own little virtual program out of the main tracks and developers’ rooms. There’s a few minutes overlap between some talks […]

Linux Scripts to find Public IP Address

In some cases, you may need to know your public IP or the public IP of a server behind a NAT (e.g. for remote SSH login) if the IP is assigned dynamically as is the case for PPPoE connections. Here are several ways to find your public IP in Linux using the shell. 1. Using curl (almost too simple) curl -s http://www.whatismyip.org 2. Using wget wget -q -O – checkip.dyndns.org|sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//’ 3. Using lynx lynx -dump checkip.dyndns.org If you have access to a web browser, you can simply use http://www.whatismyip.org, http://checkip.dyndns.org or http://www.moanmyip.com. Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011. www.cnx-software.com

Exit mobile version
EmbeddedTS embedded systems design