MAC address in the client data?
Ward, Martin
Martin.Ward at colt.net
Wed Jul 21 18:10:43 CEST 2010
All,
I don't know if this quirk is peculiar to Solaris or is the same on
other flavours of UNIX, but if you are not the root user and you run the
ifconfig(1m) command it does not show the MAC address assigned to the
interfaces. Here is what I see in Xymon's client data view for one host:
[ifconfig]
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.5.2.46 netmask ffffffe0 broadcast 10.5.2.63
If I login as root and run the command I see:
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.5.2.46 netmask ffffffe0 broadcast 10.5.2.63
ether 0:3:ba:96:e6:4f
I am currently writing a script to retrieve information from the stored
client data and to populate a database with that info. In this manner
when I install Xymon on a new server the configuration information is
automatically updated in my server database. The question is: How can I
get the MAC address? By default the Xymon client is installed and run
under the hobbit user ID. Is there any way I can configure the
hobbitclient-sunos.sh script to run as root? I guess I could run the
ifconfig command using sudo and configure sudo so that it doesn't
require a password, but is there any other/better/easier/more elegant
ways of doing this?
|\/|artin
--
Martin Ward
Manager, Technical Services
DDI:+44 (0) 20 7863 5218 / Fax: +44 (0)20 7863 9999 / www.colt.net
<http://www.colt.net/>
Colt Technology Services, Unit 12, Powergate Business Park, Volt Avenue,
Park Royal, London, NW10 6PW, UK.
Help reduce your carbon footprint | Think before you print. Registered
in England and Wales, registered number 02452736, VAT number GB 645 4205
50
[Colt Disclaimer]
The message is intended for the named addressee only and may not be disclosed
to or used by anyone else, nor may it be copied in any way. The contents of
this message and its attachments are confidential and may also be subject to
legal privilege. If you are not the named addressee and/or have received this
message in error, please advise us by e-mailing abuse at colt.net and delete the
message and any attachments without retaining any copies. Internet
communications are not secure and Colt does not accept responsibility for this
message, its contents nor responsibility for any viruses. No contracts can be
created or varied on behalf of Colt Technology Services, its subsidiaries,
group companies or affiliates ("Colt") and any other party by email
communications unless expressly agreed in writing with such other party.
Please note that incoming emails will be automatically scanned to eliminate
potential viruses and unsolicited promotional emails. For more information
refer to www.colt.net or contact us on +44(0)20 7390 3900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20100721/33effded/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 23274 bytes
Desc: image001.jpg
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20100721/33effded/attachment.jpg>
More information about the Xymon
mailing list