summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* - When building world WITHOUT_LIBPTHREAD, link libthr to libpthread.ru2006-11-261-5/+2
| | | | | - Don't build ngctl(8) and cached(8) if threading libs aren't built. - Fix various issues in a cached(8) makefile.
* Fix and extend the -j option to pkill/pgrep WRT the jailyar2006-11-232-9/+44
| | | | | | | | | | | | | | | | | | | | | wildcard specifications. Earlier the only wildcard syntax was "-j 0" for "any jail". There were at least two shortcomings in it: First, jail ID 0 was abused; it meant "no jail" in other utils, e.g., ps(1). Second, it was impossible to match processed not in jail, which could be useful to rc.d developers. Therefore a new syntax is introduced: "-j any" means any jail while "-j none" means out of jail. The old syntax is preserved for compatibility, but now it's deprecated because it's limited and confusing. Update the respective regression tests. While I'm here, make the tests more complex but sensitive: Start several processes, some in jail and some out of jail, so we can detect that only the right processes are killed by pkill or matched by pgrep. Reviewed by: gad, pjd MFC after: 1 week
* Fix the format specifier suitable for uintmax_t.ru2006-11-231-3/+3
|
* Oops, fix the format specifier to what was intended.ru2006-11-231-2/+1
|
* Bump document date.grog2006-11-231-1/+1
| | | | | Nitpicked by: ru MFC after: 1 week
* usage: Include the - in the x flag.grog2006-11-231-3/+3
| | | | | | | main: Make -x set the hexdump; there's no obvious reason to toggle it. Nitpicked by: ru MFC after: 1 week
* Add option -x to display output values in hex in addition to decimal.grog2006-11-232-9/+24
|
* o Check that -w width is not above maximum. Use DWIDTH instead ofmaxim2006-11-221-2/+2
| | | | | | | | hardcoded constant. Reported by: Gruzicki Wlodek on BugTraq Obtained from: NetBSD, OpenBSD MFC after: 1 week
* - Fix types of "struct vmmeter" members so they are unsigned.ru2006-11-202-23/+92
| | | | | | | - Fix overflow bugs in sysctl(8), systat(1), and vmstat(8) when printing values of "struct vmmeter" in kilobytes as they don't necessarily fit into 32 bits. (Fix sysctl(8) reporting of a total virtual memory; it's in pages too.)
* In revision 1.14 I broke the -4 and -6 options of sockstat(1).keramida2006-11-121-10/+5
| | | | | | | | | | | | | | | | | Using either one of the two would result in an empty protos[] array, and no sockets were actually listed: % sockstat -4 USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS % sockstat -6 USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS % Fix this bug by tweaking appropriately the logic of handling opt_4, opt_6, opt_u and protos_defined. Submitted by: des Pointy hat: keramida
* Add support for filtering sockets by protocol type. The defaultkeramida2006-11-112-14/+127
| | | | | | | | | | | | | | | | | | | behavior of sockstat(1) will still be to show "udp", "tcp" and "divert" protocols, but we can now provide a (comma-separated) list of protocols, as in: % sockstat -P tcp to list only TCP sockets, or we can filter more than one protocol by separating the protocol names with a comma: % sockstat -P tcp,udp Protocol names are parsed with getprotobyname(3), so any protocol whose name is listed in `/etc/protocols' should work fine. Submitted by: Josh Carroll <josh.carroll@psualum.com> Approved by: des
* Try to preserve ownership and permissions when replacing an existing file.des2006-11-101-0/+2
| | | | | | PR: bin/104702 Submitted by: Kevin Day <toasty@dragondata.com> MFC after: 1 week
* Don't always print a space character in show_stat(), since a spacebde2006-11-081-12/+23
| | | | | shouldn't be printed after the last column. This restores the formatting to 79 columns.
* Add my birthdate to the calendar.laszlof2006-11-071-0/+1
| | | | Approved by: flz (mentor)
* Second stage of unbreaking thr formatting of the NICE field: decode thebde2006-11-071-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | priority class and use this to: - print "-" instead of a garbage value for ithreads. Print "-" instead of the unused nice value for kthreads which are (mis)classified as PRI_TIMESHARE. For such threads, the nice value can be set to nonzero by root, but it is never used (at least by the 4bsd scheduler). For ithreads, we didn't even print the unused value. - print "i<priority>" and "r<priority>" instead of a biased "<priority>" for idletime and realtime threads, Here <priority> is the priority parameter to idprio/rtprio(1). Just add the prefix and remove the bias for now. <priority> has been stored indirectly in the kernel since 2001/02/12, and even the kernel cannot recover the original value in all cases. Here we need to handle more cases than pri_to_rtp(), but actually handle fewer cases, and end up printing garbage after a thread changes its current priority while in the kernel. - for idletime and realtime threads, if they are kthreads then add a prefix of "k" to the previous string. - for idletime and realtime threads, if they in the FIFO scheduling class then add a suffix of "F" to the previous string (if it fits; the other parts of the string are sure to fit unless <priority> is garbage).
* Style facelift.dds2006-11-061-57/+73
| | | | | | | | | - Reduce the number of global variables - Make global objects static - Use bool consistently - Sort getopt arguments and their processing - Add function comments - Change notlast != 0 into !last
* Add needed hyphens, note the KTRACE kernel option, bump doc date.trhodes2006-11-061-5/+9
| | | | | PR: 85186 Submitted by: garys
* Use a more sensible default of 1 or -1 when only the start anddds2006-11-062-2/+9
| | | | | | | | end values are specified. PR: bin/68981 Submitted by: Stefan `Sec` Zehl MFC after: 2 weeks
* Do What I Mean when the user asks for random integers or characters.dds2006-11-062-8/+50
| | | | | | | | | | | | | | Up to now jot would fail to generate the last character in the range or skew the integer distribution in a way that would generate the numbers in the range's limits with half the probability of the rest. This modification fixes the program, rather than documenting the strange behavior, as suggested in docs/54879. Also, correctly specify the range of random(3). PR: docs/54879 MFC after: 2 weeks
* Avoid negative array indices: an empty string can also be useddds2006-11-062-2/+3
| | | | to specify a default value.
* See also arc4randomdds2006-11-061-0/+1
| | | | | PR: docs/54879 MFC after: 2 weeks
* Restore jot's ability to use a seed for producing a deterministicdds2006-11-062-7/+18
| | | | | | | | | sequence of random numbers. This functionality was lost in revision 1.9 when the random number generator was switched to arc4random. PR: docs/54879 MFC after: 2 weeks
* Replace obscure aliases through pointers with plain variables.dds2006-11-061-11/+8
| | | | MFC after: 2 weeks
* Merge code in common cases.dds2006-11-061-29/+6
| | | | | Verified by: New regression tests in tools/regression/usr.bin/jot MFC after: 2 weeks
* Replace opaque numeric bit flag values with #defined identifiers.dds2006-11-061-29/+38
| | | | | | | While there, add some missing FALLTHROUGH comments. Verified with: cmp(1) on the executable MFC after: 2 weeks
* Cross-reference libmemstat(3), malloc(9), uma(9).rwatson2006-11-021-4/+10
|
* Fix "1 day ago", "yesterday" and similar relative-time phraseskientzle2006-11-021-2/+2
| | | | | | | | when parsing dates. PR: bin/104934: bug in some date handling of bsdtar Reported by: Herve Boulouis MFC after: 3 days
* Fix a bug converting a variable from the numeric type to a string.ru2006-10-252-1/+23
| | | | | PR: bin/104795 MFC after: 3 days
* Document the NM environment variable.ru2006-10-251-1/+9
|
* Bizet was only born once.grog2006-10-241-1/+0
|
* Backout previous change (SIGSYS related). The fix has been applied to thesobomax2006-10-241-2/+0
| | | | | | proper place. Pointed out by: rwatson
* Ignore SIGSYS when BSM is compiled in. Otherwise, attempt to invoke su onsobomax2006-10-241-0/+2
| | | | | | | | | | | | | | | | | system that don't have audit framefork compiled into kernel or ia32 binary on amd64 system will result in SIGSYS. There is one place in su.c itself where it tries to check for errno != ENOSYS, but it has been a nop since su does not catch SIGSYS anyway. There are few other places in libbsm, where attempt to invoke audit syscal would result in SIGSYS if no audit support is present in the kernel, so that the only reliable method for now is to disable SIGSYS completely in the case when BSM is compiled in. In the long run, both direct invocation of audit-related syscalls and libbsm should be made more intellegent to handle the case when BSM is not compiled into the kernel gracefully. MFC after: 3 days (provided re@ approval)
* - Document the default disk block usage unit.ru2006-10-213-21/+48
| | | | | | - Add option -h, human-readable output. PR: docs/53732
* Better handle the -F case:marcel2006-10-211-7/+5
| | | | | | | | | | | | | | | | | o When stat(2) fails (i.e. the file has been moved) there's no new file with the same name yet, so keep showing the file that's open. This yields the same behaviour as -f, for which we don't stat(2). o When a new file with the same name has been created (i.e stat(2) succeeds but the inode or device numbers differ from the opened file), show any new lines in the opened file (i.e. the old or rotated file) before reopening the new file. These changes fix the observed behaviour that tail(1) doesn't show the very last lines of the rotated (log) files. PR: bin/101979 Tested by: Jos Backus <jos@catnook.com> MFC after: 2 months
* The vm.zone sysctl has gone; zone stats are now supplied by libmemstat(3).ru2006-10-211-4/+1
|
* - Add comma after REQUESTS field missed in previous commit.ru2006-10-211-2/+2
| | | | - Widen some columns; make width of header columns less cryptic.
* Print the number of allocation failures in UMA zones.glebius2006-10-211-4/+4
| | | | PR: kern/102940
* Document that jot(1), rs(1), and lam(1) first appeared in 4.2BSD.cperciva2006-10-203-0/+15
| | | | MFC after: 1 month
* Document that unexpand(1)'s -a and -t options are exclusive.ru2006-10-132-4/+3
| | | | PR: docs/85063
* - Document all character classes our tr(1) supports. [1]ru2006-10-131-2/+14
| | | | | | | | | - Mention that some of them are POSIX extensions. [2] PR: docs/85062 [1] Submitted by: Toby Peterson [1] Obtained from: wctype(3) [2] MFC after: 3 days
* At least one argument is required.ru2006-10-121-0/+3
|
* Saint George replaced Saint Edward as the patron Saint of Englandceri2006-10-121-4/+4
| | | | | | | | | | | | | somewhere around 1348. The revision log doesn't seem to go back quite that far, but I assume that the update to this file was forgotten in the celebrations. While, here, note which countries the other UK patron Saints hold patronage of. Sources include http://www.novareinna.com/festive/georgeday.html and http://www.newadvent.org/cathen/
* Memory utilization subscreen in "vmstat" display lists numbers in KB,ru2006-10-121-6/+6
| | | | | | | | | | not in number of pages. PR: docs/71690 Submitted by: Jan Srzednicki (A patch is only partially merged, the rest was already fixed by bde@ in rev. 1.51.)
* Don't go beyond the provided string when parsing the `\' character.ru2006-10-091-2/+4
| | | | | | PR: bin/99985 Submitted by: Nate Eldredge MFC after: 3 days
* Update the list of POSIX extensions.ceri2006-10-081-3/+5
| | | | | | PR: docs/103859 Submitted by: shaun MFC after: 1 week
* Add a missing new line at the end of the australian calendar file toflz2006-10-061-1/+1
| | | | | | | | | | suppress and error message. PR: conf/99490 Submitted by: Shaun Branden <shaun@pcuse.com> Approved by: cperciva (mentor) MFC after: 1 day Sponsored by: FreeBSD Test-Bugathon
* Adding my birthdayxride2006-10-011-0/+1
| | | | Approved by: tmclaugh
* o Remove an obsoleted (and commented out) entry.maxim2006-10-011-1/+0
| | | | | PR: conf/85143 Submitted by: Helge Oldach
* o Strip eol w/spaces.maxim2006-10-011-2/+2
|
* o Add a Gedenktag.maxim2006-10-011-0/+1
| | | | | | PR: conf/85143 Submitted by: Helge Oldach MFC after: 1 weeks
OpenPOWER on IntegriCloud