Category Archives: networking

PHPHOST BLOG

Web Hosting Related Articles You May Need

[one-liner]: Howto get your WAN IP Address

Background

I’ve seen this question asked MANY times over the years and thought I’d write up all the various ways I’m familiar with getting your WAN IP (ISP provided) address. But before we start here’s a quick overview of some of the terminology.

IP Address:a number that identifies your computer on a network from other computers on […]

Continue reading

Posted in linux, networking, one-liner, Syndicated, tips & tricks | Comments Off on [one-liner]: Howto get your WAN IP Address

How to Analyze Network Performance using iperf on Fedora, CentOS & Windows

I’ve been experiencing some slow network connections between a couple of Linux systems (CentOS), Window systems (Server 2008R2), and a NAS device (Netgear ReadyNAS) and wanted to confirm that my network connections weren’t the source of the problem. To limit any variability due to different tools, I decided to use iperf, which can run on […] Continue reading

Posted in centos, fedora, linux, networking, performance, redhat, rhel, Syndicated, sysadmin, tips & tricks, windows | Comments Off on How to Analyze Network Performance using iperf on Fedora, CentOS & Windows

[one-liner]: Getting Networking Info from the Command Line using NetworkManager’s nm-tool Command

Background

This is just a quick post to capture a pretty useful networking command line tool, nm-tool, that’s included with NetworkManager.

Solution

nm-tool is really nice in the sense that it takes information from a lot of other command line tools, (such as ifconfig, iwconfig, iwlist, etc.) and integrates it into a single command. For example:

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
# output from […] Continue reading

Posted in centos, fedora, networking, one-liner, redhat, rhel, Syndicated, tips & tricks | Comments Off on [one-liner]: Getting Networking Info from the Command Line using NetworkManager’s nm-tool Command

Debugging an Intermittently Dropping Intel Wireless-N 1000 Network Card on Fedora 14

Background

Recently I’ve been experiencing a strange problem with my wireless NIC on my Lenovo/Thinkpad T410i laptop. The laptop would invariably stop being able to access the network. I would get a connection to our wireless access point (even an IP address), but wasn’t able to do much else. Pinging other systems or anything else would […] Continue reading

Posted in fedora, networking, Syndicated, sysadmin, tip, tips & tricks, wifi | Comments Off on Debugging an Intermittently Dropping Intel Wireless-N 1000 Network Card on Fedora 14

Extract a tarball online without local saving

This can be a real saver if you are using an EeePC with very low disk space. Say you want to download a large file but you don’t want to save it locally because you don’t have the necessary disk space. Do a wget -qO – “http://www.site.com/archive.gz” | tar zxvf – Continue reading

Posted in cli, networking, Syndicated | Comments Off on Extract a tarball online without local saving

Quickly query Wikipedia by using the Linux CLI

Stuck at a CLI prompt in Linux and not sure what Romania is? Use the following command:
dig +short txt Romania.wp.dg.cx
Subsitute Romania for any other keyword you might want to see a short description of in your command line.

Continue reading

Posted in cli, networking, Syndicated | Comments Off on Quickly query Wikipedia by using the Linux CLI

Check your unread GMail e-mails using the Linux command line

All you need to display your latest GMail messages in the command line is this one-liner:
curl -u username:password –silent “https://mail.google.com/mail/feed/atom” | tr -d ‘\n’ | awk -F ‘<entry>’ ‘{for (i=2; i<=NF; i++) {print $i}}’ | sed -n “s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 – \1/p”
Substitute username:password with your GMail username and password. Continue reading

Posted in cli, networking, Syndicated | Comments Off on Check your unread GMail e-mails using the Linux command line

Display the current directory as a webpage in Linux

Do you want to quickly serve a directory to your friends over the web or LAN? There are plenty of applications out there that let you do this, but in Linux all you really need is Python installed.Do a
python -m SimpleHTTPServer
in the directory you wis… Continue reading

Posted in cli, networking, Syndicated | Comments Off on Display the current directory as a webpage in Linux

Realtime statistics of your Linux system

If you wish to monitor your Linux system in realtime, use dstat. Use a man dstat to see a list of possible options, since they are extensive and dstat can output system usage, memory usage, load times, network information, NFS, therman, VMWare, CPU, sendmail and MySQL usage, among others.Try
dstat -tamn -M topcpu
where -tamn stand for […] Continue reading

Posted in cli, Database, Hardware, networking, Syndicated, System | Comments Off on Realtime statistics of your Linux system

Record Live Radio using only Mplayer

Did you know that you only need MPlayer to record a live radio station? Use
mplayer http://ip:port/ -ao pcm:file=radio.wav  -vo null -vc null
to dump a radio.wav file of the audio stream. You can later convert it to MP3 using LAME or Audacity. Continue reading

Posted in Multimedia, networking, Syndicated | Comments Off on Record Live Radio using only Mplayer