summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Fix the way in which median is calculated. If the data source has evenwkoszek2006-02-231-7/+18
| | | | | | | number of data points, value should be calculated by adding two middle elements and dividing them by 2. Approved by: cognet (mentor)
* Add myself as a new src commiter:wkoszek2006-02-221-0/+1
| | | | | | | + extend calendar with my birth date Approved by: cognet (mentor) Reviewed by: cognet (mentor)
* If opendir(".") fails after descending into a subdirectory viapeadar2006-02-221-1/+2
| | | | | | | | | | chdir(), be sure to undo the effects of the chdir before continuing. Without this, after hitting a directory with mode 0111 (for example), tar will get lost, and won't add any yet unvisted files to your archive. (Or possibly add the wrong files, I suppose...) Reviewed By: kientzle@
* Add option -w to specify graph width.mdodd2006-02-221-3/+24
| | | | | | Use COLUMNS, terminal width for default graph width. Reviewed by: rwatson
* In wall and who, check that the utmp entry isn't stalled, as it is done in w.cognet2006-02-212-3/+36
| | | | | | | Apparently with the new pts code stalled entries are printed, when they are not with the BSD ptys. Submitted by: Michal Mertl <mime at traveller dot cz>
* Improved description for packet zone statistics.andre2006-02-181-1/+1
| | | | | Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days
* Print statistics on mbuf+clusters in packet zone.andre2006-02-181-0/+4
| | | | | Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days
* Print statistics on jumbo mbuf clusters.andre2006-02-181-2/+72
| | | | | Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days
* Move the "r p d s w" fields to the left to create space for expansion.bde2006-02-141-25/+26
| | | | | | | | | | | | | | | | | | | | | | 3 columns were wasted at the left, except these columns were used to make the header line up. Now there is no space on the same line for the "Proc:" part of the header. Try putting this on the line above although it clutters that line (there is already similar clutter for the "Interrupts" header). Leave 1 column between these fields. With the above and a previous change there is enough of space for this. Use 5 columns instead of 3 for the number of users since 3 is not quite enough and there was space to spare. This also fixes an off-by-2 error in a previous fix forthe column count in the comment on STATROW. Move all the pager fields 1 to the right so that the "count" and "pages" descriptors more clearly apply to the pager fields and not the memory fields. There was space to space. Waste some of the spare space at the right of the pager fields to expand all the pager field widths to their old values (but now with a column between the fields). There are fields more in need of expansion but most of them are not in places near spare space.
* Removed the frobbing of CPU percentages from > 99.9 to 99.9. Rev.1.35bde2006-02-141-2/+0
| | | | | | | | | | | | made it unnecessary. (Rev.1.6 had to reduce the field width to 4, and changed 100.0 and preposterous larger values down to 99.9 since 100.0 wouldn't have fitted. Rev.1.35 handles precentages > 99.9 well enough by changing the format to %.0f when the string given by the initial format is too wide.) Even with this change, during short testing I've never seen a percentage of 100 being displayed by systat -v, although top(1) displays percentages of 100 user or 100 idle for similar loads.
* Fix some minor bugs:bde2006-02-141-13/+21
| | | | | | | | | | | | | | | Always use snprintf()'s return value, since discarding it is a style bug at best and using it here gives slightly simpler code and better error checking. Use snprintf() in putlongdouble() the same as in putfloat(). (1.25 changed most sprintf()'s to snprintf()'s to fix non-bugs without changing the logic to use the result of snprintf(); 1.27 restored one of the sprintf()s by cloning a stale version of putfloat().) Don't print a too-long field in the unlikely case that the fallback to M units in putint() leaves the field still too long. (The fallback to printing stars was lost in rev.1.58 when the fallback to M units was added.)
* Reduce the field width by 1 for many numeric fields so that most fieldsbde2006-02-141-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | cannot run into other fields or field descriptors. If the value is too large to fit in the field width, then the output format is adjusted so that the value (usually) fits, but with fields running together externally this adjustment usually didn't help. Mostly it doesn't matter to lose 1 digit of precision, but switching the output format is bad if it happens often or gives bogus units. The loss of width is most serious for fields near "Csw" (which are also the ones which must often ran together) since these have a high variance and large values relative to the possible field widths so the switch occurs more often now, and for the memory size fields where the switch gives the bogus units kKB or MKB. Now only the fields for r, p, d, s and w can run into each other. These fields have width 3, and 3 cannot be reduced to 2 without losing all precision when the value is between 100 and 999. Trim "pdwake" to "pdwak" at think time now that it doesn't get clobbered at runtime. The manpage doesn't need to be changed for this because it documents the clobbered descriptor, unlike for 4 other too-long descriptors which only get clobbered if there are lots of interrupt sources. Trim "% busy" to "%busy" since most other descriptors for percentages are spelled without the space and this change makes changing the widths of the %busy fields unnecessary.
* Oops, the "excessive" {} removed in the previous commit was neededbde2006-02-141-1/+3
| | | | | | around PUTRATE() because PUTRATE() only looked like a function -- it was multiple statements. Use "do {...} while(0)" as usual in PUTRATE() so that it is a single statement that can be used like a function.
* Fixed all (?) bitrot in the comments about the number of columns used bybde2006-02-141-8/+8
| | | | various groups of fields.
* Fix all (?) cases where the field width of a numeric field was far toobde2006-02-141-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | large. In most cases it is still 1 too large, so fields tend to run together, but in the following cases it was more than 1 too large, and the starting column was too small too, so the field started inside the previous field or descriptor and clobbered that: - "wire": the number for this overwrote 2 characters of the number for "Flt". Reduce the field width by 3 (2 to avoid the overwrite and 1 so that the fields don't run together). This was already done for the preceding number for "cow". - "inact": the number for this overwrote 1 character of the descriptor "Idle". Reducing the field width by 2 is enough. - "cache:" the number for this overwrote 3 characters of the scale "...| |". The field width should be reduced by 4 to keep things from running together, but that is a lot and not so necessary here since the final "|" in the scale serves as a delimiter. Only reduce it by 3. - "free": the number for this overwrote 2 characters of the bar graph. The character position under the final "|" in the scale is apparently not used, so reducing the field width by 3 is enough. When "zfod" is in the main vmstat display: - use the normal field width of 9 (not 5) for it since there is no shortage of space. Fix style bugs (excessive {}) in the statement that conditionally writes it. Write all reduced field widths for vmstat fields as "9 - <reduction>" as a hint that we don't want to reduce them.
* Fixed style bugs in rev.1.12. Rev.1.12 arranged to display the interruptbde2006-02-141-7/+7
| | | | | | | | | | | | number in more cases by stealing 2 characters from the count field to give more space in the descriptor field, but it did the column adjustments for this strangely using an off-by-2 error in the base column and compensating off-by-2 errors in 6 offsets from the base column (4 new errors and 2 from not changing the offsets that actually changed). Print the "Interrupts" header directly at its offset from the base column instead of spacing it half using the offset and half by printing a space character.
* The change to make column use roundup(x, TAB) rounded things to thedwmalone2006-02-131-3/+3
| | | | | | | | | | | | | current tab, however the code it replaced wanted to round to the next TAB. Consequently things like this: ( echo 1 ; echo 2 ) | column cause column to loop indefinitely. This patch is slightly different from the one Gary submitted, but is closer to the original code. Submitted by: Gary Cody <gary@lyranthe.org> MFC after: 1 week
* Default number of direct access devices had been changed from three to two.marck2006-02-121-6/+6
| | | | | | | | Reflect this in other paragraphs. PR: 93201 Submitted by: Marian Cerny MFC After: 1 week
* Sort sfbuf allocation counters with other sfbuf information.rwatson2006-02-111-13/+9
| | | | MFC after: 3 days
* Un-#if 0 the printing of allocation failure counts for mbufs, clusters,rwatson2006-02-111-2/+0
| | | | | | and packets in netstat -m. MFC after: 3 days
* Make login audit-enabled, submitting audit records for the login and logoutwsalamon2006-02-045-3/+238
| | | | | | | | | events. The specifics of submitting the records is contained within login_audit.c. Document the auditing behavior in the man page. Obtained from: TrustedBSD Project, Apple Computer, Inc. Approved by: rwatson (mentor)
* Don't set time to current, if set to specific time failsache2006-01-311-0/+1
| | | | PR: 92577
* Tell the user exactly where the problem was.pjd2006-01-301-5/+5
|
* s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/marcel2006-01-281-1/+1
|
* - Mention that users need to be in the wheel group to `su - root' by ↵brd2006-01-281-3/+17
| | | | | | | | | | default, and how to change it. PR: docs/70616 Submitted by: Jilles Tjoelker <jilles at stack dot nl> Reviewed by: ru@ Approved by: ceri@ MFC after: 3 days
* make wall(1) work with pts.ume2006-01-271-2/+6
|
* Add AfriNIC as a RIR.jhay2006-01-232-6/+16
| | | | | | PR: 80421 Submitted by: Adrian Frith <adrian at frith.homelinux.org> MFC after: 6 days
* Add myself to the list (Ehi, I'm not the youngest!)matteo2006-01-201-0/+1
| | | | | Approved by: philip (mentor) MFC after: 3 days
* Add myself to the calendarvd2006-01-191-0/+1
| | | | Approved by: garga (mentor)
* Add myself.anray2006-01-191-0/+1
| | | | Feel free to donate me a beer :)
* Use the .Fx macro.simon2006-01-171-2/+7
| | | | MFC after: 3 days
* Skip format flags, when parsing ktr_desc.glebius2006-01-121-1/+7
|
* Correct insecure temporary file usage in texindex. [06:01]cperciva2006-01-111-12/+22
| | | | | | | | | | | | | | Correct insecure temporary file usage in ee. [06:02] Correct a race condition when setting file permissions, sanitize file names by default, and fix a buffer overflow when handling files larger than 4GB in cpio. [06:03] Fix an error in the handling of IP fragments in ipfw which can cause a kernel panic. [06:04] Security: FreeBSD-SA-06:01.texindex Security: FreeBSD-SA-06:02.ee Security: FreeBSD-SA-06:03.cpio Security: FreeBSD-SA-06:04.ipfw
* Add marker vnodes to ensure that all vnodes associated with the mount point aretegge2006-01-091-0/+1
| | | | | | iterated over when using MNT_VNODE_FOREACH. Reviewed by: truckman
* Document the TMPDIR environment variable.dds2006-01-051-1/+3
| | | | MFC after: 1 week
* Enable truss for powerpcgrehan2006-01-051-2/+1
|
* Add powerpc support for truss.grehan2006-01-053-0/+358
| | | | | Initial work by: Orlando Bassotto < orlando at break net > Modified by: grehan
* Fix the other su bug reintroduced two commits ago, namelybrian2006-01-031-1/+14
| | | | | | | | | | | | | $ su % kill -STOP $$ where su is executing (t)csh. csh's job handling is a little more special than that of (a)sh, bash and even zsh and blows up a little more spectacularly. This modification restores the original mucking about with the tty pgrp, but is careful to only do it when su (or su's child) is the foreground process. While I'm here, fix a STDERR_FILENO spelling as suggested by bde.
* Handle the case (that I just broke) where the following hangs:brian2006-01-021-1/+3
| | | | | | | $ su # kill -STOP $$ Pointed out by: David Xu <davidxu@freebsd.org>
* Remove broken code that mucks about with tcsetpgrp() -- even ifbrian2006-01-021-7/+0
| | | | | | | | | | | | | | | | | | | | su isn't the foreground process. Hopefully this won't break PAM, but I couldn't find any useful information about ache's theory that it will. Specifically, this change fixes the following: # sh # echo $$ # su - root -c id & # echo $$ The PID output changes as su seems to be kill -STOP'ing itself and catching the parent shell in the process. This is especially bad if you add a ``su - user -c command &'' to an rc script! Sponsored by: Sophos/Activestate Not objected to by: des
* Add a -s flag for the same functionality as strace. Introduce a Namebrian2006-01-0213-54/+91
| | | | | | | | | | | | | | | | type which is a String type that has no -s limitations applied to it. Change most Strings in the code to Names and add a few extra syscalls, namely munmap, read, rename and symlink. This was enough to facilitate following file descriptor allocations in the code more easily and getting a hint at what's being read/written from/to files. More syscalls should really be added. While here, fix an off-by-one bug in the buffer truncation code and add a fflush so that truss's output reflects the syscall that the program is stuck in. Sponsored by: Sophos/Activestate MFC after: 2 weeks
* NUL terminate buffer from fgetln(3). From fgsch@OpenBSD.jmallett2006-01-011-0/+1
|
* Whitespace after switch.jmallett2006-01-011-3/+3
| | | | Inspired by: OpenBSD
* Check the entire length of the current argument for the EOF string with -E,jmallett2005-12-311-1/+1
| | | | | | | | | | | | | but don't expect a proper ASCII string to exist right here right now, don't use strcmp(3) which checks for a NUL. As we're still building the argument up, the next character might be garbage. It would probably be just as safe to temporarily write a NUL there, but if we've reached the end of argument memory that might not be the best idea, I think. It's unclear. Doing it this way seems to meet the most with the original intent. PR: 85696 Prodded by: stefanf
* Only clear sb.st_size if it is clearly wrong or meaningless. This fixesdes2005-12-301-5/+5
| | | | | | | mirror mode. PR: bin/86940 MFC after: 2 weeks
* Add a FreeBSD-specific -S flag which controls the maximum size of an argumentjmallett2005-12-302-10/+34
| | | | having replacements done in it via -I.
* Handle maxsize==0 in such a way that we don't modify the string.jmallett2005-12-301-0/+12
|
* mkstemp(3) and friends use a combination of base 10 digits, alongcsjp2005-12-301-1/+1
| | | | | | with upper and lower case letters from the English alphabet. Change the number of possible file names mktemp will return from 26**6 to (10+26+26)**6 instead. This keeps things consistent with mkstemp(3)
* Reflect progress in process title.des2005-12-301-0/+4
| | | | | Submitted by: flz MFC after: 2 weeks
* Build gprof for powerpc now.grehan2005-12-291-2/+0
|
OpenPOWER on IntegriCloud