07-10-2011
Slow down output from dhclient-script to screen
Hi
I know the basic about script and sleep processes.
However this is more tricky:
I would like to run
sh -x /sbin/dhclient-script and slow down the output of the script as a whole.
How would you do it?
I would like to delay output on the screen with 1 second for every line for the output from the running script. That would be helpful for debugging
Thanks in advance
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm a newbie.
I'm having a problem at work with a script. What i'm trying to do is connect to a cisco switch from a sun station. After i run the script and telnet into the switch i don't get any output on the "xterm window" and all my commands from the script don't show up on the screen or on... (0 Replies)
Discussion started by: wisher115
0 Replies
2. Shell Programming and Scripting
Hello,
I need to capture everything showed on a screen by a shell script which needs user interaction. The shell script performs commads such as rsh so normal redirection to a file does not work.
I know there is a special unix command call "script" which records screen session but the... (4 Replies)
Discussion started by: lalfonso.gomez
4 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I have a script that bulk loads thousands of lines of data. I need to log the output during the execution of the script.
I know I can redirect (">") the output to a file; however, I want the output going to both the screen and the log file.
I thought I could use pipe to pipe the... (10 Replies)
Discussion started by: orahi001
10 Replies
4. Shell Programming and Scripting
I am trying to capture the session of a particular user id, by using the "script" command, by adding the "script" command to the .profile of that user id. Now, when I have to exit the session, I am having to give 2 exits - one for the script command, and the other to log out of the session. Is... (2 Replies)
Discussion started by: ggayathri
2 Replies
5. Ubuntu
I use Ubuntu 9.10 Netbook Remix and Intel wimax drivers to connect to wimax networks, but recently I faced with some problems with connection even when the signal is available and it is at some proper level... Here is system log, which may concerns problem occurred:
dhclient: Can't allocate... (0 Replies)
Discussion started by: Sapfeer
0 Replies
6. UNIX for Dummies Questions & Answers
I found some ascii art that is animated (vt100) and would like to view it properly. However, when I try using 'cat', the file is done almost the instant I press enter. How can I view the file in a slower fashion (similar to the days of 2400baud, for example)? (2 Replies)
Discussion started by: Fangs McWolf
2 Replies
7. Red Hat
Hi
Can anyone please tell me how to disable dhclient on redhat host.
I have set static IP to one of my redhat host but I don't know how it changes to some other IP after few hours.
here is the output from ifcfg-eth0 and rc.local
test-123 root # cat... (2 Replies)
Discussion started by: tannu
2 Replies
8. Shell Programming and Scripting
I'm calling an embedded sql from my shell script file. This sql does simple task of spooling out the contents of the table (see below my sample code) into a spool file that I specify. So far so good, but the problem is that the output is also displayed on screen which I do NOT want.
How can I... (3 Replies)
Discussion started by: MxC
3 Replies
9. Shell Programming and Scripting
Hi,
I am new to scripting.I am using redhat linux 6.I am just finding a way to summing up the output displayed as below.It will help me a lot since we used to get this kind of output every now and then.
I am pasting here the output .What is required is this o/p needs to be summed up and... (3 Replies)
Discussion started by: muraliinfy04
3 Replies
10. Shell Programming and Scripting
Hi,
I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed.
Below is my sample... (14 Replies)
Discussion started by: Prathmesh
14 Replies
LEARN ABOUT FREEBSD
dhclient
DHCLIENT(8) BSD System Manager's Manual DHCLIENT(8)
NAME
dhclient -- Dynamic Host Configuration Protocol (DHCP) client
SYNOPSIS
dhclient [-bdqu] [-c file] [-l file] [-p file] interface
DESCRIPTION
The dhclient utility provides a means for configuring network interfaces using DHCP, BOOTP, or if these protocols fail, by statically assign-
ing an address.
The name of the network interface that dhclient should attempt to configure must be specified on the command line.
The options are as follows:
-b Forces dhclient to immediately move to the background.
-c file Specify an alternate location, file, for the configuration file.
-d Forces dhclient to always run as a foreground process. By default, dhclient runs in the foreground until it has configured the
interface, and then will revert to running in the background.
-l file Specify an alternate location, file, for the leases file.
-p file Specify an alternate location for the PID file. The default is /var/run/dhclient.interface.pid.
-q Forces dhclient to be less verbose on startup.
-u Forces dhclient to reject leases with unknown options in them. The default behaviour is to accept such lease offers.
The DHCP protocol allows a host to contact a central server which maintains a list of IP addresses which may be assigned on one or more sub-
nets. A DHCP client may request an address from this pool, and then use it on a temporary basis for communication on the network. The DHCP
protocol also provides a mechanism whereby a client can learn important details about the network to which it is attached, such as the loca-
tion of a default router, the location of a name server, and so on.
On startup, dhclient reads /etc/dhclient.conf for configuration instructions. It then gets a list of all the network interfaces that are
configured in the current system. It then attempts to configure each interface with DHCP.
In order to keep track of leases across system reboots and server restarts, dhclient keeps a list of leases it has been assigned in the
/var/db/dhclient.leases.IFNAME file. IFNAME represents the network interface of the DHCP client (e.g., em0), one for each interface. On
startup, after reading the dhclient.conf(5) file, dhclient reads the leases file to refresh its memory about what leases it has been
assigned.
Old leases are kept around in case the DHCP server is unavailable when dhclient is first invoked (generally during the initial system boot
process). In that event, old leases from the dhclient.leases.IFNAME file which have not yet expired are tested, and if they are determined
to be valid, they are used until either they expire or the DHCP server becomes available.
A mobile host which may sometimes need to access a network on which no DHCP server exists may be preloaded with a lease for a fixed address
on that network. When all attempts to contact a DHCP server have failed, dhclient will try to validate the static lease, and if it succeeds,
it will use that lease until it is restarted.
A mobile host may also travel to some networks on which DHCP is not available but BOOTP is. In that case, it may be advantageous to arrange
with the network administrator for an entry on the BOOTP database, so that the host can boot quickly on that network rather than cycling
through the list of old leases.
NOTES
You must have the Berkeley Packet Filter (BPF) configured in your kernel. The dhclient utility requires at least one /dev/bpf* device for
each broadcast network interface that is attached to your system. See bpf(4) for more information.
FILES
/etc/dhclient.conf DHCP client configuration file
/var/db/dhclient.leases.IFNAME database of acquired leases
SEE ALSO
dhclient.conf(5), dhclient.leases(5), dhclient-script(8)
AUTHORS
The dhclient utility was written by Ted Lemon <mellon@fugue.com> and Elliot Poger <elliot@poger.com>.
The current implementation was reworked by Henning Brauer <henning@openbsd.org>.
BSD
October 13, 2011 BSD