aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/w
Commit message (Collapse)AuthorAgeFilesLines
* w(1) uses strftime %b with to print the abbreviated month nameAndrey A. Chernov2008-08-201-1/+2
| | | | | | | | | | | | | if a user logged in more than a week ago. This may contain multibyte characters (e.g. when using UTF-8). This string is then aligned on byte-length rathern than char-length, resulting in misalignment and unfinished multibyte characters. PR: 126657 Submitted by: Johan van Selst <johans@stack.nl> Notes: svn path=/head/; revision=181922
* Fix markup.Ruslan Ermilov2006-12-141-7/+10
| | | | Notes: svn path=/head/; revision=165226
* Use sysctlbynamePoul-Henning Kamp2006-05-111-6/+1
| | | | Notes: svn path=/head/; revision=158444
* Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec)Andre Oppermann2005-10-171-9/+3
| | | | | | | | | instead of subtracting 'bootime' from 'now'. Sponsored by: TCP/IP Optimization Fundraise 2005 Notes: svn path=/head/; revision=151417
* Use the ki_udata field that was recently-added to kinfo_proc, instead ofGarance A Drosehn2005-06-041-1/+1
| | | | | | | stealing ki_spare[0] to hold a pointer. Notes: svn path=/head/; revision=146983
* Expand *n't contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141846
* Sort sections.Ruslan Ermilov2005-01-181-13/+13
| | | | Notes: svn path=/head/; revision=140420
* Include <sys/proc.h> instead of depending on namespace pollution inBruce Evans2004-04-141-11/+9
| | | | | | | | | | | | | | <sys/user.h> for the definition of TDF_SINTR. Fixed anachronous spelling of TDF_SINTR in a comment Demangled VCS ids. There were 2 misplaced copies of $FreeBSD$ and of the include before it. The vendor id infrastructure was edited. Fixed the only other remaining style bug since rev.1.1 (expansion of struct member names made a line too long). Notes: svn path=/head/; revision=128231
* Do not print the result of strftime() in case of failure, the content isPhilippe Charnier2003-09-071-5/+3
| | | | | | | | | indeterminate in such a case. The correct value for 2nd argument is sizeof(buf). Do not NUL-terminate the result string, strftime() will do it for us. Notes: svn path=/head/; revision=119854
* utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime().Peter Wemm2003-06-281-1/+4
| | | | Notes: svn path=/head/; revision=116998
* Fix warning when calling w(1) when logged in via xdm/kdm. This isSean Chittenden2002-08-231-4/+3
| | | | | | | | | | really a problem with utmp/wtmp, but takes the same approach as who(1). Reviewed by: knu (mentor), mini, silence on -audit Approved by: knu (mentor), mini Notes: svn path=/head/; revision=102300
* ANSI style function declarations.Juli Mallett2002-06-073-19/+8
| | | | Notes: svn path=/head/; revision=97981
* Replace /kernel with /boot/kernel/kernel.Josef Karthauser2002-05-092-3/+3
| | | | | | | | PR: docs/37757 Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org> Notes: svn path=/head/; revision=96247
* remove __PWarner Losh2002-03-222-8/+8
| | | | Notes: svn path=/head/; revision=92922
* Back out part of rev 1.51. The lesser impact fix is to just removeDavid E. O'Brien2002-03-071-11/+10
| | | | | | | the unused global var. Notes: svn path=/head/; revision=91837
* WARNS=2 fix, use __FBSDID() and sort includes.Mark Murray2001-12-113-44/+46
| | | | | | | WARNS=2 not added to Makefile as it is to become default. Notes: svn path=/head/; revision=87674
* Compensate for "Compensate for header dethreading" by backing it out.Bruce Evans2001-10-102-2/+0
| | | | Notes: svn path=/head/; revision=84768
* Fixing a bug that causes very short uptimes (less than one minute) toCrist J. Clark2001-09-221-1/+2
| | | | | | | | | | | be 30 seconds off. (Thanks to Vladimir B.Grebenschikov <vova@express.ru> for the PR and ru for a more elegant fix.) PR: bin/30680 Approved by: ru Notes: svn path=/head/; revision=83815
* KSE Milestone 2Julian Elischer2001-09-121-2/+2
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* When -n is specified, don't attempt to turn hostnames found in utmpBrian Somers2001-07-263-43/+42
| | | | | | | | | | | | | | | | into addresses as we have no idea what address family they belong to. When -n is not specified, resolve IPv6 as well as IPv4 addresses found in the host field of utmp. Use realhostname_sa() to resolve addresses (the old code was wrong). Rename ``x'' to ``x_suffix'' to avoid confusion. Hard code the host column width to 16 (against the imminent increase of UT_HOSTSIZE in utmp.h). Notes: svn path=/head/; revision=80407
* Remove whitespace at EOL.Dima Dorfman2001-07-152-2/+2
| | | | Notes: svn path=/head/; revision=79755
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-102-2/+2
| | | | Notes: svn path=/head/; revision=79535
* Call kvm_close() before exit for consistency.Poul-Henning Kamp2001-05-281-1/+4
| | | | | | | | PR: 24654 Submitted by: Daniel Hemmerich zartik@yahoo.com Notes: svn path=/head/; revision=77367
* Fix the error buffer passed to kvm_openfiles to have a correct lengthThomas Moestl2001-05-261-1/+2
| | | | | | | | | of _POSIX2_LINE_MAX. MFC after: 1 week Notes: svn path=/head/; revision=77212
* Compensate for header dethreading.Mark Murray2001-05-012-0/+2
| | | | Notes: svn path=/head/; revision=76169
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-1/+1
| | | | Notes: svn path=/head/; revision=74848
* Fix width for printing timeAndrey A. Chernov2001-03-211-5/+4
| | | | Notes: svn path=/head/; revision=74603
* Preserve comma as separator when it is not equal to radix characterAndrey A. Chernov2001-03-031-2/+7
| | | | Notes: svn path=/head/; revision=73385
* Don't use "," as load avg. separator because it can be precision point in someAndrey A. Chernov2001-03-031-1/+1
| | | | | | | locales, so leads to confusion Notes: svn path=/head/; revision=73368
* Oops, remove tabs sneaked in wrong placeAndrey A. Chernov2001-03-021-2/+2
| | | | Notes: svn path=/head/; revision=73366
* Use AM/PM time only when available in localeAndrey A. Chernov2001-03-023-7/+10
| | | | Notes: svn path=/head/; revision=73365
* Catch up to proc flag changes.John Baldwin2001-01-241-3/+3
| | | | Notes: svn path=/head/; revision=71592
* Hostnames are case-insensitiveBrian Somers2000-12-221-1/+2
| | | | Notes: svn path=/head/; revision=70272
* If the utmp login time is greater than the tty atime, use it to calculateBrian Somers2000-12-211-1/+7
| | | | | | | | | | | | the idle time instead of the atime. This makes entries for people that have logged in but done nothing else show up correctly. Reviewed by: markk@knigma.org Notes: svn path=/head/; revision=70242
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-191-1/+1
| | | | Notes: svn path=/head/; revision=70197
* Change the proc information returned from the kernel so that itKirk McKusick2000-12-123-28/+30
| | | | | | | | | | | | | | | no longer contains kernel specific data structures, but rather only scalar values and structures that are already part of the kernel/user interface, specifically rusage and rtprio. It no longer contains proc, session, pcred, ucred, procsig, vmspace, pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If any of these changed in size, ps, w, fstat, gcore, systat, and top would all stop working. The new structure has over 200 bytes of unassigned space for future values to be added, yet is nearly 100 bytes smaller per entry than the structure that it replaced. Notes: svn path=/head/; revision=69896
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-1/+1
| | | | Notes: svn path=/head/; revision=68963
* Use the same technique as ps(1) to avoid the need for setgid. (ie: usePeter Wemm1999-11-172-5/+9
| | | | | | | | /dev/null as the default kernel and /dev/mem filenames, but still allow the usual overrides) Notes: svn path=/head/; revision=53279
* Fix cosmetic bug in time display. Current day logins are now displayedDavid Nugent1999-11-101-4/+9
| | | | | | | | | | as plain time as originally intended, instead of displaying DayHH times when the login time happens to be prior the GMT - TZ difference. (Only noticable on systems operating east of GMT/UTC). Local times are now used to determine the day. Notes: svn path=/head/; revision=53073
* $Id$ -> $FreeBSD$Peter Wemm1999-08-284-4/+4
| | | | Notes: svn path=/head/; revision=50477
* New w ability: you can list multiple users on the command line and it willBrian Feldman1999-07-282-51/+52
| | | | | | | | | | | match with all of them, rather than only supporting a single user. PR: 11121 Kinda submitted by: James Howard <howardjp@byzantine.student.umd.edu> Reviewed by: DES Notes: svn path=/head/; revision=49177
* Add $Id$, to make it simpler for members of the translation teams toNik Clayton1999-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde Notes: svn path=/head/; revision=48792
* Clean up some ambiguous nested if/elses.Bill Fumerola1999-07-041-2/+3
| | | | Notes: svn path=/head/; revision=48566
* fix -n with 16-chars hostnames, modified patch from PRAndrey A. Chernov1999-04-221-4/+7
| | | | | | | | PR: 11286 Submitted by: Hans Huebner <hans@chaosradio.berlin.ccc.de> Notes: svn path=/head/; revision=45946
* Get things right for tty names of length UT_LINESIZE.Brian Somers1999-03-311-16/+15
| | | | | | | | | Cosmetic: Don't shadow the `p' variable. Remove two unused variables. PR: 3638 Notes: svn path=/head/; revision=45201
* Fix the annoying bug introduced in rev 1.18 that caused each line to bePeter Wemm1999-01-102-13/+15
| | | | | | | | | | | | | | | | | | | one character shorter than the previous in a stairstep fashion when long idle times were involved. A couple of nits: - spelling/typo fix. - some of the easier style(9) fixes where it was bothering me. - Handle 100+ days idle time (ha!). Probably the right thing to do is to do a snprintf into a buffer and strlen the result rather than doing hackery on magic numbers. XXX the wide (and mostly unused) username and tty columns annoy me since it it could be used for more useful information for the command. We should actually count the largest username and tty and adjust like 'ls -l' does. Notes: svn path=/head/; revision=42481
* No __profname bozoness, no strstr() bozoness... test argv[0] againstMatthew Dillon1998-12-241-4/+21
| | | | | | | "uptime" the right way. Sheesh. Notes: svn path=/head/; revision=42055
* Since argv is in scope, use argv[0] instead of __progname.Steve Price1998-12-241-2/+2
| | | | | | | Suggested by: bde Notes: svn path=/head/; revision=42050
* Do a better job of determining if we were called as uptime(1).Steve Price1998-11-091-5/+2
| | | | | | | PR: 8593 Notes: svn path=/head/; revision=41022
* Remove unused strvisx.Warner Losh1998-06-091-10/+2
| | | | Notes: svn path=/head/; revision=36793