Sponsored Content
Full Discussion: ps -ef
Top Forums UNIX for Dummies Questions & Answers ps -ef Post 81413 by matrixmadhan on Friday 19th of August 2005 10:21:07 AM
Old 08-19-2005
Quote:
Originally Posted by jim mcnamara
Code:
ps -ef | grep -q dhcpd
if [ $? -eq 0 ] ; then
  echo "dhcpd running"
else
  echo "dhcpd not running"
fi

with the above, there could be frequent chances where we do end up with process info that are not under specific user control.

ps -ef | grep <user> | grep -q dhcpd
 
dhclient.leases(5)						File Formats Manual						dhclient.leases(5)

NAME
dhclient.leases - DHCP client lease database DESCRIPTION
The Internet Systems Consortium DHCP client keeps a persistent database of leases that it has acquired that are still valid. The database is a free-form ASCII file containing one valid declaration per lease. If more than one declaration appears for a given lease, the last one in the file is used. The file is written as a log, so this is not an unusual occurrence. The format of the lease declarations is described in dhclient.conf(5). FILES
/var/lib/dhclient/dhclient.leases SEE ALSO
dhclient(8), dhcp-options(5), dhclient.conf(5), dhcpd(8), dhcpd.conf(5), RFC2132, RFC2131. AUTHOR
dhclient(8) was written by Ted Lemon under a contract with Vixie Labs. Funding for this project was provided by Internet Systems Consor- tium. Information about Internet Systems Consortium can be found at https://www.isc.org. dhclient.leases(5)
All times are GMT -4. The time now is 01:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy