Sponsored Content
Top Forums Shell Programming and Scripting getting mac from ip (or the contrary) Post 302296594 by chebarbudo on Wednesday 11th of March 2009 11:28:41 AM
Old 03-11-2009
Thanks danmero for helping me.
Unfortunately, I can't use arp (command not found). Maybe because I'm not root.
I found this solution though:
Code:
[[ -n $(mysql "SELECT id FROM terminal WHERE ip = '$ip' AND mac = '$(ssh root@$ip 'cat /sys/class/net/eth0/address')'") ]] && ...

 

We Also Found This Discussion For You

1. OS X (Apple)

Let's get a .mac top level domain! As in www.xyz.mac

ICANN, the Internet Corporation for Assigned Names and Numbers, is inviting proposals for new sponsored top level domains. This may be wishful thinking, but isn't that a chance to push for a .mac top level domain (TLD)? I for one would VASTLY like the idea of having a domain of something.mac --... (0 Replies)
Discussion started by: ropers
0 Replies
amttool(1)						      General Commands Manual							amttool(1)

NAME
amttool - remotely control Intel AMT managed machines. SYNOPSIS
amttool host [ command ] [ arg(s) ] DESCRIPTION
amttool is a perl script which speaks SOAP to Intel AMT managed machines. It can query informations about the machine in question and also send some commands for basic remote control. host is the hostname or IP address of the machine amttool should control. command is an optional command. You must set fill AMT_PASSWORD environment variable with the AMT password. For more inforamtions on Intel AMT check amt-howto(7). COMMANDS
info gather information (default). reset [ special ] reset machine, with optional special command (see section below). powerup [ special ] turn on machine. powerdown turn off machine. powercycle [ special ] powercycle machine. netinfo print network configuration (requires AMT 2.5+). netconf if link [ ip mask gw [ dns1 [ dns2 ]]] configure network interface (requires AMT 2.5+). if is the interface handle, link the link policy. If in doubt just feed in what the netinfo command prints. ip is the IPv4 address, mask the netmask, gw the default gateway, dns1 and dns2 are the DNS Servers. If no IP configuration is specified the tool tries to configure the machine in shared mac address mode with dhcp, otherwise in sepa- rate mac address mode with static IP address. Default for dns1 is the gateway address, for dns2 it is 0.0.0.0. SPECIAL COMMANDS
Special commands can optionally be specified for reset, powerup and powercycle. They change the default boot behavior of the machine. bios Asks for the BIOS boot messages being redirected to serial-over-lan. pxe Network boot via PXE. hd Boot from local disk. hdsafe Boot from local disk (safe mode). cd Boot from CD/DVD. diag Boot in diagnostics mode. ENVIRONMENT
AMT_PASSWORD AMT password. AMT_DEBUG Enable debug output. SEE ALSO
amtterm(1), gamt(1), amt-howto(7) AUTHOR
(c) 2007 Gerd Hoffmann <kraxel@redhat.com> (c) 2007,08 Gerd Hoffmann amttool(1)
All times are GMT -4. The time now is 11:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy