Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use sysctlbyname | phk | 2006-05-11 | 1 | -6/+1 |
| | |||||
* | Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec) | andre | 2005-10-17 | 1 | -9/+3 |
| | | | | | | instead of subtracting 'bootime' from 'now'. Sponsored by: TCP/IP Optimization Fundraise 2005 | ||||
* | Use the ki_udata field that was recently-added to kinfo_proc, instead of | gad | 2005-06-04 | 1 | -1/+1 |
| | | | | stealing ki_spare[0] to hold a pointer. | ||||
* | Do not print the result of strftime() in case of failure, the content is | charnier | 2003-09-07 | 1 | -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. | ||||
* | utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime(). | peter | 2003-06-28 | 1 | -1/+4 |
| | |||||
* | Fix warning when calling w(1) when logged in via xdm/kdm. This is | seanc | 2002-08-23 | 1 | -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 | ||||
* | ANSI style function declarations. | jmallett | 2002-06-07 | 1 | -13/+5 |
| | |||||
* | remove __P | imp | 2002-03-22 | 1 | -5/+5 |
| | |||||
* | Back out part of rev 1.51. The lesser impact fix is to just remove | obrien | 2002-03-07 | 1 | -11/+10 |
| | | | | the unused global var. | ||||
* | WARNS=2 fix, use __FBSDID() and sort includes. | markm | 2001-12-11 | 1 | -33/+31 |
| | | | | WARNS=2 not added to Makefile as it is to become default. | ||||
* | Compensate for "Compensate for header dethreading" by backing it out. | bde | 2001-10-10 | 1 | -1/+0 |
| | |||||
* | Fixing a bug that causes very short uptimes (less than one minute) to | cjc | 2001-09-22 | 1 | -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 | ||||
* | When -n is specified, don't attempt to turn hostnames found in utmp | brian | 2001-07-26 | 1 | -39/+38 |
| | | | | | | | | | | | | | 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). | ||||
* | Call kvm_close() before exit for consistency. | phk | 2001-05-28 | 1 | -1/+4 |
| | | | | | PR: 24654 Submitted by: Daniel Hemmerich zartik@yahoo.com | ||||
* | Fix the error buffer passed to kvm_openfiles to have a correct length | tmm | 2001-05-26 | 1 | -1/+2 |
| | | | | | | of _POSIX2_LINE_MAX. MFC after: 1 week | ||||
* | Compensate for header dethreading. | markm | 2001-05-01 | 1 | -0/+1 |
| | |||||
* | Preserve comma as separator when it is not equal to radix character | ache | 2001-03-03 | 1 | -2/+7 |
| | |||||
* | Don't use "," as load avg. separator because it can be precision point in some | ache | 2001-03-03 | 1 | -1/+1 |
| | | | | locales, so leads to confusion | ||||
* | Use AM/PM time only when available in locale | ache | 2001-03-02 | 1 | -2/+6 |
| | |||||
* | Hostnames are case-insensitive | brian | 2000-12-22 | 1 | -1/+2 |
| | |||||
* | If the utmp login time is greater than the tty atime, use it to calculate | brian | 2000-12-21 | 1 | -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 | ||||
* | Change the proc information returned from the kernel so that it | mckusick | 2000-12-12 | 1 | -13/+9 |
| | | | | | | | | | | | | 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. | ||||
* | Use the same technique as ps(1) to avoid the need for setgid. (ie: use | peter | 1999-11-17 | 1 | -3/+6 |
| | | | | | /dev/null as the default kernel and /dev/mem filenames, but still allow the usual overrides) | ||||
* | $Id$ -> $FreeBSD$ | peter | 1999-08-28 | 1 | -1/+1 |
| | |||||
* | New w ability: you can list multiple users on the command line and it will | green | 1999-07-28 | 1 | -47/+48 |
| | | | | | | | | 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 | ||||
* | Clean up some ambiguous nested if/elses. | billf | 1999-07-04 | 1 | -2/+3 |
| | |||||
* | fix -n with 16-chars hostnames, modified patch from PR | ache | 1999-04-22 | 1 | -4/+7 |
| | | | | | PR: 11286 Submitted by: Hans Huebner <hans@chaosradio.berlin.ccc.de> | ||||
* | Get things right for tty names of length UT_LINESIZE. | brian | 1999-03-31 | 1 | -16/+15 |
| | | | | | | Cosmetic: Don't shadow the `p' variable. Remove two unused variables. PR: 3638 | ||||
* | Fix the annoying bug introduced in rev 1.18 that caused each line to be | peter | 1999-01-10 | 1 | -10/+9 |
| | | | | | | | | | | | | | | | | 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. | ||||
* | No __profname bozoness, no strstr() bozoness... test argv[0] against | dillon | 1998-12-24 | 1 | -4/+21 |
| | | | | "uptime" the right way. Sheesh. | ||||
* | Since argv is in scope, use argv[0] instead of __progname. | steve | 1998-12-24 | 1 | -2/+2 |
| | | | | Suggested by: bde | ||||
* | Do a better job of determining if we were called as uptime(1). | steve | 1998-11-09 | 1 | -5/+2 |
| | | | | PR: 8593 | ||||
* | Remove unused strvisx. | imp | 1998-06-09 | 1 | -10/+2 |
| | |||||
* | Cosmetic fix. Compute header field widths from UT_{HOST,LINE,NAME}SIZE | jkoshy | 1998-05-21 | 1 | -4/+13 |
| | | | | | | instead of hardcoding header line. PR: 6325 | ||||
* | Allow `w' to treat a corrupted "utmp" as a non fatal error. | jkoshy | 1998-05-14 | 1 | -4/+7 |
| | | | | PR: bin/2832 | ||||
* | Like most Unices FreeBSD should have a larger tty field at least | phk | 1998-04-19 | 1 | -3/+4 |
| | | | | | | | | | | | as large as UT_LINESIZE (/usr/include/utmp.h). If the tty name is logged with this size why isn't the w command reporting it? (We should probably report the tty/cua prefix then as well ? /phk) PR: 4187 Reviewed by: phk Submitted by: Jorge M. Goncalves <ee96199@tom.fe.up.pt> | ||||
* | If uptime < 1 min print in in secs otherwise we got confusing message | ache | 1997-10-13 | 1 | -10/+12 |
| | | | | "up 1 user" | ||||
* | Document newly added -d option and fix usage string | ache | 1997-09-12 | 1 | -2/+2 |
| | |||||
* | The "-d" option dumps out the entire process list on a per controlling | ache | 1997-09-12 | 1 | -11/+40 |
| | | | | | tty basis, instead of just the top level process. Submitted by: terry | ||||
* | Typo in usage(). Err -> errx when testing allocations. | charnier | 1997-08-25 | 1 | -5/+10 |
| | |||||
* | compare return value from getopt against -1 rather than EOF, per the final | imp | 1997-03-29 | 1 | -1/+1 |
| | | | | posix standard on the topic. | ||||
* | Made sure the string formated by strftime() is properly | yokota | 1997-03-07 | 1 | -1/+2 |
| | | | | | | | | null-terminated. Should go to RELENG_2_1 and RELENG_2_2. Reviewed by guido@freebsd.org. | ||||
* | Reduce the command field width by one when idle time is > 9 days, to | danny | 1997-02-11 | 1 | -2/+4 |
| | | | | | | eliminate unsightly blank line. Possibly a 2.2 candidate. | ||||
* | Increase username field to reflect utmp changes | ache | 1996-12-05 | 1 | -1/+1 |
| | |||||
* | Do not print herror message, if w -n gethostname failed to be 100% | ache | 1996-06-17 | 1 | -2/+1 |
| | | | | | compatible with any program Suggested by: peter | ||||
* | Fix xterm/screen/(any program using just :xxx form) compatibility | ache | 1996-06-17 | 1 | -1/+1 |
| | |||||
* | Don't try convert "-" to numeric form for -n option | ache | 1996-06-17 | 1 | -1/+1 |
| | |||||
* | Fix w -n to really show numeric addresses, close PR 402 | ache | 1996-06-17 | 1 | -0/+11 |
| | | | | Partially submitted by: henrich@msu.edu (Charles Henrich) | ||||
* | Drop privileges if not using standard namelist or kernel file. | pst | 1996-05-30 | 1 | -0/+7 |
| | | | | Submitted by: smpatel (Sujal Patel) | ||||
* | Change locale to LC_ALL, there is no bitmask | ache | 1995-10-26 | 1 | -1/+1 |
| |