History log of /freebsd-11-stable/usr.bin/systat/pigs.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 331722 29-Mar-2018 eadler

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)


# 330897 14-Mar-2018 eadler

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from: pfg


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 287633 10-Sep-2015 delphij

- Avoid accessing window properties directly, instead, use accessors.
This should be no-op for now, but allows the code to work if we
move to NCURSES_OPAQUE.
- Use calloc() instead of malloc+bzero.

MFC after: 2 weeks


# 231011 05-Feb-2012 ed

Whitespace fixes.

- Remove redundant empty lines.
- Replace ^L by \014. This allows you to safely cat/grep/etc this file
without causing confusion.


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 175387 16-Jan-2008 delphij

ANSIfy and remove register.

Resulting binary verified with strip(1)+md5(1).


# 172207 17-Sep-2007 jeff

- Move all of the PS_ flags into either p_flag or td_flags.
- p_sflag was mostly protected by PROC_LOCK rather than the PROC_SLOCK or
previously the sched_lock. These bugs have existed for some time.
- Allow swapout to try each thread in a process individually and then
swapin the whole process if any of these fail. This allows us to move
most scheduler related swap flags into td_flags.
- Keep ki_sflag for backwards compat but change all in source tools to
use the new and more correct location of P_INMEM.

Reported by: pho
Reviewed by: attilio, kib
Approved by: re (kensmith)


# 172143 11-Sep-2007 ru

- Stop computing %CPU for the imaginary idle process; we now
have real idle processes for that.

- Fix the display on SMP by not scaling the sum of %CPU down
to 1. Instead, display raw data as computed by the kernel,
like in top(1).

Reviewed by: bde
Approved by: re (bmah)
MFC after: 1 week


# 164689 27-Nov-2006 yar

Consistently mark percentage scales as such.

PR: bin/101975
MFC after: 3 days


# 158160 30-Apr-2006 bde

Show the load average in the tcp display (it was already shown, perhaps
not very usefully, in all other displays). This was the original point
of the PR.

Move the load average up by 2 so that it starts in row 0 for all windows
(2 lines above it were wasted for all other windows except vmstat).
Move everything below it up by 2 or 3 (3 for icmp and icmp6 which had
an extra blank line due from not compensating for the foot-shooting in
note (3); only ip and ip6 compensated). Reduce the magic numbers related
to this.

Notes by the submitter:
%%%
1. All the subwin() calls are identical using #define MAINWIN_ROW 3
(systat.h).
2. The load average is at the top of the window.
3. Each display starts on the fourth line. I made changes to those
displays that shifted the start line (i.e., icmp). This entailed a
lot of changes within the comments at the top of those displays.
4. For ip6, I shifted the "Input next-header histogram" column down one
row to separate it from "IPv6 Output". I raised "bad scope packets"
and "address selection failed" up one row to stay with "IPv6 Input"
(valid?). They were down one row to probably line up at the bottom,
but I think they should stick with their fellow items in a column.
5. I condensed ifstat a bit. It had a lot of empty rows.
%%%

Submitted by: Se=E1n Farley <sean-freebsd at farley dot org>
PR: bin/81874


# 145800 02-May-2005 delphij

Include systat.h for cmdtab, to make gcc4 happy.


# 128230 14-Apr-2004 bde

Include <sys/proc.h> for the definition of PS_INMEM instead of
depending on namespace pollution in <sys/user.h>.

Reduced nearby include messes.


# 111002 16-Feb-2003 phk

Remove #include <sys/dkstat.h>


# 94610 13-Apr-2002 dwmalone

Remove previously unneeded and now incorrect cast of user_from_uid()
to a char *.
Fix up vendor ID.


# 92922 21-Mar-2002 imp

remove __P


# 87715 11-Dec-2001 markm

WARNS=2 fixes with NO_WERROR set, as there are some header issues
with namelists. use __FBSDID().


# 84768 10-Oct-2001 bde

Compensate for "Compensate for header dethreading" by backing it out.


# 76169 01-May-2001 markm

Compensate for header dethreading.


# 71588 24-Jan-2001 jhb

Catch up to new proc flags.


# 69896 12-Dec-2000 mckusick

Change the proc information returned from the kernel so that it
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.


# 69493 01-Dec-2000 gallatin

fix another int/long type mismatch. This one was causing pigs to
die with an fpe on alpha because fscale wasn't properly initted


# 69142 25-Nov-2000 rwatson

o make systat/pigs.c use syctl() to retrieve cp_time, fscale, and ccpu
instead of using kmem.


# 50635 30-Aug-1999 peter

systat is way too comfortable with curses internals...


# 37455 06-Jul-1998 bde

Fixed type mismatches which were fatal when sizeof(long) > sizeof(int).


# 36789 09-Jun-1998 imp

o Use snprintf rather than sprintf
o Add more checks for buffer overflows
o Use snprintf rather than strcat/cpy and have better checks for max
length exceeded.

Most of these changes are not exploitable buffer overruns, but it never
hurts to be safe.

Inspired by and obtained from: OpenBSD


# 31226 18-Nov-1997 jdp

Fix: too many arguments for format in call to sprintf().


# 18486 24-Sep-1996 bde

Really eliminated includes of the "temporary" backwards compatibility
header <sys/dir.h> in applications. My previous sweep didn't find the
places that included it without needing it.


# 11914 29-Oct-1995 phk

#include <sys/user.h>


# 8874 30-May-1995 rgrimes

Remove trailing whitespace.


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources