Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re:**3 (rob_au) Getting net addy on localhost?

by Dogma (Pilgrim)
on Nov 27, 2001 at 10:36 UTC ( [id://127742]=note: print w/replies, xml ) Need Help??


in reply to Re:**3 (rob_au) Getting net addy on localhost?
in thread Getting net addy on localhost?

That is incorrect, '/etc/sysconfig/network-scripts/ifcfg-*' is a RedHat-ism and isn't even portable between all linux distros. As far as I know there is no standard file between unix and unix-like systems for this information. You can try /etc/hosts but that will only give you resolvable interfaces. Parsing the output of '/sbin/ifconfig' is more likely to be portable. (not that portability is the goal here, but we don't know what system your running on) SNMP (if you have it running) would be another possible means of getting interfaces addresses.
  • Comment on Re: Re:**3 (rob_au) Getting net addy on localhost?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://127742]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-25 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found