Categories
Linux Ubuntu

Change Ubuntu IP Address from DHCP to Static or Vice Versa – HowTo

The default network setting in Ubuntu (or Debian) is to use DHCP.  Often, however, it is desirable to use a static IP address and settings.  To change your network configuration from DHCP to static follow these steps.

Open a terminal session and enter:

sudo nano /etc/network/interfaces

Two network interfaces should be listed, lo and eth0:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Change eth0 to your desired settings, such as:

auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Save the file and close using Ctl+X, Y, Enter.

Restart the network to apply the new setting, with this command:

sudo /etc/init.d/networking restart

Verify your network settings with:

ifconfig

See also

Categories
Linux

Windows 7 Mortgage Calculator

In Windows 7 Microsoft has added new capabilities:  Mortgage Calculator, Fuel economy and Vehicle lease.  To access these features open the Windows calculator then click View, Worksheets, then click the worksheet for the calculation you want.

Under Select the value you want to calculate, click the variable that you want to calculate, then enter the known values in the text boxes and then click Calculate.  In the following example we are trying to determine the monthly payment so we enter the purchase price, down payment, term and interest rate.

Don’t forget the result will be the monthly payment amount for the actual loan and doesn’t include insurance or taxes.

See also Unit Conversion with the Windows 7 Calculator.

Categories
Linux

Unit Conversion with the Windows 7 Calculator

Besides adding a mortgage calculator, Microsoft has added a number of conversion functions to the new and improved calculator in Windows 7.  You can easily perform conversions between units of power, time, volume, and mass.  Start by opening the Windows 7 Calculator – Start / All Programs / Accessories / Calculator.

Within Calculator select View, then Unit Conversion. Or, press Ctrl + U.  A unit conversion pane appears to the right of the calculator. Underneath “Select the type of unit you want to convert”, click the pull-down and select your unit type, then in the From field enter the desired value.  Select what you want it converted to and the converted value will be displayed in the To field.

Windows 7 Calculator Supported Unit Types

Angle

  • Degree
  • Gradian
  • Radian

Area

  • Acres
  • Hectares
  • Square centimeter
  • Square feet
  • Square inch
  • Square kilometer
  • Square meters
  • Square mile
  • Square millimeter
  • Square yard

Energy

  • British Thermal Unit
  • Calorie
  • Electron-volts
  • Foot-pound
  • Joule
  • Kilocalorie
  • Kilojoule

Length

  • Angstrom
  • Centimeters
  • Chain
  • Fathom
  • Feet
  • Hand
  • Inch
  • Kilometers
  • Link
  • Meter
  • Microns
  • Mile
  • Millimeters
  • Nanometers
  • Nautical miles
  • PICA
  • Rods
  • Span
  • Yard

Power

  • BTU/minute
  • Foot-pound/minute
  • Horsepower
  • Kilowatt
  • Watt

Pressure

  • Atmosphere
  • Bar
  • Kilo Pascal
  • Millimeter of mercury
  • Pascal
  • Pound per square inch (PSI)

Temperature

  • Degrees Celsius
  • Degrees Fahrenheit
  • Kelvin

Time

  • Day
  • Hour
  • Microsecond
  • Millisecond
  • Minute
  • Second
  • Week

Velocity

  • Centimeter per second
  • Feet per second
  • Kilometer per hour
  • Knots
  • Mach (at std. atm)
  • Meter per second
  • Miles per hour

Volume

  • Cubic centimeter
  • Cubic feet
  • Cubic inch
  • Cubic meter
  • Cubic yard
  • Fluid ounce (UK)
  • Fluid ounce (US)
  • Gallon (UK)
  • Gallon (US)
  • Liter
  • Pint (UK)
  • Pint (US)
  • Quart (UK)
  • Quart (US)

Weight / Mass

  • Carat
  • Centigram
  • Decigram
  • Dekagram
  • Gram
  • Hectogram
  • Kilogram
  • Long ton
  • Milligram
  • Ounce
  • Pound
  • Short ton
  • Stone
  • Tonne
Categories
Iperf iperf examples Linux Ubuntu Windows

Use Iperf to Measure Network Throughput (Bandwidth) on Windows or Linux

Iperf was developed by NLANR/DAST as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.

  • Install iperf on Windows – just download, unzip and run iperf.exe.
  • Install iperf on Ubuntu:
    sudo apt-get install iperf
Iperf supports several options, but generally you would run it on one device as a “server” and another as a “client.”
To launch iperf in server mode just enter iperf -s at the terminal.  It will report, “Server listening on TCP port 5001. . .”

