[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xymon] MAC address in the client data?
- To: xymon (at) xymon.com
- Subject: Re: [xymon] MAC address in the client data?
- From: Vernon Everett <everett.vernon (at) gmail.com>
- Date: Thu, 22 Jul 2010 11:00:40 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=JJ3yWrJtU6I1FtyjyKUmqzLT043dC+2g1x9yRypWS94=; b=iJ1yY95Q9YtjoIwiNSrhV/BX0YxJyy8W6qCOEuGfsVniwHZzhy9WjbmYf+CfRXFVI8 qYqPgWG1ieeTAqemVPRWRXzAMh88gQ07Rky1ncqWvUeD6PWNPFCjnCnXEY+/utWAIn0w Vo0aBKqehoSQ7i0uRedbHcnOqo99V3Fryf0tE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=kZb4Sza+SiuQyrVstbVUFalBtzYhFyW54qvDZ7x+9a21XmsZG/5kqTKipBl22Mm95d x9bHNVFBqk92WMg0Qh2hDn09Rsrr0nY7rknQL8jJ/BlQ3AHSqa/d0nRP/S52NpYr+O00 GV/nNSp4rO1V1Dd3RGqq/M32pEopu5I2cwzhI=
- References: <6255_1279728644_4C471C04_6255_25060_1_1F7B01020EC4D04DA17703634B9E888E10B11110 (at) ULPGCTMVMAI003.EU.COLT>
Hi Martin
I believe this to be a Solaris feature. And looks like it is also the case
on others.
See here http://www.coffer.com/mac_info/locate-unix.html
And yes, I think sudo is the simplest way of getting round it.
However, if you have conscientious objections to using root and/or sudo, you
could try messing about with the output of arp -a.
A bit of creative scripting, and you should get something you could tack
onto the output of ifconfig -a.
YMMV.
Cheers
Vernon
On Thu, Jul 22, 2010 at 12:10 AM, Ward, Martin <Martin.Ward (at) colt.net> wrote:
> 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
>
> --
>
> [image: Colt email signature FINAL]
>
> Martin Ward
>
> *Manager, Technical Services*
>
>
>
> DDI:+44 (0) 20 7863 5218 / Fax: +44 (0)20 7863 9999 / 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
>