Commit Graph

7876 Commits

Author SHA1 Message Date
Ruslan Ermilov
2ad08c56d8 Add some significant Ukrainian dates.
PR:		88076
Submitted by:	Andriy Gapon
2005-10-28 21:25:28 +00:00
John Baldwin
444ec0d5f5 Fix misspelled 'argument' and try to make the sentence into English.
Submitted by:	Andre Guibert de Bruet andy at siliconlandmark dot com
2005-10-26 17:37:54 +00:00
Colin Percival
923e7a09b0 Use the "builtin" shell function to make sure that the requested
command is handled as a shell function.  This avoids the following
peculiar behaviour when /usr/bin is on a case-insensitive filesystem:
    # READ foo
(... long pause, depending upon the amount of swap space available ...)
    sh: Resource temporarily unavailable.

Reported by:	I can't remember; someone on IRC.
MFC after:	1 week
2005-10-24 22:32:19 +00:00
Tim J. Robbins
e21dde7b1d Document incorrect handling of multibyte characters.
PR:		87724
2005-10-23 01:37:25 +00:00
Max Laier
e5134d2e82 Fix obvious copy'n'paste-O in rev.1.36 While here nit style.
PR:		bin/87783
Submitted by:	Mats Palmgren
MFC after:	1 week
2005-10-22 17:50:45 +00:00
Stefan Farfeleder
2110d9c31a Use the new name H_SETSIZE instead of the old H_EVENT to set the history
size.

PR:	86355
2005-10-19 15:37:43 +00:00
Ruslan Ermilov
fd9070970c Make sure that files included using ".include <foo>" are really
looked for in the system make file directory or in the specified
-m paths instead of always looking in the other -I and .PATH
specified paths.  (Commit log shamelessly stolen from NetBSD.)

Reviewed by:	yar
2005-10-17 15:56:26 +00:00
Andre Oppermann
a21cbcb876 Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec)
instead of subtracting 'bootime' from 'now'.

Sponsored by:	TCP/IP Optimization Fundraise 2005
2005-10-17 15:37:22 +00:00
Alfred Perlstein
6a6567612d The kernel accepts sockaddrs with len set to zero for sockaddr_in
types, so refactor the code here to grab them when length is zero.
2005-10-15 06:17:29 +00:00
Yaroslav Tykhiy
aeb2a851ad Revise the manpage to a certain extent, mostly with respect to
make's processing of top-level and included makefiles.  Point
out at make.conf(5) and __MAKE_CONF when telling about sys.mk.

Reviewed by:	ru
2005-10-14 23:54:20 +00:00
Ruslan Ermilov
f329a1513a Style: move .PATH to where it belongs. 2005-10-14 15:50:22 +00:00
Yaroslav Tykhiy
9c4e83a46c __MAKE_CONF doesn't really belong here because it is
a FreeBSD extension of sys.mk.  A xref to make.conf(5)
will be enough here.

Requested by:	ru
2005-10-12 10:09:36 +00:00
Yaroslav Tykhiy
253c3c7312 Clarify the usage and effects of sys.mk, make.conf(5), and __MAKE_CONF.
MFC after:	2 weeks
2005-10-10 14:49:55 +00:00
Scott Long
1030a78a12 Make sure that the created fifo gets deleted if the top level make instance
exits due to a signal.
2005-10-09 06:36:51 +00:00
Christian S.J. Peron
cc2a9f52a7 Finish off style(9) fixes which I started two revisions ago. This basically
changes the indentation style from 4 spaces to 8 spaces which we expect to
see in other FreeBSD source files.
2005-10-09 04:45:41 +00:00
Bruce Evans
762116ae25 Catch up with increasing the resolution suitable for high-res kernel
profiling from microseconds to nanoseconds in 1996.  Picoseconds are
already needed.

Describe the choice of units for the per-call times in detail.
2005-10-07 11:58:46 +00:00
Christian S.J. Peron
45edbdccd7 Do not ignore ENOENT
Pointed out by:	Amir Shalem
2005-10-07 11:49:27 +00:00
Bruce Evans
0b146898f0 Improve printing of self times in the flat profile for functions that
appear to be never called:

(1) If a function is never called according to its call count but it
    must have been called because its child time is nonzero, then print
    it in the flat profile.  Previously, if its call count was zero
    then we only printed it in the flat profile if its self time was
    nonzero.

(2) If a function has a zero call count but has a nonzero self or child
    time, then print its total self time in the self time per call
    column as a percentage of the total (self + child) time.  It is
    not possible to print the times per call in this case because the
    call count is zero.  Previously, this was handled by leaving both
    per-call columns blank.  The self time is printed in another column
    but there was no way to recover the total time.

(1) partially fixes the case of the "never called" function main() and
prepares for (2) to apply to main() and other functions.  Profiling
of main() was lost in the conversion from a.out to ELF, so main()'s
call count has always been zero for many years; then in the common
case where main() is a tiny function, it gets no profiling ticks, so
main() was completely lost in the flat profile.

(2) improves mainly cases like kernel threads.  Most kernel threads
appear to be never called because they are always started before
userland can run to turn on profiling.  As for main(), the fact that
they are called is not very interesting and their callers are
uninteresting, but their relative self time is interesting since they
are long-running.

Almost always printing percentages in the per-call columns would be
more useful than almost always printing 0.0ms.  0.1ms is now a long
time, so only very large functions take that long per call.  The accuracy
per call can approach 1-10 nsec provided programs are run for about
100000 times as long as is necessary to get this accuracy with high
resolution kernel profiling.
2005-10-07 10:59:41 +00:00
Yaroslav Tykhiy
e53e5e56d9 Sync usage screen with manpage.
MFC after:	5 days
2005-10-07 10:18:44 +00:00
Yaroslav Tykhiy
6fcf85bc95 Document the -d flag to mail(1) better, which comes handy when
you want to see, e.g., sendmail arguments mail(1) will use.

-H is not an independent flag, it's a modifier.  Also explicitly
say that -H will cause mail(1) to exit as soon as it prints the headers.

MFC after:	5 days
2005-10-07 10:16:41 +00:00
Emanuel Haupt
b8b9c6fe06 Adding myself to calendar.freebsd
Approved by:	novel (mentor)
2005-10-06 19:16:55 +00:00
Christian S.J. Peron
4ccbe0c50d Un-break handling of -t 0 which was broken in my previous commit.
Add a flags argument to wait_for_lock so that O_NONBLOCK can be
passed to open if a user doesn't want the open to sleep until the
lock becomes available.

Submitted by:	Amir Shalem (partially modified)
2005-10-05 22:02:07 +00:00
Christian S.J. Peron
031469eb27 Fix long standing race condition associated with how lockf uses open(2)
for mutual exclusion:

A brief description of the problem:

	1) Proc A picks up non-blocking lock on file X
	2) Proc B attempts to pickup lock, fails then waits
	3) Proc C attempts to pickup lock, fails then waits
	4) Proc A releases lock
	5) Proc B acquires lock, release it to pickup a non-blocking version
	6) Proc C acquires lock, release it to pickup a non-blocking version
	7) Both process B and C race each other to pickup lock again

This occurs mainly because the processes do not keep the lock after they have
been waiting on it. They drop it, attempt to re-acquire it. (They use the wait
to notify when the lock has become available then race to pick it up). This
results in additional CPU utilization during the race, and can also result
in processes picking locks up out of order.

This change attempts to correct this problem by eliminating the test/acquire
race and having the operating system handle it.

Reported by:	kris
Tested by:	kris
MFC after:	1 week
2005-10-05 17:39:15 +00:00
Gary W. Swearingen
f0ab9f7b39 A minor overhaul: added comments, split cmds in 2, changed synopsis.
Split commands into two groups: one with optional count and one with
required argument.  Changed synopsis line accordingly.

Added some hopefully-helpful comments based on experiments, knowing
that not all hardware works the same.

PR:             docs/84101
Approved by:    keramida
MFC after:      3 days
2005-09-30 17:31:39 +00:00
Ruslan Ermilov
7fc550064a Oops, revert last commit (the manpage is still built in objdir). 2005-09-28 07:54:18 +00:00
Ruslan Ermilov
ec2cc32689 Add NO_OBJ. 2005-09-28 07:49:30 +00:00
Max Laier
b6de9e91bd Remove bridge(4) from the tree. if_bridge(4) is a full functional
replacement and has additional features which make it superior.

Discussed on:	-arch
Reviewed by:	thompsa
X-MFC-after:	never (RELENG_6 as transition period)
2005-09-27 18:10:43 +00:00
Gleb Smirnoff
7c23a867f7 - Print space character in show_stat(). Remove a lot of priuntf(" ").
- Utilize show_stat() in sidewaysintpr() loop. This makes periodic
  statistics to honor -h flag.