From another system launch iperf in client mode with iperf -c <server IP>. By default Iperf will run a 10 second test and report amount of data transferred and bandwidth speed.

Note: Iperf can be used to test LAN speeds as well as over the Internet.

Download Iperf and get more information from SourceForge.

Categories
Linux

Open a Website from the Windows Command Line

Here are three ways to open a web page from the command prompt from Windows 7, Windows Vista, Windows XP, etc. All of the following examples will open the designated web page in Internet Explorer or other default browser.

  • start <website>
    Example:
    start www.powercram.com
    OR start http://powercram.com
  • progra~1intern~1iexplore <website>
    Example:
    progra~1intern~1iexplore www.powercram.com
    OR progra~1intern~1iexplore http://powercram.com
  • “program filesinternet exploreriexplore” <website>
    Example (must include quotes):
    "program filesinternet exploreriexplore" www.powercram.com
    OR "program filesinternet exploreriexplore" http://powercram.com

NOTES

  • The first example will open the designated site/page in a new tab of Internet Explorer.  The other two will launch a new instance of the browser.
  • In the examples above <website> must either be preceded by “http://” or “www.”
Categories
Uncategorized

Hot Chick + Huge Boobs = Airbag.

Categories
cacti Cacti Examples Iperf Linux Ubuntu WGET

Bandwidth Monitoring Tools for Ubuntu

  • bmon – Bandwidth monitor and rate estimator
  • bwm-ng – Bandwidth Monitor NG (Next Generation), a live bandwidth
    monitor for network and disk IO
  • cbm – displays the current traffic on all network devices
  • iftop – Real-time bandwidth usage information on a specified interface
  • iperf – Tool for measuring maximum TCP and UDP bandwidth performance
  • ibmonitor – interactive bandwidth monitor
  • pktstat – shows the bandwidth being consumed by packets of various kinds in realtime
  • tcptrack – sniffer which displays information about TCP connections
  • MRTG – see traffic load on a network over time in graphical form
  • Cacti – network graphing solution

Details on each tool.

bmon
bmon is a portable bandwidth monitor and rate estimator. It supports various input methods for different architectures. Various output modes exist, including an interactive curses interface, lightweight HTML output, and simple ASCII output. Statistics may be distributed over a network using multicast or unicast and collected at some point to generate a summary of statistics for a set of nodes.

Install bmon on Ubuntu:

sudo apt-get install bmon

To launch bmon just enter bmon at the terminal.

You can select a specific interface to view traffic details. In the screen shot below I selected eth0, ‘g’ for graphical statistics and ‘d’ for detailed statistics.

bwm-ng
bwm-ng can be used to monitor the current bandwidth of all or some specific network interfaces or disks (or partitions). It shows total of in and out as well as total of all interfaces/devices.

Install bwm-ng on Ubuntu:

sudo apt-get install bwm-ng

To launch bwm-ng just enter bwm-ng at the terminal.

cbm

cbm (Color Bandwidth Meter) displays the current traffic on all network devices.
Install cbm on Ubuntu:
sudo apt-get install cbm
To launch cbm just enter sudo cbm at the terminal.

iftop

iftop provides real-time bandwidth usage information on a specified interface, listed by host pairs.

Install iftop on Ubuntu:

sudo apt-get install iftop

To launch iftop just enter iftop at the terminal.

Iperf
Iperf was developed by NLANR/DAST as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.

Install iperf on Ubuntu:
sudo apt-get install iperf
Iperf supports several options, but generally you would run it on one device as a “server” and another as a “client.”
To launch iperf in server mode just enter iperf -s at the terminal.  It will report, “Server listening on TCP port 5001. . .”

From another system launch iperf in client mode with iperf -c <server IP>. By default Iperf will run a 10 second test and report amount of data transferred and bandwidth speed.

Note: Iperf can be used to test LAN speeds as well as over the Internet.

ibmonitor
ibmonitor is an interactive linux console application which shows bandwidth consumed and total data transferred on all interfaces.

Its main features are:

  • Shows received, transmitted and total bandwidth of each interface
  • Calculates and displays the combined value of all interfaces
  • Displays total data transferred per interface in KB/MB/GB
  • Values can be displayed in Kbits/sec(Kbps) and/or KBytes/sec(KBps)
  • Can show maximum bandwidth consumed on each interface since start of utility
  • Can show average bandwidth consumption on each interface since start of utility
  • The output with all features (max, avg and display in Kbps and KBps) easily fits on a 80×24 console or xterm
  • Can interactively change its output display format depending on key pressed by user.

Install ibmonitor on Ubuntu”

First you need to download the latest version:

