SCIENTIFIC-LINUX-USERS Archives

June 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
ToddAndMargo <[log in to unmask]>
Reply To:
ToddAndMargo <[log in to unmask]>
Date:
Sun, 21 Jun 2015 18:21:06 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
On 06/21/2015 05:59 PM, ToddAndMargo wrote:
> On 06/21/2015 11:22 AM, Tom H wrote:
>> On Sun, Jun 21, 2015 at 2:22 AM, ToddAndMargo <[log in to unmask]>
>> wrote:
>>>
>>> Okay, I give up.  What happened to
>>>
>>> /var/lib/dhcp/dhclient-eth0.leases
>>
>> ps ax | grep dhc | grep -v grep
>>
>> and the "-lf" file will show you the lease.
>>
>
> Hi Tom,
>
> Ah Ha!  This on SL7:
>
> $ ps ax | grep dhc | awk -F "-lf " '{print $2}' | awk '{print $1}' |
> grep lease
>
> /var/lib/NetworkManager/dhclient-43af4b20-79ba-4ca8-aa9f-c0cdec45e25f-eth0.lease
>
>
> Thank you for helping me with this!
>
> -T
>


Okay, now I am getting scary!

$ grep dhcp-server-identifier  $(ps ax | grep dhc | awk -F "-lf " 
'{print $2}' | awk '{print $1}' | grep lease) | sort -r | sed -n 1,1p | 
awk  '{print $3}' | awk -F ";" '{print $1}'

192.168.255.10


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ATOM RSS1 RSS2