2005-09-27 10:42:02 +00:00
Ruslan Ermilov
762fcdcf7d Remove redundant `\&' escapes. 2005-09-27 08:06:21 +00:00
Ruslan Ermilov
0b13db0306 Fixup previous commit. 2005-09-27 08:02:03 +00:00
Poul-Henning Kamp
1b56a319fe Please ship the pointy hat to its home position. 2005-09-26 22:07:59 +00:00
Poul-Henning Kamp
c711b5fe88 Update coordinates for "mph" hash generator now that it lives in ports. 2005-09-26 20:34:21 +00:00
Poul-Henning Kamp
2e5ee2bfac Add a .sinclude directive which does the exact same as .include, except
whine when the file cannot be found and opened.
2005-09-26 20:31:00 +00:00
Tim Kientzle
512c45ef6c Fix -u with absolute paths (e.g., "tar -uf foo.tar /bar") by handling
pathname edits before comparing pathnames on disk to those in the archive.

Thanks to: Gareth Bailey, Lowell Gilbert
2005-09-24 21:19:57 +00:00
Tim Kientzle
2f3b67647f Detect Mac OS X's broken ACL library.
Thanks to: Diego "Flameeyes" Petten?
2005-09-24 21:17:47 +00:00
Stefan Farfeleder
7c4847b792 The function inplace_edit() doesn't exist anymore, remove the prototype.
Submitted by:	Leonardo Chiquitto Filho
2005-09-24 13:18:30 +00:00
Marcus Alves Grando
8008bfe18b Add myself to FreeBSD calendar
Approved by:	pav (mentor)
2005-09-23 13:06:23 +00:00
Ruslan Ermilov
05248e759b Fix vgrind(1) indexing I broke in previous revision.
PR:		bin/86343
Submitted by:	Matej Vela <vela@debian.org>
2005-09-23 12:55:22 +00:00
Kirill Ponomarev
4e099ef9d9 Frank Lloyd Wright birth year is 1867, not 1869.
PR:		conf/82051
Submitted by:	Derek Jones <derek at wahila dot com>
2005-09-23 12:02:27 +00:00
Kirill Ponomarev
bb569d6301 Fix typo, FRG and GDR became UNO members in 1973, not in 1993.
PR:		conf/86193
Submitted by:	Matthias Buelow <mkb at incubus dot de>
2005-09-23 11:58:16 +00:00
Tim Kientzle
c114cc6c3f Style fix: Correct a compiler warning from GCC 4
Thanks to: Divacky Roman
PR: bin/84993
2005-09-21 03:21:35 +00:00
Diomidis Spinellis
d2e4ea2a51 Setting .nofinger will not hide you from root. 2005-09-19 10:11:47 +00:00
R. Imura
59fa708298 Connect smbfs build on powerpc. 2005-09-19 08:13:43 +00:00
Christian S.J. Peron
8729849a45 Use is '-' to imply that the flag is not set, rather than '.'. 2005-09-15 16:09:24 +00:00
Christian S.J. Peron
6f798df578 Print a warning if we fail to retrieve the process name for any reason. 2005-09-13 23:11:16 +00:00
Christian S.J. Peron
15f3d81f9c If there are'nt any bpf descriptors to process than dont bother attempting to
retrieve statistic information for them.

Pointed out by:	Pawel Worach < pawel.worach at gmail.com >
2005-09-13 22:13:01 +00:00
Christian S.J. Peron
48d91509de Free the bpf descriptor array after we are done with it. This probably isnt
that critical as the program exits after this point anyway, but this may
not always be the case.
2005-09-07 19:28:01 +00:00
Christian S.J. Peron
5dbd2da153 Update usage to reflect the new option.
Pointed out by:	ru
2005-09-07 19:15:43 +00:00
Gary W. Swearingen
25b20fc0b2 Several changes: Added a BUGS section with several bugs. And
--  Made the synopses more precise.
--  Added argument to flag in option description.
--  Moved -b default and limits to option description (to un-hide).
--  Noted several behaviors that were not mentioned.
--  A few more trivial changes.

PR:             docs/46787
Approved by:    keramida
MFC after:      3 days
2005-09-07 18:40:09 +00:00
Christian S.J. Peron
6b463eed3a Merge bpfstat's functionality into the netstat(1) utility. This adds
a -B option which causes bpf peers to be printed. This option can be
used in conjunction with -I if information about specific interfaces
is desired. This is similar to what NetBSD added to their version of
netstat.

$ netstat -B
  Pid  Netif  Flags      Recv      Drop     Match Sblen Hblen Command
 1137    lo0 p--s--         0         0         0     0     0 tcpdump
  205   sis0 -ifs-l     37331         0         1     0     0 dhclient
$

$ netstat -I lo0 -B
  Pid  Netif  Flags      Recv      Drop     Match Sblen Hblen Command
 1174    lo0 p--s--         0         0         0     0     0 tcpdump
$

-Add bpf.c which stores all the code for retrieving and parsing bpf
 related statistics.
-Modify main.c to add support for the -B option and hook it into the
 program logic.
-Add bpf.c to the build.
-Document this new functionality in the man page and bump the revision
 date.
-Add prototype for bpf_stats function.
2005-09-07 17:35:16 +00:00