wget http://ovh.dl.sourceforge.net/sourceforge/ibmonitor/ibmonitor-1.4.tar.gz

Extract this file using the following commands

tar xvfz ibmonitor-1.4.tar.gz

cd ibmonitor

If you want to run the application use the following command

Once you are in ibmonitor folder use

./ibmonitor

pktstat
pktstat listens to the network and shows the bandwidth being consumed by packets of various kinds in realtime. It understands some protocols (including FTP, HTTP, and X11) and adds a descriptive name next to the entry (e.g., ‘RETR cd8.iso’, ‘GET http://slashdot.org/’ or ‘xclock -fg blue’).

Install pktstat on Ubuntu:

sudo apt-get install pktstat

To launch pktstat just enter pktstat at the terminal.

tcptrack
tcptrack is a sniffer which displays information about TCP connections it sees on a network interface. It passively watches for connections on the network interface, keeps track of their state and displays a list of connections in a manner similar to the unix ‘top’ command. It displays source and destination addresses and ports, connection state, idle time, and bandwidth usage.

Install tcptrack on Ubuntu:

sudo apt-get install tcptrack

To launch tcptrack just enter sudo tcptrack -i eth0 at the terminal.

tcptrack can also take a pcap filter expression as an argument. The format of this filter expression is the same as that of tcpdump and other libpcap-based sniffers. The following example will only show connections from host 10.1.1.2

tcptrack -i eth0 src or dst 10.1.1.2

The next example will only show web traffic (ie, traffic on port 80)

tcptrack -i eth0 port 80

MRTG
MRTG (Multi Router Traffic Grapher) is free software for monitoring the traffic load on network links. It allows the user to see traffic load on a network over time in graphical form.  MRTG is used by programs like Cacti to gather and graph stats over time.

Cacti
Cacti is a complete network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive,easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices.

Cacti is great for gathering stats over time (using both MRTG and RRDTool) and creating hourly, daily, weekly, monthly and yearly graphs.  These graphs can be invaluable in identifying trends and potential problems.  In fact, just today I used the following graphs to identify a problem on my corporate network:

Here’s another one showing network utilization over time.

See also Multi-CPU Utilization Graphing in Cacti.
Categories
Uncategorized

DIVORCE AGREEMENT – United States Conservatives vs. Liberals

Dear American liberals, leftists, social progressives, socialists, Marxists and Obama supporters, et al:

We have stuck together since the late 1950’s for the sake of the kids, but the whole of this latest election process has made me realize that I want a divorce. I know we tolerated each other for many years for the sake of future generations, but sadly, this relationship has clearly run its course.

Our two ideological sides of America cannot and will not ever agree on what is right for us all, so let’s just end it on friendly terms. We can smile and chalk it up to irreconcilable differences and go our own way.

Here is a model separation agreement:
Our two groups can equitably divide up the country by landmass each taking a similar portion. That will be the difficult part, but I am sure our two sides can come to a friendly agreement. After that, it should be relatively easy! Our respective representatives can effortlessly divide other assets since both sides have such distinct and disparate tastes.

We don’t like redistributive taxes so you can keep them. You are welcome to the liberal judges and the ACLU. Since you hate guns and war, we’ll take our firearms, the cops, the NRA and the military. We’ll take the nasty, smelly oil industry and you can go with wind, solar and biodiesel.. You can keep Oprah, Michael Moore and Rosie O’Donnell. You are, however, responsible for finding a bio-diesel vehicle big enough to move all three of them.

We’ll keep capitalism, greedy corporations, pharmaceutical companies, Wal-Mart and Wall Street. You can have your beloved lifelong welfare dwellers, food stamps, homeless, homeboys, hippies, druggies and illegal aliens. We’ll keep the hot Alaskan hockey moms, greedy CEO’s and rednecks. We’ll keep the Bibles and give you NBC and Hollywood .

You can make nice with Iran and Palestine and we’ll retain the right to invade and hammer places that threaten us. You can have the peaceniks and war protesters. When our allies or our way of life are under assault, we’ll help provide them security.

We’ll keep our Judeo-Christian values. You are welcome to Islam, Scientology, Humanism, political correctness and Shirley McClain. You can also have the U.N. but we will no longer be paying the bill.

We’ll keep the SUV’s, pickup trucks and oversized luxury cars. You can take every Subaru station wagon you can find.

You can give everyone healthcare if you can find any practicing doctors. We’ll continue to believe healthcare is a luxury and not a right. We’ll keep “The Battle Hymn of the Republic” and “The National Anthem.” I’m sure you’ll be happy to substitute “Imagine”, “I’d Like to Teach the World to Sing”, “Kum Ba Ya” or “We Are the World”.

We’ll practice trickledown economics and you can continue to give trickle up poverty your best shot.
Since it often so offends you, we’ll keep our history, our name and our flag.

Would you agree to this? If so, please pass it along to other like-minded liberal and conservative patriots and if you do not agree, just hit delete. In the spirit of friendly parting, I’ll bet you answer which one of us will need whose help in 15 years.

Sincerely,
John J. Wall
Law Student and an American

P.. S. Also, please take Ted Turner, Sean Penn, Martin Sheen, Barbara Streisand, & Jane Fonda with you.

P. S. S. And you won’t have to press 1 for English when you call our country.

Categories
Uncategorized

Keyboard shortcuts that are available in Windows 7 (and XP, 2008, 2003, etc.)

General keyboard shortcuts

  • CTRL+C (Copy)
  • CTRL+X (Cut)
  • CTRL+V (Paste)
  • CTRL+Z (Undo)
  • DELETE (Delete)
  • SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin)
  • CTRL while dragging an item (Copy the selected item)
  • CTRL+SHIFT while dragging an item (Create a shortcut to the selected item)
  • F2 key (Rename the selected item)
  • CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word)
  • CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word)
  • CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph)
  • CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph)
  • CTRL+SHIFT with any of the arrow keys (Highlight a block of text)
  • SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document)
  • CTRL+A (Select all)
  • F3 key (Search for a file or a folder)
  • ALT+ENTER (View the properties for the selected item)
  • ALT+F4 (Close the active item, or quit the active program)
  • ALT+ENTER (Display the properties of the selected object)
  • ALT+SPACEBAR (Open the shortcut menu for the active window)
  • CTRL+F4 (Close the active document in programs that enable you to have multiple documents open simultaneously)
  • ALT+TAB (Switch between the open items)
  • ALT+ESC (Cycle through items in the order that they had been opened)
  • F6 key (Cycle through the screen elements in a window or on the desktop)
  • F4 key (Display the Address bar list in My Computer or Windows Explorer)
  • SHIFT+F10 (Display the shortcut menu for the selected item)
  • ALT+SPACEBAR (Display the System menu for the active window)
  • CTRL+ESC (Display the Start menu)
  • ALT+Underlined letter in a menu name (Display the corresponding menu)
  • Underlined letter in a command name on an open menu (Perform the corresponding command)
  • F10 key (Activate the menu bar in the active program)
  • RIGHT ARROW (Open the next menu to the right, or open a submenu)
  • LEFT ARROW (Open the next menu to the left, or close a submenu)
  • F5 key (Update the active window)
  • BACKSPACE (View the folder one level up in My Computer or Windows Explorer)
  • ESC (Cancel the current task)
  • SHIFT when you insert a CD-ROM into the CD-ROM drive (Prevent the CD-ROM from automatically playing)
  • CTRL+SHIFT+ESC (Open Task Manager)

Dialog box keyboard shortcuts

If you press SHIFT+F8 in extended selection list boxes, you enable extended selection mode. In this mode, you can use an arrow key to move a cursor without changing the selection. You can press CTRL+SPACEBAR or SHIFT+SPACEBAR to adjust the selection. To cancel extended selection mode, press SHIFT+F8 again. Extended selection mode cancels itself when you move the focus to another control.

  • CTRL+TAB (Move forward through the tabs)
  • CTRL+SHIFT+TAB (Move backward through the tabs)
  • TAB (Move forward through the options)
  • SHIFT+TAB (Move backward through the options)
  • ALT+Underlined letter (Perform the corresponding command or select the corresponding option)
  • ENTER (Perform the command for the active option or button)
  • SPACEBAR (Select or clear the check box if the active option is a check box)
  • Arrow keys (Select a button if the active option is a group of option buttons)
  • F1 key (Display Help)
  • F4 key (Display the items in the active list)
  • BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box)

Microsoft natural keyboard shortcuts

  • Windows Logo (Display or hide the Start menu)
  • Windows Logo+BREAK (Display the System Properties dialog box)
  • Windows Logo+D (Display the desktop)
  • Windows Logo+M (Minimize all of the windows)
  • Windows Logo+SHIFT+M (Restore the minimized windows)
  • Windows Logo+E (Open My Computer)
  • Windows Logo+F (Search for a file or a folder)
  • CTRL+Windows Logo+F (Search for computers)
  • Windows Logo+F1 (Display Windows Help)
  • Windows Logo+ L (Lock the keyboard)
  • Windows Logo+R (Open the Run dialog box)
  • Windows Logo+U (Open Utility Manager)

