aboutsummaryrefslogtreecommitdiff
path: root/utils/vmstat.c
Commit message (Collapse)AuthorAgeFilesLines
* Use default pager MiG stubs from Hurd instead of gnumachFlavio Cruz2023-04-071-1/+2
| | | | | | | | | | | | Hurd code relies on gnumach default_pager.defs headers when making calls using the default pager RPC. Those stubs were checked in back in the 90s and are essentially unused because gnumach does not implement or use that interface. Instead use the Hurd interface directly. This is safe since the Hurd stubs are a super set of the gnumach stubs. Later, we won't need to install the gnumach stubs anymore through glibc. Message-Id: <ZC5WqPKfCCiE8D29@jupiter.tail36e24.ts.net>
* vmstat: Support 64bit memory sizeSamuel Thibault2023-01-011-2/+2
|
* fix compiler warnings in hurd/utilsFlavio Cruz2015-12-291-7/+15
| | | | | | | | | | | | | | | | | | utils: Fix compiler warnings. * utils/rpcscan.c (setup_extract_target): Remove name variable. * utils/rpcscan.c (setup_extract_target): Fix bad initializer. * utils/rpctrace.c (new_send_wrapper, wrap_all_threads, wrap_new_thread, wrap_new_task, traced_spawn): Fix format strings. * utils/rpctrace.c (trace_and_forward): Cast to unsigned int. * utils/rpctrace.c (trace_and_forward): Use memcmp instead of pointer dereferencing to compare structures. * utils/rpctrace.c (wrap_all_threads): Cast to vm_address_t. * utils/rpctrace.c (main): Fix bad initializer. * utils/shd.c (run): Initialize save0. * utils/vminfo.c: Fix format strings. * utils/vmstat.c: Remove PSEP macro and expand the code. * utils/w.c (add_utmp_procs): Remove unused pos variable.
* utils/vmstat: fix integer overflowJustus Winter2015-05-231-1/+2
| | | | | | | Previously, the `vmstat' utility would stop displaying the memory object hit ratio after some time due to an integer overflow. * utils/vmstat.c (get_memobj_hit_ratio): Fix integer overflow.
* Revert "utils/vmstat: Use gnumach.defs from gnumach"Samuel Thibault2013-05-131-1/+1
| | | | This reverts commit 202339d49461ce6dcffd3a5b3690537daea5ef38.
* utils/vmstat: Use gnumach.defs from gnumachDavid Michael2013-05-051-1/+1
| | | | | | | | | | The gnumach installation provides the include file mach/gnumach.defs instead of mach/gnumach.h. This runs the defs file through MIG and builds the result for vmstat. * utils/vmstat.c: Replace <mach/gnumach.h> with "gnumach_U.h". * utils/Makefile (vmstat): Add rule to depend on gnumach_U.o. * Makeconf (mach_defs_names): Add gnumach.
* Report VM cache statisticsRichard Braun2013-01-141-15/+29
| | | | | | | | * utils/vmstat.c: Include <mach/gnumach.h> and <mach/vm_cache_statistics.h>. (vm_state): New `cache_stats` member. (vm_state_refresh): Call vm_cache_statistics. (_F): Adjust offset. (fields): Add entries for new statistics and adjust member names.
* Be less aggressive about switching to bigger unitsOlaf Buddenhagen2011-08-221-1/+1
| | | | * utils/vmstat.c (print_val): Switch size unit at 10000 instead of 1024.
* fix common misspellingsJonathan Neuschäfer2011-08-201-1/+1
| | | | | | * Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
* 2002-06-16 James A. Morrison <ja2morri@uwaterloo.ca>Marcus Brinkmann2003-08-031-4/+4
| | | | | * vmstat.c (vm_state_refresh): Use memset instead of bzero. (main): Likewise.
* 2002-06-14 Roland McGrath <roland@frob.com>Roland McGrath2002-06-251-9/+24
| | | | | | * vmstat.c (ensure_def_pager_info): If get_privileged_ports fails with EPERM, try to open /servers/default-pager instead. * Makefile (INSTALL-vmstat-ops): Variable removed (no setuid).
* 2002-05-28 Roland McGrath <roland@frob.com>Roland McGrath2002-05-281-1/+1
| | | | | | | | | | | | | | | | * pids.c (add_fn_pids): unsigned -> size_t * w.c (add_utmp_procs): Likewise. * login.c (add_canonical_host): Likewise. * ps.c (main): Likewise. * login.c (add_entry, main): Likewise. * settrans.c (main): int -> size_t * showtrans.c (main): Likewise. * fsysopts.c (main): Likewise. * vmstat.c (main): Use int for FWIDTHS. * ping.c (main): size_t -> socklen_t * fakeauth.c (S_auth_getids, S_auth_makeauth, S_auth_server_authenticate): u_int -> size_t * showtrans.c (main): Cast field width/precision args to int.
* 2002-05-03 Roland McGrath <roland@frob.com>Roland McGrath2002-05-041-5/+4
| | | | * vmstat.c (print_val): Use %lld printf format for val_t.
* 1999-11-18 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-11-181-38/+24
| | | | | | | | | | * vmstat.c (BADVAL): New macro. (SWAP_FIELD): New macro. This properly takes care of exciting C type promotion rules to properly indicate errors. (get_swap_size, get_swap_free, get_swap_active): Replace definitions with ones using SWAP_FIELD macro. (ensure_def_pager_info): Give an error message for lack of a default pager; check only once.
* (ensure_def_pager_info):Miles Bader1997-07-151-5/+9
| | | | Don't report any errors if there's no default pager.
* (main):Miles Bader1997-07-141-13/+23
| | | | Don't print fields we cannot get.
* (argp_program_version): Make const.Miles Bader1997-02-201-2/+2
|
* (options):Miles Bader1996-10-241-7/+4
| | | | | | | Remove header for run-time supplied fields. (main): And add it back here as a child header. Replace PARENTS with CHILDREN, which uses the new argp_child structure.
* (val_width):Miles Bader1996-10-041-45/+106
| | | | | | | | | | | | | | | | New function. (name_to_option): Correct test for malloc failure. (main): Calculate verbose output widths differently. (main: FWIDTH): New macro. (fields): Rename `cache *' fields to `memobj *', and reword doc strings. Add `max' field. (get_memobj_hit_ratio): Renamed from get_cache_hit_ratio. (VAL_MAX_MEM, VAL_MAX_SWAP, K, M, G): New macros.
* (struct field):Miles Bader1996-10-021-32/+62
| | | | | | | | | | Remove desc field, add doc field. (fields): Initialize doc field, and not desc. (name_to_option): New function. (main): Rearrange use of name, doc, and desc fields in struct field.
* *** empty log message ***Thomas Bushnell1996-09-051-1/+2
|
* (doc): Add program description.Miles Bader1996-08-271-1/+2
|
* (val_t): Make `long long'.Miles Bader1996-07-291-3/+5
|
* (enum val_display_type):Miles Bader1996-07-261-59/+44
| | | | | | | | | | | | | | | | Add `PAGESZ'. `SIZES' -> `SIZE'; all uses updated. Remove BYTES, PAGES, and KBYTES. (main): Variable user_disp_type removed. Variable size_units added. Add SIZE_UNITS macro, remove FDISPTYPE macro. Calls to print_val now use new PVAL macro. (get_vmstats_field): Just test against a type of SIZE, instead of using val_display_type_is_size. (fields): disp_type of "pagesize" and "swap-pagesize" changed to PAGESZ. (val_display_type_is_size): Function removed. (struct field): `disp_type' field -> `type'; all used updated. (print_val): Add TYPE & SIZE_UNITS arguments; remove HOW & PSIZE.
* (options, main): -k/--kilobytes, -v/--pages, and -b/--bytes options added.Miles Bader1996-07-261-83/+354
| | | | | | | | | | | | | | | | | | | | (fields): New struct members initialized. `size', `cache-hit-ratio', `swap-size', `swap-active', `swap-free', and `swap-pagesize' added. (val_t, enum val_display_type, enum field_change_type): New types. (val_display_type_is_size, print_val, vm_state_refresh, vm_state_get_field, get_vmstats_field, get_size, ensure_def_pager_info, get_swap_size, get_swap_free, get_swap_page_size, get_swap_active): New functions. (struct field): CHANGE_TYPE, DISP_TYPE, STANDARD, and COMPUTE fields added. CUM field removed. (struct vm_state): New type. (main): Changed greatly to use vm_state type & functions, use print_val, and support CONST display types nicely. (argp_program_version): Version changed to 1.1.
* (argp_program_version): New variable.Miles Bader1996-07-061-0/+3
| | | | <hurd.h>: New include.
* (parse_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.Miles Bader1996-05-111-2/+3
|
* (main): Pass new arg to argp_parse.Miles Bader1996-03-231-1/+1
|
* (main, args_doc, doc): Add repeat mode.Miles Bader1996-02-051-52/+122
| | | | (FVAL): New macro.
* (main):Miles Bader1996-02-051-17/+17
| | | | | | | Slightly decrease the space for numbers in the verbose output format. Twiddle the widths of the terse fields to make sure there's room for typical numbers. (fields, options): Make const.
* Initial revisionMiles Bader1996-02-031-0/+210