The sys admin’s daily grind – ifdata Info

Precision Interfacing

Article from Issue 148/2013

Script-friendly ifdata from the Moreutils package delivers absolutely precise network interface status information, with no need to extract individual values.

When I need to know whether a particular interface exists – and, if so, what IP address and MTU it has – my script is inevitably bulky. I then bombard the results of ip addr show eth0, ifconfig, or iwconfig with grep, cut, and regular expressions until the requested information is chiseled out. In contrast, ifdata from the Moreutils package solves my task elegantly. I can use parameters to control the ifdata output so that only the desired result appears, which is ideal for ongoing processing in a script.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Table of Contents: 148

    Science fiction authors and high-tech visionaries dream of a future where humans and computers communicate in ordinary English. A new cloud-based tool brings that future a little closer.

  • Charly's Column: GestióIP

    A tidy house, a tidy mind they say, and I’ll leave it up to you to consider what being disorganized might mean. Anybody who has tried to manage hundreds of IP addresses using just a sheet of paper or a spreadsheet will probably appreciate some help.

  • Charly's Column

    Charly often gets suggestions and ideas for his column at community get-togethers. Last week, he picked up a tip for an early warning system that quickly secures login attempts.

  • Charly's Column

    Using SQL to sift syslog data out of a database is an admittedly universal, but also fairly convoluted approach. phpLogCon, with its web interface, gives admins an easier option.

  • Charly's Column: SSLScan

    If, like our author Charly, you manage SSL-secured servers, read on to discover a tool that you will definitely appreciate. It checks whether the complete security setup is up to date.

comments powered by Disqus

Direct Download

Read full article as PDF:

054-054_charly.pdf (200.42 kB)