Accessibility keyboard shortcuts

  • Right SHIFT for eight seconds (Switch FilterKeys either on or off)
  • Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off)
  • Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off)
  • SHIFT five times (Switch the StickyKeys either on or off)
  • NUM LOCK for five seconds (Switch the ToggleKeys either on or off)
  • Windows Logo +U (Open Utility Manager)

Windows Explorer keyboard shortcuts

  • END (Display the bottom of the active window)
  • HOME (Display the top of the active window)
  • NUM LOCK+Asterisk sign (*) (Display all of the subfolders that are under the selected folder)
  • NUM LOCK+Plus sign (+) (Display the contents of the selected folder)
  • NUM LOCK+Minus sign (-) (Collapse the selected folder)
  • LEFT ARROW (Collapse the current selection if it is expanded, or select the parent folder)
  • RIGHT ARROW (Display the current selection if it is collapsed, or select the first subfolder)

Shortcut keys for Character Map

After you double-click a character on the grid of characters, you can move through the grid by using the keyboard shortcuts:

  • RIGHT ARROW (Move to the right or to the beginning of the next line)
  • LEFT ARROW (Move to the left or to the end of the previous line)
  • UP ARROW (Move up one row)
  • DOWN ARROW (Move down one row)
  • PAGE UP (Move up one screen at a time)
  • PAGE DOWN (Move down one screen at a time)
  • HOME (Move to the beginning of the line)
  • END (Move to the end of the line)
  • CTRL+HOME (Move to the first character)
  • CTRL+END (Move to the last character)
  • SPACEBAR (Switch between Enlarged and Normal mode when a character is selected)

Microsoft Management Console (MMC) main window keyboard shortcuts

  • CTRL+O (Open a saved console)
  • CTRL+N (Open a new console)
  • CTRL+S (Save the open console)
  • CTRL+M (Add or remove a console item)
  • CTRL+W (Open a new window)
  • F5 key (Update the content of all console windows)
  • ALT+SPACEBAR (Display the MMC window menu)
  • ALT+F4 (Close the console)
  • ALT+A (Display the Action menu)
  • ALT+V (Display the View menu)
  • ALT+F (Display the File menu)
  • ALT+O (Display the Favorites menu)

MMC console window keyboard shortcuts

  • CTRL+P (Print the current page or active pane)
  • ALT+Minus sign (-) (Display the window menu for the active console window)
  • SHIFT+F10 (Display the Action shortcut menu for the selected item)
  • F1 key (Open the Help topic, if any, for the selected item)
  • F5 key (Update the content of all console windows)
  • CTRL+F10 (Maximize the active console window)
  • CTRL+F5 (Restore the active console window)
  • ALT+ENTER (Display the Properties dialog box, if any, for the selected item)
  • F2 key (Rename the selected item)
  • CTRL+F4 (Close the active console window. When a console has only one console window, this shortcut closes the console)

Remote desktop connection navigation

  • CTRL+ALT+END (Open the Microsoft Windows NT Security dialog box)
  • ALT+PAGE UP (Switch between programs from left to right)
  • ALT+PAGE DOWN (Switch between programs from right to left)
  • ALT+INSERT (Cycle through the programs in most recently used order)
  • ALT+HOME (Display the Start menu)
  • CTRL+ALT+BREAK (Switch the client computer between a window and a full screen)
  • ALT+DELETE (Display the Windows menu)
  • CTRL+ALT+Minus sign (-) (Place a snapshot of the entire client window area on the Terminal server clipboard and provide the same functionality as pressing ALT+PRINT SCREEN on a local computer.)
  • CTRL+ALT+Plus sign (+) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.)

Microsoft Internet Explorer navigation

  • CTRL+B (Open the Organize Favorites dialog box)
  • CTRL+E (Open the Search bar)
  • CTRL+F (Start the Find utility)
  • CTRL+H (Open the History bar)
  • CTRL+I (Open the Favorites bar)
  • CTRL+L (Open the Open dialog box)
  • CTRL+N (Start another instance of the browser with the same Web address)
  • CTRL+O (Open the Open dialog box, the same as CTRL+L)
  • CTRL+P (Open the Print dialog box)
  • CTRL+R (Update the current Web page)
  • CTRL+W (Close the current window)
Reference.
Categories
Linux

How To Find DNS Server Addresses in Windows

On Windows systems you can run the following command to view the current DNS server(s) from a command prompt:

ipconfig /all

And look for the “DNS Servers . . .” section.

See also: How To Find DNS Server Addresses in Linux