Wed Oct 9 14:20:08 1996 Miles Bader * spec.c (ps_nominal_string): New function. (ps_emit_args, ps_emit_string): Use `-' for empty values. (specs): Use ps_nominal_string for `Args' and `Arg0' fields. Tue Oct 8 13:21:55 1996 Miles Bader * procstat.c (proc_stat_set_flags): Get rid of INAPP macro. Fix preconditions of PSTAT_SUSPEND_COUNT. * spec.c (ps_emit_seconds, ps_emit_minutes): Interpret PS_FMT_FIELD_COLON_MOD flag to mean `print zero as "-"'. * procstat.c (set_procinfo_flags): Set bits in PS->inapp as appropriate. (PSTAT_PROCINFO_THREAD, PSTAT_PROCINFO_TASK): New macro. (PSTAT_PROCINFO_TASK_THREAD_DEP): Renamed from PSTAT_PROCINFO_THREAD. (PSTAT_PROCINFO): Redefined. (count_threads): Use PSTAT_PROCINFO_TASK_THREAD_DEP. (proc_stat_set_flags): Don't use NEED macro for PSTAT_STATE. Mon Oct 7 17:40:21 1996 Miles Bader * ps.h (struct ps_fmt): Add ERROR field, and rename INVAL to INAPP. * fmt.c (_fmt_create): Initialize INAPP & ERROR fields. (ps_fmt_clone): Propagate them. (ps_fmt_write_proc_stat): Use them. * procstat.c (proc_stat_set_flags): Add NEED & INAPP macros, and use them to set the inapp field as well as the failed field. (_proc_stat_create): Initialize INAPP field. (proc_stat_thread_create): Initialize FAILED and INAPP fields. Sun Oct 6 18:42:52 1996 Miles Bader * ps.h (struct ps): Add INAPP field. * spec.c (ps_emit_wait): Correct mapping of init ports. Mon Sep 30 23:15:42 1996 Miles Bader * write.c (noise_write, noise_len): Correctly calculate the length of a character printed using an octal escape. Thu Sep 12 16:23:47 1996 Thomas Bushnell, n/BSG * Makefile (HURDLIBS): New variable. (libps.so): Delete special depedency. Fri Aug 2 15:12:19 1996 Miles Bader * procstat.c (set_procinfo_flags): Pass HAVE to count_threads. (count_threads): Take new argument HAVE, and use different thread counting method depending on whether we have thread detail info. Thu Jul 18 18:54:07 1996 Miles Bader * tty.c (ps_tty_abbrevs): Add an entry for /dev/comX -> cX. Thu Jul 18 00:45:25 1996 Michael I. Bushnell, p/BSG * Makefile (LCLHDRS): Remove ps_msg.h and ps_term.h. Wed Jul 10 22:49:39 1996 Miles Bader * procstat.c (set_procinfo_flags): Don't use fake "*" wait value if there's no msgport. Mon Jul 8 21:39:58 1996 Miles Bader * write.c (_ps_stream_write_field): If a field is truncatable (MAX_WIDTH >= 0), take some of our spacing deficit out of it. Tue Jul 2 14:43:39 1996 Miles Bader * procstat.c (proc_stat_set_flags): Pass PS->task_events_info to task_info, not its address. Thu Jun 27 18:32:27 1996 Michael I. Bushnell, p/BSG * Makefile (LCLHDRS): Add common.h. Thu Jun 27 12:33:41 1996 Miles Bader * ps.h (struct ps_fmt): Add SRC_LEN field. (proc_stat_list_clone, ps_fmt_clone): New declarations. * fmt.c (_fmt_create): Set NEW_FMT->src_len. Use strdup. (ps_fmt_clone): New function. * proclist.c (proc_stat_list_clone): New function. Mon Jun 3 10:17:43 1996 Miles Bader * spec.c (ps_emit_wait): Never truncate what we write. * user.c (ps_user_passwd): Check return value of install_passwd correctly (it's an error_t). * ps.h (struct proc_stat): Add PROC_INFO_VM_ALLOCED, THREAD_WAITS_VM_ALLOCED, and ARGS_VM_ALLOCED fields, * procstat.c (merge_procinfo) Take a struct proc_stat as an arg, not all the individual fields. Correctly set OLD_PI_HDR. Correctly calculate REALLY_NEED. (set_procinfo_flags): Use new calling merge_procinfo calling convention. (_proc_stat_free): Use explicit VM_ALLOCED flag for MFREEMEM. (proc_stat_set_flags): Try mallocing a buffer for PS->args. Move second call to set_procinfo_flags after msgport suppress test. Add TEST_MSGPORT_FLAGS variable, & use it. Be more picky about when we call set_procinfo_flags. Sat Jun 1 11:18:58 1996 Miles Bader * procstat.c (set_procinfo_flags): New function. (proc_stat_set_flags): Use it, to get msgport validity testing right. (merge_procinfo): Take and return HAVE instead of using a reference parameter. Clean up malloced storage if we get an error. * spec.c (struct ps_fmt_spec_block): New type. (specs_add_alias): Use a linked list of ps_fmt_spec_blocks instead of reallocing a vector of specs. (ps_fmt_specs_find): Change searching accordingly. * ps.h (struct ps_fmt_specs): The EXPANSIONS field now points to a struct ps_fmt_spec_block. Delete EXPANSIONS_ALLOCED field. * procstat.c (merge_procinfo): Correctly test for malloc failure. Fri May 31 18:36:18 1996 Miles Bader * procstat.c (MFREEMEM): New macro combining MFREEM & MFREEVM. (MFREEM, MFREEVM): Macros deleted. (merge_procinfo): Do mem allocation more efficiently and correctly. (fetch_procinfo): Do conversion for PI_SIZE from/to units of sizeof (int), so no one else has to deal with it. (PROCINFO_MALLOC_SIZE, WAITS_MALLOC_SIZE): New macros. * procstat.c (proc_stat_set_flags): After fetching number of threads to guess whether we need wait info, put it in PS->num_threads. (merge_procinfo): Avoid vm_allocing a procinfo buffer each time if we can help it. Correctly reflect newly fetched info. (PSTAT_PROCINFO_MERGE, PSTAT_PROCINFO_REFETCH): New macros. Wed May 29 11:31:31 1996 Miles Bader * procstat.c (MP_MGET): Only disable msgport on timeout. (get_thread_wait): Decrement N in loop. * ps.h: Renumber PSTAT_ values to remove dup. * procstat.c (merge_procinfo): Don't die if WAITS == 0. (summarize_thread_waits): Correctly advance NEXT_WAIT. Skip threads marked `itimer'. (proc_stat_set_flags): Consider processes with less than 4 threads to be candidates for a meaningful process wait status. (get_thread_wait): Use strnlen instead of memchr. (PSTAT_PROCINFO): Typo: PSTAT_THREAD_WAIT --> PSTAT_THREAD_WAITS. (PSTAT_USES_MSGPORT): Add PSTAT_THREAD_WAIT. Tue May 28 16:36:17 1996 Miles Bader * fmt.c (_fmt_create): Make NAME termination work for posix-mode. * fmt.c (ps_fmt_write_proc_stat): Call the output function correctly. (_fmt_create): Get FIELD's precision, not width, from its spec. Fri May 24 13:33:14 1996 Michael I. Bushnell, p/BSG * procstat.c (fetch_procinfo): Always turn on PSTAT_PROC_INFO if proc_getprocinfo returns successfully. (merge_procinfo): Update *HAVE with PSTAT_PROC_INFO from REALLY_HAVE here. Wed May 22 19:55:04 1996 Miles Bader * fmt.c (_fmt_create): Increment SRC when reading modifiers. Recognize '^' modifier. Sun May 12 13:33:16 1996 Miles Bader * procstat.c (PSTAT_PROCINFO, PSTAT_PROCINFO_THREAD): Add PSTAT_THREAD_WAITS. (proc_stat_set_flags): Be more careful about when we fetch thread_wait information, and synthesize a process-summary thread_wait value for lots of threads. (summarize_thread_waits): Only give a real summary if there's but a single user thread. (fetch_procinfo): Use PSTAT_THREAD_WAITS instead of PSTAT_THREAD_WAIT. * ps.h (PSTAT_THREAD_WAITS): New macro. * procstat.c (merge_procinfo, fetch_procinfo): Change HAVE to be an input/output parameter. (proc_stat_set_flags): Change accordingly. * procstat.c (get_thread_wait): Correctly advance WAIT. * spec.c (specs): Give runtime specs 2 fraction digits by default. Thu May 9 17:03:37 1996 Michael I. Bushnell, p/BSG * procstat.c (fetch_procinfo): Pass a reference to PI_FLAGS in call to fetch_procinfo. Mon May 6 16:28:54 1996 Miles Bader * proclist.c (proc_stat_list_spec_nominal): Take a spec again. * ps.h (proc_stat_list_spec_nominal): Change FIELD arg to SPEC. * user.c (install_passwd): New function. (ps_user_passwd): Use it. (ps_user_uname_create, ps_user_passwd_create): New functions. * ps.h (ps_user_uname_create, ps_user_passwd_create): New declarations. (ps_fmt_set_output_width): New declaration. * spec.c (ps_emit_user_name): New function. * ps.h (struct ps_fmt_spec): Remove keep field, add flags field. (struct ps_fmt_field): Remove at_mod, colon_mod, & keep fields, add flags field. (PS_FMT_FIELD_AT_MOD, PS_FMT_FIELD_COLON_MOD, PS_FMT_FIELD_KEEP, PS_FMT_FIELD_UPCASE_TITLE): New macros. * spec.c (specs): Initialize flags field, not keep field. (specs_add_alias): Pass on flags field. * fmt.c (_fmt_create): Use flags fields, and implement global flags, and add upcase flag (^). (ps_fmt_write_titles): Implement PS_FMT_FIELD_UPCASE_TITLE. * proclist.c (proc_stat_list_spec_nominal): Use flags field, not keep field. * ps.h (struct proc_stat): Remove exec_flags field. (PSTAT_EXEC_FLAGS): Macro removed. * procstat.c (add_preconditions, proc_stat_set_flags): Remove references to exec_flags. Sun May 5 00:22:01 1996 Miles Bader * proclist.c (proc_stat_list_spec_nominal): Take a field, not a spec. If the field has the keep flag set, don't nominalize it. * fmt.c (_fmt_create): Change syntax of fields. Add support for precision and `@', `:', `?', & `!' modifiers. Add POSIX argument, and support for posix-style format strings. When using the field name as the title, use the defn, not the user's. (ps_fmt_squash): Call FN with the field, not the field's spec. (ps_fmt_squash_flags): Appropiately modify the function we use. (ps_fmt_create, ps_fmt_creation_error): Add POSIX argument. * ps.h (struct ps_fmt_spec): Add precision & keep fields. Change args to OUTPUT_FN. (struct ps_fmt_field): Add precision, keep, at_mod, & colon_mod fields. (proc_stat_list_spec_nominal): Change SPEC arg to FIELD. (ps_fmt_squash): Call FN on the field, not the spec. (ps_fmt_create, ps_fmt_creation_error): Add POSIX arg. * spec.c (specs): Add precision & keep fields. (FG): New macro. (ps_emit_*): Take FIELD argument instead of WIDTH. Thu May 2 00:12:19 1996 Miles Bader * ps.h (ps_fmt_creation_error): New declaration. Tue Apr 30 18:54:57 1996 Miles Bader * fmt.c (_fmt_create): New function (was ps_fmt_create). (ps_fmt_create): Call _fmt_create. (ps_fmt_creation_error): New function. * spec.c (ps_emit_past_time): Implement. Mon Apr 29 12:59:08 1996 Miles Bader * spec.c (ps_emit_seconds): Use new args to fmt_seconds. (ps_emit_minutes): Use new args to fmt_minutes. Tue Apr 23 13:38:06 1996 Miles Bader * ps.h (PSTAT_STATE_P_ATTRS): Fix names of individual flags. * spec.c (state_shadows): If a process has no parent don't show various process attributes (that are likely to be noise). Thu Apr 11 18:05:16 1996 Michael I. Bushnell, p/BSG * Makefile (MIGCOMUFLAGS): Delete variable. * spec.c (ps_emit_past_time): Return zero. Wed Mar 27 15:19:40 1996 Miles Bader * Makefile (msg-MIGUFLAGS, term-MIGUFLAGS): Add a user prefix of `ps_'. * procstat.c (proc_stat_set_flags): Use new prefix. Include "ps_msg.h". * tty.c (ps_tty_name): Use new prefix. Include "ps_term.h". Mon Mar 25 11:35:48 1996 Miles Bader * ...just about everything...: Get rid of mega typedefs, and just use structure pointers like other hurd libraries. Other misc cleanups. * ps.h (struct ps_fmt_specs): Add EXPANSIONS & EXPANSIONS_ALLOCED. * spec.c (ps_fmt_specs_find): Use new alias expansion method. (specv_find, specs_add_alias): New functions. Mon Mar 11 16:27:14 1996 Miles Bader * write.c (noise_write): Keep track of amount printed correctly. Sat Mar 9 15:52:55 1996 Miles Bader * write.c (iscntl): New macro. (noise_write, noise_len): Correctly handle MAX < 0 case. (noise_write): Use new arguments for flush. (flush): Moved to file scope. Remove END argument and use NEW - 1. (noise_write): Make T of type unsigned char * so that chars with the high bit set print correctly. Thu Mar 7 19:08:00 1996 Miles Bader * write.c (iscntl): New macro. (noise_write, noise_len, flush): New functions. (ps_stream_write, _ps_stream_write_field): Use noise functions. Thu Feb 15 00:02:53 1996 Miles Bader * spec.c (specs): Right-align the TTY column. Wed Feb 14 17:49:17 1996 Miles Bader * write.c (ps_stream_write): Don't screw up on negative spaces. * proclist.c (proc_stat_list_add_pids): Add and support new return parameter PROC_STATS. (proc_stat_list_add_pid): Add and support new return parameter PS. (proc_stat_list_add_fn_pids, proc_stat_list_add_id_fn_pids, proc_stat_list_add_all, proc_stat_list_add_login_coll, proc_stat_list_add_session, proc_stat_list_add_pgrp): Add and support new return parameters PROC_STATS & NUM_PROCS. * ps.h (proc_stat_list_add_pids, proc_stat_list_add_pid, proc_stat_list_add_all, proc_stat_list_add_login_coll, proc_stat_list_add_session, proc_stat_list_add_pgrp): Update declarations. * filters.c (ps_alive_filter): New variable. (ps_alive_p): New function. * ps.h (ps_alive_filter): New declaration. Mon Feb 12 14:34:22 1996 Miles Bader * spec.c (ps_emit_wait): For rpcs, put the port first. Fri Feb 9 15:55:35 1996 Miles Bader * ps.h (struct proc_stat): Add thread_wait, thread_waits, & thread_waits_len fields. (PSTAT_THREAD_WAIT): Renamed from PSTAT_THREAD_RPC. (proc_stat_thread_wait): New macro. (ps_stream_write_trunc_field): New declaration. * procstat.c (fetch_procinfo, merge_procinfo): Return wait strings. (summarize_thread_waits): Return both wait and rpc info. (get_thread_wait): New function. (proc_stat_set_flags): Support finding wait info. Change occurances of PSTAT_THREAD_RPC to PSTAT_THREAD_WAIT. * spec.c (specs): Change `Rpc' entry to `Wait'. (ps_emit_wait): New function. (ps_emit_string, ps_emit_string0): Use ps_stream_write_trunc_field. (ps_get_wait): Renamed from ps_get_rpc; calling convention changed. (ps_wait_getter): Renamed from ps_rpc_getter & contents changed accord. (get_syscall_name, get_rpc_name): New stub functions. * write.c (ps_stream_write_field): Call _ps_stream_write_field. (ps_stream_write_trunc_field): New function. (_ps_stream_write_field): New function, from ps_stream_write_field. Sat Feb 3 22:22:01 1996 Miles Bader * spec.c (specs, state_shadows, ps_pid_getter, ps_thread_index_getter, ps_owner_getter, ps_owner_uid_getter, ps_ppid_getter, ps_pgrp_getter, ps_session_getter, ps_login_col_getter, ps_num_threads_getter, ps_args_getter, ps_state_getter, ps_rpc_getter, ps_vsize_getter, ps_rsize_getter, ps_cur_priority_getter, ps_base_priority_getter, ps_max_priority_getter, ps_usr_time_getter, ps_sys_time_getter, ps_tot_time_getter, ps_rmem_frac_getter, ps_cpu_frac_getter, ps_sleep_getter, ps_susp_count_getter, ps_proc_susp_count_getter, ps_thread_susp_count_getter, ps_tty_getter, ps_page_faults_getter, ps_cow_faults_getter, ps_pageins_getter, ps_msgs_sent_getter, ps_msgs_rcvd_getter, ps_zero_fills_getter): Make const. * ps.h (ps_getter_t, ps_filter_t, struct ps_filter, ps_not_leader_filter, ps_ctty_filter, ps_unorphaned_filter, ps_parent_filter, ps_std_fmt_specs): Make const. Mon Jan 15 16:32:31 1996 Miles Bader * procstat.c (summarize_thread_basic_info): If there are any running threads, then only average priority from them. Sun Jan 14 00:24:55 1996 Miles Bader * spec.c (state_shadows): Don't reflect a suspended thread in the process state display if any thread isn't suspended. Sun Dec 24 14:24:52 1995 Miles Bader * Makefile (installhdrsubdir): New macro (put ps.h in <>, not ). Sat Dec 23 21:50:58 1995 Miles Bader * fmt.c (ps_fmt_set_output_width): New function. Fri Dec 22 12:21:04 1995 Miles Bader * ps.h (struct ps_user_hooks): New structure. (PSTAT_HOOK, PSTAT_USER_BASE, PSTAT_USER_MASK): New macros. (struct ps_context): Add USER_HOOKS field. * procstat.c (_proc_stat_free): Call user cleanup hook. (proc_stat_set_flags, add_preconditions): Deal with user bits. * context.c (ps_context_create): Initialize USER_HOOKS field. Thu Dec 21 12:04:24 1995 Miles Bader * spec.c (ps_get_usr_time, ps_get_sys_time, ps_get_tot_time): Return a struct timeval instead of mach time_value_t. (ps_cmp_times): New function. (ps_emit_seconds, ps_emit_minutes): Use timefmt functions. (append_fraction, sprint_long_time, ps_emit_nice_seconds): Deleted. Include . * ps.h (struct ps_fmt_spec): Add TITLE field. Renamed DEFAULT_WIDTH field to WIDTH, and move to after TITLE. (ps_fmt_spec_width): Renamed from ps_fmt_spec_default_width().. (ps_fmt_spec_title): New macro. (struct ps_fmt): Add INVAL field. (ps_fmt_inval): New macro. * spec.c (specs): Rearrange to use new field layout. * fmt.c (ps_fmt_create): Use the new spec fields. (ps_fmt_write_proc_stat): Support new inval field in FMT. * spec.c (ps_fmt_specs_find): Renamed from find_ps_fmt_spec; now uses a struct ps_fmt_specs instead of an array of specs. (specs): Renamed from ps_std_fmt_specs; (ps_std_fmt_specs): Now of type struct ps_fmt_specs, pointing to specs. * ps.h (ps_fmt_specs_t): New typedef. (struct ps_fmt_specs): New structure. (ps_std_fmt_specs): Now of type struct ps_fmt_specs. (ps_fmt_specs_find): Renamed from find_ps_fmt_spec; now uses a struct ps_fmt_specs instead of an array of specs. (ps_fmt_create): Now takes a ps_fmt_specs_t structure instead of an array of specs. * fmt.c (ps_fmt_create): Now takes a ps_fmt_specs_t instead of an array of specs. Also fixup call to ps_fmt_specs_find(). * ps.h (struct proc_stat): Add failed and hook fields. * procstat.c (proc_stat_set_flags): Support the failed field. (_proc_stat_create): Initialize the failed and hook fields. Wed Dec 20 12:49:24 1995 Miles Bader * spec.c (ps_emit_nz_int): Write `-' when the value is 0, rather than mangling the output. Sun Dec 17 03:09:31 1995 Miles Bader * procstat.c (proc_stat_set_flags): If there's no owner, set the uid to -1 (and the owner to null), instead of failing. * spec.c (ps_emit_uid): Use an int uid, and emit "-" for none. (ps_emit_uname, ps_cmp_uids, ps_cmp_unames, ps_nominal_user): Handle NULL users. * filters.c (ps_not_leader_p): Renamed from ps_not_sess_leader_p. (ps_not_leader_filter): Renamed from ps_not_sess_leader_filter. (ps_unorphaned_p): Include login leaders as well as session leaders. * ps.h (ps_not_leader_filter): Renamed from ps_not_sess_leader_filter. Sat Dec 16 23:42:27 1995 Miles Bader * ps.h (proc_stat_owner_uid): New macro. (PSTAT_OWNER_UID): New macro. (struct proc_stat): Add owner_uid field. * procstat.c (proc_stat_set_flags): Add support for PROC_OWNER_UID. (add_preconditions): Add preconditions for owner_uid (& owner). * spec.c (ps_owner_uid_getter): New variable. (ps_get_owner_uid, ps_nominal_uid): New functions. (ps_std_fmt_specs): Make "UID" use owner_uid rather than owner. (own_uid): New variable (was function local). * filters.c (ps_own_filter): Depend on PSTAT_OWNER_UID. (ps_own_p): Account for there being no uid. Thu Nov 16 12:51:34 1995 Miles Bader * write.c (ps_stream_write_field): Trim spaces from BUF. Wed Nov 15 18:55:26 1995 Miles Bader * ps.h (ps_fmt_write_titles, ps_fmt_write_proc_stat, proc_stat_list_fmt, ps_emit_int, ps_emit_nz_int, ps_emit_priority, ps_emit_percent, ps_emit_num_blocks, ps_emit_nice_int, ps_emit_nice_seconds, ps_emit_seconds, ps_emit_uid, ps_emit_uname, ps_emit_string0, ps_emit_string, ps_emit_tty_name, ps_emit_state, ps_stream_write, ps_stream_space, ps_stream_pad, ps_stream_newline, ps_stream_write_field, ps_stream_write_int_field): Use new STREAM parameter instead of old one and count. (ps_stream_write): Renamed from ps_write_string. (ps_stream_space): Renamed from ps_write_spaces. (ps_stream_pad): Renamed from ps_write_padding. (ps_stream_write_field): Renamed from ps_write_field. (ps_stream_write_int_field): Renamed from ps_write_int_field. (ps_stream_newline): New declaration. * fmt.c (ps_fmt_write_titles, ps_fmt_write_proc_stat): Use new write function names. Use new STREAM parameter instead of old one and count. * proclist.c (proc_stat_list_fmt): Ditto. * spec.c (ps_emit_int, ps_emit_nz_int, ps_emit_priority, ps_emit_percent, ps_emit_num_blocks, ps_emit_nice_int, ps_emit_nice_seconds, ps_emit_seconds, ps_emit_uid, ps_emit_uname, ps_emit_string0, ps_emit_string, ps_emit_tty_name, ps_emit_state): Ditto. (ps_emit_seconds): Remove leading spaces from what we print. * write.c (ps_stream_write): Renamed from ps_write_string. (ps_stream_space): Renamed from ps_write_spaces. (ps_stream_pad): Renamed from ps_write_padding. (ps_stream_write_field): Renamed from ps_write_field. (ps_stream_write_int_field): Renamed from ps_write_int_field. (ps_stream_write, ps_stream_space, ps_stream_pad, ps_stream_newline, ps_stream_write_field, ps_stream_write_int_field): Use new STREAM parameter instead of old one and count. Use new function names. (ps_stream_write, ps_stream_space): Support negative spaces. (ps_stream_newline): New function. (ps_stream_pad, ps_stream_write_field): Use negative spaces. Tue Nov 7 17:43:48 1995 Miles Bader * spec.c (ps_base_priority_getter, ps_cur_priority_getter, ps_get_base_priority, ps_get_cur_priority): Get this info using PSTAT_THREAD_BASIC instead of PSTAT_THREAD_SCHED. * procstat.c (summarize_thread_basic_info): Summarize available priority info too. (summarize_thread_sched_info): Do max_ & depress_priority too. * procstat.c (proc_stat_set_flags): Initialize the proc_info and proc_info_size fields if they've never been set before. Always update proc_getprocinfo fields, even if we already had them. (add_preconditions): Correct preconditions for PSTAT_STATE. (PSTAT_TEST_MSGPORT): Renamed from SHOULD_SUPPRESS_MSGPORT_FLAGS. (PSTAT_USES_MSGPORT): New macro. (SUPPRESS_MSGPORT_FLAGS): Use PSTAT_USES_MSGPORT, not PSTAT_MSGPORT. (proc_stat_set_flags): Use PSTAT_TEST_MSGPORT. (merge_procinfo): Only copy old task info if we actually had it. (proc_stat_set_flags): Don't unnecessarily grab procinfo stuff. Tue Oct 31 14:03:53 1995 Miles Bader * spec.c (ps_rpc_getter): New variable. (ps_get_rpc): New function. (ps_std_fmt_specs): Add "RPC" entry. (ps_emit_nz_int): New function. * ps.h (PSTAT_STATE_P_LOGINLDR, PSTAT_STATE_P_WAIT, PSTAT_STATE_P_GETMSG): New flags. * procstat.c (add_preconditions): Don't require PSTAT_EXEC_FLAGS for getting the state anymore (but do require PSTAT_{TASK,THREAD}_BASIC). (proc_stat_state_tags): Update to reflect new flags. (proc_stat_set_flags): Set new flags. * procstat.c (PSTAT_PROCINFO, PSTAT_PROCINFO_THREAD): New macros. (fetch_procinfo, merge_procinfo): New functions. (SHOULD_SUPPRESS_MSGPORT_FLAGS): Change to use more accurate flags. (should_suppress_msgport): Use new fields. (summarize_thread_basic_info, summarize_thread_sched_info, summarize_thread_states, summarize_thread_rpcs, count_threads): New functions. (proc_stat_set_flags): Support the new division of PSTAT_INFO into individual flags, and support getting thread information by using the thread's origin proc_stat. (_proc_stat_free): Free the thread_basic_info and thread_sched_info fields if necessary. (proc_stat_thread_create): Don't require that the source process have thread information around; it will be fetched later if necessary. * spec.c (ps_ppid_getter, ps_pgrp_getter, ps_session_getter, ps_login_col_getter): Use PSTAT_PROC_INFO, not PSTAT_INFO. (ps_get_ppid, ps_get_pgrp, ps_get_session, ps_get_login_col): Use proc_stat_proc_info, not proc_stat_info. (ps_vsize_getter, ps_rsize_getter, ps_rmem_frac_getter, ps_proc_susp_count_getter): Use PSTAT_TASK_BASIC, not PSTAT_INFO. (ps_get_vsize, ps_get_rsize, ps_get_rmem_frac, ps_get_proc_susp_count): Use proc_stat_task_basic_info, not proc_stat_info. (ps_cur_priority_getter, ps_base_priority_getter, ps_max_priority_getter): Use PSTAT_THREAD_SCHED, not PSTAT_THREAD_INFO. (ps_usr_time_getter, ps_sys_time_getter, ps_tot_time_getter, ps_cpu_frac_getter, ps_sleep_getter): Use PSTAT_THREAD_BASIC, not PSTAT_THREAD_INFO. * filters.c (ps_own_filter): Use PSTAT_PROC_INFO, not PSTAT_INFO. (ps_own_p): Use proc_stat_proc_info, not proc_stat_info. * ps.h (proc_stat_num_threads): Use the num_threads field. (proc_stat_thread_sched_info, proc_stat_thread_basic_info): Don't take the address, now that the fields used are pointers themselves. (proc_stat_thread_rpc, proc_stat_task_basic_info): New macros. (proc_stat_proc_info): Renamed from proc_stat_info. (PSTAT_PROC_INFO): Renamed from PSTAT_INFO. (PSTAT_TASK_BASIC, PSTAT_THREAD_BASIC, PSTAT_THREAD_SCHED, PSTAT_THREAD_RPC): New macros. (struct proc_stat): info & info_len --> proc_info & proc_info_len. Add the num_threads, task_basic_info, and thread_rpc fields. thread_basic_info & thread_sched_info are now pointers. Mon Oct 9 14:57:48 1995 Roland McGrath * Makefile: Specify shared library dependencies. Fri Aug 25 18:55:51 1995 Miles Bader * ps.h (ps_std_fmt_specs): Declare extern. Wed Aug 23 15:04:51 1995 Miles Bader * Makefile (OBJS): Just put the migs stubs directly in here. (REMHDRS, MIGSTUBS): Removed. Sat Aug 19 11:49:06 1995 Miles Bader * procstat.c (proc_stat_set_flags): Actually set the P_STOP bit. Fri Aug 18 16:43:41 1995 Miles Bader * ps.h (PSTAT_STATE_*): All proc state flags reorganized and renamed to PSTAT_STATE_P_* for process-global bits, and PSTAT_STATE_T_* for per-thread bits. * procstat.c (proc_stat_state_tags): Reordered to reflect the new ordering of the state bits. (thread_state, proc_stat_set_flags): Use the new state bits. * spec.c (ps_emit_state): Rearrange things to reflect the new state bits. (state_shadows): New variable. (ps_emit_state): Use the state_shadows list to turn off some states. * filters.c (ps_not_sess_leader_p, ps_unorphaned_p, ps_parent_p): Use the new state bits. Sat Jul 8 13:34:20 1995 Miles Bader * tty.c (ps_tty_short_name): That assignment around which extra parents were put was actually supposed to be a test! Make it so... Thu Jul 6 22:25:20 1995 Michael I Bushnell * tty.c (ps_tty_short_name): Put extra parens around assignment inside if test. Thu Jul 6 15:36:04 1995 Miles Bader * Makefile: Remove include dependencies. Thu Jun 29 15:29:05 1995 Miles Bader * Makefile (REMHDRS): New variable. ($(OBJS)): depend on ../libihash/ihash.h. * ps.h: Include hurd/ihash.h instead of ihash.h. Wed May 31 13:09:04 1995 Miles Bader * fmt.c (ps_fmt_create): Don't mutate the format spec name in the fmt_spec list we're passed just to get correctly capitalized titles. Instead, do things correctly by making enough room to store our own version of the title string, which we can do with what we please. * ps.h (ps_own_filter, ps_not_sess_leader_filter, ps_ctty_filter, ps_unorphaned_filter, ps_parent_filter): Declare these as extern so that the linker will bring in the initialized version (it's not doing so otherwise may be a bug). Thu May 4 20:01:32 1995 Miles Bader * procstat.c (proc_stat_set_flags): If a msg port call times out, disable use of that msg port. * Makefile (MIGSTUBS, term-MIGUFLAGS, msg-MIGUFLAGS): Compile our own msg & term user stubs to add msg timeouts. Wed May 3 11:32:52 1995 Miles Bader * proclist.c (proc_stat_list_for_each): New function for iterating over proc_stat_lists. (proc_stat_list_spec_nominal): New function for deciding if a particular spec is always nominal. * ps.h: Add entries for proc_stat_list_for_each and proc_stat_list_spec_nominal. * fmt.c (ps_fmt_squash, ps_fmt_squash_flags): Recalculate the set of ps flags needed by the fmt in ps_fmt_squash. Tue May 2 12:25:57 1995 Miles Bader * ps.h (ps_fmt_squash): Rename to ps_fmt_squash_flags. * fmt.c (ps_fmt_squash, ps_fmt_squash_flags): Rename ps_fmt_squash to ps_fmt_squash_flags, moving most of the guts into a new more general ps_fmt_squash, which is usable for other things than flags. * ps.h (struct ps_fmt_spec): Add the nominal_fn field, which will be used to decide whether values are `unexciting'. * spec.c (ps_std_fmt_specs): Add values for the nominal_fn field. (ps_nominal_zint, ps_nominal_user, ps_nominal_pri, ps_nominal_nth): Possible nominal funs. * ps.h (struct proc_stat): Add the suspend_count field, along with PSTAT_SUSPEND_COUNT, and proc_stat_suspend_count(ps). * procstat.c (proc_stat_set_flags, add_preconditions): Add support for the suspend_count field. * spec.c (ps_std_fmt_specs): Add the Susp (task/thread suspend count), PSusp (task suspend count), and TSusp (thread suspend count) output specs. * procstat.c (add_preconditions): A new function that calculates inter- flag dependencies; code moved here from from proc_stat_set_flags. (should_suppress_msgport): A new function that returns true when there's some condition indicating that we shouldn't use a process's msg port. (proc_stat_set_flags): Avoid using a process's msg port when it may be unusable. * ps.h (PSTAT_STATE_FORKED): A new flag to replace PSTAT_STATE_EXECED; we want to the flags to mark exceptional conditions, and this is rarer. * procstat.c (proc_stat_set_flags): Set PSTAT_STATE_FORKED instead of PSTAT_STATE_EXECED. (proc_stat_state_tags): Change the user state letter to "f" from "e". Sun Apr 23 15:38:39 1995 Miles Bader * Makefile: Set libname. Fri Apr 7 11:12:15 1995 Miles Bader * proclist.c (proc_stat_list_sort1): Always keep threads after their process when sorting! * spec.c (ps_emit_state): If a process is marked as stopped, then don't mention sleeping or idle threads' status (as that's presumably the signal thread). * ps.h: Add decls for proc_stat_list_add_pgrp & ps_tty_short_name. * proclist.c (proc_stat_list_add_all, proc_stat_list_add_login_coll, proc_stat_list_add_session): Move most of the functionality into proc_stat_list_add_[id_]fn_pids. (proc_stat_list_add_pgrp): New function, adds pids for a pgrp. * tty.c (ps_tty_short_name): New function; functionality used to be in spec.c (ps_tty_create, ps_tty_free): Add short_name fields. * spec.c (ps_emit_tty_name): Move guts into into ps_tty_short_name. * Just about everything: tighten up types used (i.e., don't use int for everything). Wed Apr 5 22:42:24 1995 Miles Bader * spec.c (ps_std_fmt_specs): Add the `Arg0' spec, which is the same as `Args', but only prints the first one. Change MsgsIn and MsgsOut to MsgIn and MsgOut. Tue Apr 4 20:13:55 1995 Miles Bader * ps.h: Add the PSTAT_NO_MSGPORT flag, which when set disables any use of the process's message port. * procstat.c (proc_stat_set_flags): If PSTAT_NO_MSGPORT is set, don't use the msg port. Wed Mar 29 15:36:43 1995 Miles Bader * procstat.c (proc_stat_set_flags): Don't barf if a process has zero threads. Tue Mar 28 10:33:08 1995 Miles Bader * ps.h: Add the exec_flags field to the proc_stat structure, and add PSTAT_STATE_TRACED. * procstat.c (proc_stat_set_flags): Add support for the exec_flags field, and make the state bits calculation use that to support the PSTAT_STATE_TRACED bit. Mon Mar 20 20:51:51 1995 Michael I Bushnell * user.c (ps_user_passwd) [COUNT, COPY]: Use `if' statement. * spec.c (ps_emit_num_blocks): Use int format for int arg. (sprint_frac_value): Likewise. * write.c (ps_write_int_field): Likewise. * host.c (ps_host_basic_info): Cast third arg to host_info. (ps_host_sched_info): Likewise. (ps_host_load_info): Likewise. * filters.c: Include . * context.c: Include . * tty.c: Likewise. * spec.c: Include . * procstat.c: Likewise. * host.c: Don't include "pshost.h". * spec.c: Likewise. * ps.h: Include . (ps_get_host, ps_host_basic_info, ps_host_sched_info, ps_host_load_info): Copied here from pshost.h. (ps_write_string, ps_write_spaces, ps_write_padding, ps_write_field, ps_write_int_field): Copied here from pswrite.h * pshost.h, pswrite.h: Delete files. * New ChangeLog, moved into canonical directory structure. Old ChangeLog is in .../hurd/utils/ps.ChangeLog.