aboutsummaryrefslogtreecommitdiff
path: root/libps
Commit message (Collapse)AuthorAgeFilesLines
* (ps_alive_filter): New variable.Miles Bader1996-02-151-1/+14
| | | | (ps_alive_p): New function.
* (ps_alive_filter): New declaration.Miles Bader1996-02-151-18/+38
| | | | | | | (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.
* (proc_stat_list_add_pids): Add and support new return parameter PROC_STATS.Miles Bader1996-02-151-41/+85
| | | | | | | | (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_stream_write): Don't screw up on negative spaces.Miles Bader1996-02-151-1/+1
|
* (specs): Right-align the TTY column.Miles Bader1996-02-151-1/+1
|
* (specs): Change `Rpc' entry to `Wait'.Miles Bader1996-02-131-12/+82
| | | | | | | | (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.
* (fetch_procinfo, merge_procinfo): Return wait strings.Miles Bader1996-02-131-33/+74
| | | | | | | (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.
* (struct proc_stat): Add thread_wait, thread_waits, & thread_waits_len fields.Miles Bader1996-02-131-4/+20
| | | | | | (PSTAT_THREAD_WAIT): Renamed from PSTAT_THREAD_RPC. (proc_stat_thread_wait): New macro. (ps_stream_write_trunc_field): New declaration.
* (ps_stream_write_field): Call _ps_stream_write_field.Miles Bader1996-02-131-12/+33
| | | | | (ps_stream_write_trunc_field): New function. (_ps_stream_write_field): New function, from ps_stream_write_field.
* (ps_getter_t, ps_filter_t, struct ps_filter, ps_not_leader_filter,Miles Bader1996-02-091-9/+9
| | | | | ps_ctty_filter, ps_unorphaned_filter, ps_parent_filter, ps_std_fmt_specs): Make const.
* (specs, state_shadows, ps_pid_getter, ps_thread_index_getter,Miles Bader1996-02-091-39/+39
| | | | | | | | | | | | | | 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.
* (state_shadows): Don't reflect a suspended thread in the process stateMiles Bader1996-02-041-209/+189
| | | | | | | | | | | | | | | display if any thread isn't suspended. (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. (specs): Rearrange to use new field layout. (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_emit_seconds, ps_emit_minutes): Use timefmt functions. (append_fraction, sprint_long_time, ps_emit_nice_seconds): Deleted. Include <timefmt.h>.
* (installhdrsubdir): New macro (put ps.h in <>, not <hurd/>).Miles Bader1996-01-191-0/+1
|
* (ps_context_create): Initialize USER_HOOKS field.Miles Bader1996-01-191-0/+1
|
* (ps_fmt_create):Miles Bader1996-01-191-8/+35
| | | | | | | | Use the new spec fields. Now takes a ps_fmt_specs_t instead of an array of specs. Also fixup call to ps_fmt_specs_find(). (ps_fmt_write_proc_stat): Support new inval field in FMT. (ps_fmt_set_output_width): New function.
* (summarize_thread_basic_info):Miles Bader1996-01-191-14/+61
| | | | | | | | If there are any running threads, then only average priority from them. (_proc_stat_free): Call user cleanup hook. (proc_stat_set_flags, add_preconditions): Deal with user bits. (proc_stat_set_flags): Support the failed field. (_proc_stat_create): Initialize the failed and hook fields.
* (struct ps_user_hooks): New structure.Miles Bader1996-01-191-16/+66
| | | | | | | | | | | | | | | | | | | (PSTAT_HOOK, PSTAT_USER_BASE, PSTAT_USER_MASK): New macros. (struct ps_context): Add USER_HOOKS field. (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. (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. (struct proc_stat): Add failed and hook fields.
* (ps_emit_nz_int):Miles Bader1995-12-211-16/+42
| | | | | | | | | | | Write `-' when the value is 0, rather than mangling the output. (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. (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).
* (ps_not_leader_p): Renamed from ps_not_sess_leader_p.Miles Bader1995-12-211-11/+14
| | | | | | | (ps_not_leader_filter): Renamed from ps_not_sess_leader_filter. (ps_unorphaned_p): Include login leaders as well as session leaders. (ps_own_filter): Depend on PSTAT_OWNER_UID. (ps_own_p): Account for there being no uid.
* (proc_stat_set_flags): If there's no owner, set the uid to -1 (and the ownerMiles Bader1995-12-201-2/+20
| | | | | | to null), instead of failing. (proc_stat_set_flags): Add support for PROC_OWNER_UID. (add_preconditions): Add preconditions for owner_uid (& owner).
* (proc_stat_owner_uid): New macro.Miles Bader1995-12-201-6/+9
| | | | | | (PSTAT_OWNER_UID): New macro. (struct proc_stat): Add owner_uid field. (ps_not_leader_filter): Renamed from ps_not_sess_leader_filter.
* (proc_stat_list_fmt): Use new write function names.Miles Bader1995-11-201-18/+8
| | | | Use new STREAM parameter instead of old one and count.
* (ps_emit_int, ps_emit_nz_int, ps_emit_priority,Miles Bader1995-11-201-40/+43
| | | | | | | | 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): Use new STREAM parameter instead of old one and count. Use new function names.
* (ps_stream_write): Renamed from ps_write_string.Miles Bader1995-11-201-54/+87
| | | | | | | | | | | | | | (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_pad, ps_stream_write_field): Use negative spaces. (ps_stream_newline): New function.
* (ps_fmt_write_titles, ps_fmt_write_proc_stat): Use new write function names.Miles Bader1995-11-201-8/+7
| | | | Use new STREAM parameter instead of old one and count.
* (ps_fmt_write_titles, ps_fmt_write_proc_stat, proc_stat_list_fmt,Miles Bader1995-11-201-44/+55
| | | | | | | | | | | | | | | | 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.
* (ps_base_priority_getter, ps_cur_priority_getter, ps_get_base_priority,Miles Bader1995-11-081-4/+4
| | | | | ps_get_cur_priority): Get this info using PSTAT_THREAD_BASIC instead of PSTAT_THREAD_SCHED.
* (proc_stat_set_flags):Miles Bader1995-11-081-17/+49
| | | | | | | | | | | | | | Initialize the proc_info and proc_info_size fields if they've never been set. 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. (summarize_thread_basic_info): Summarize available priority info too. (summarize_thread_sched_info): Do max_ & depress_priority too.
* (add_preconditions): Don't require PSTAT_EXEC_FLAGS for getting the stateMiles Bader1995-11-031-140/+401
| | | | | | | | | | | | | | | | | | | anymore (but do require PSTAT_{TASK,THREAD}_BASIC). (proc_stat_state_tags): Update to reflect new flags. (proc_stat_set_flags): Set new flags. (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 funcs. (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.
* (ps_own_filter): Use PSTAT_PROC_INFO, not PSTAT_INFO.Miles Bader1995-11-031-2/+2
| | | | (ps_own_p): Use proc_stat_proc_info, not proc_stat_info.
* (ps_rpc_getter): New variable.Miles Bader1995-11-031-30/+53
| | | | | | | | | | | | | | | | | | | (ps_get_rpc): New function. (ps_std_fmt_specs): Add "RPC" entry. (ps_emit_nz_int): New function. (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.
* (PSTAT_STATE_P_LOGINLDR, PSTAT_STATE_P_WAIT, PSTAT_STATE_P_GETMSG): New flags.Miles Bader1995-11-031-56/+74
| | | | | | | | | | | | | | | (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.
* Specify shared library dependencies.Roland McGrath1995-10-091-0/+2
|
* (ps_std_fmt_specs): Declare extern.Miles Bader1995-08-251-1/+1
|
* (OBJS): Just put the migs stubs directly in here.Miles Bader1995-08-241-5/+2
| | | | (REMHDRS, MIGSTUBS): Removed.
* (ps_not_sess_leader_p, ps_unorphaned_p, ps_parent_p): Use the new state bits.Miles Bader1995-08-191-3/+3
|
* (ps_emit_state): Rearrange things to reflect the new state bits.Miles Bader1995-08-191-10/+29
| | | | | (state_shadows): New variable. (ps_emit_state): Use the state_shadows list to turn off some states.
* (PSTAT_STATE_*): All proc state flags reorganized and renamed toMiles Bader1995-08-191-23/+47
| | | | | PSTAT_STATE_P_* for process-global bits, and PSTAT_STATE_T_* for per-thread bits.
* (thread_state, proc_stat_set_flags): Use the new state bits.Miles Bader1995-08-191-20/+19
| | | | | | (proc_stat_set_flags): Actually set the PSTAT_STATE_P_STOP bit. (proc_stat_state_tags): Reordered to reflect the new ordering of the state bits.
* Remove include dependencies.Miles Bader1995-07-081-2/+1
| | | | (REMHDRS): New variable.
* (ps_tty_short_name): That assignment around which extra parents were put wasMiles Bader1995-07-081-1/+1
| | | | actually supposed to be a test! Make it so...
* Include hurd/ihash.h instead of ihash.h.Miles Bader1995-07-081-1/+2
|
* (ps_tty_short_name): Put extra parens around assignment inside ifMichael I. Bushnell1995-07-071-1/+1
| | | | test.
* (ps_own_filter, ps_not_sess_leader_filter, ps_ctty_filter,Miles Bader1995-05-311-5/+5
| | | | | | 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).
* (ps_fmt_create): Don't mutate the format spec name in the fmt_spec list we'reMiles Bader1995-05-311-34/+22
| | | | | | 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.
* If a msg port call times out, disable use of that msg port.Miles Bader1995-05-051-32/+51
|
* Compile our own msg & term user stubs to add msg timeouts.Miles Bader1995-05-051-1/+6
|
* Rename ps_fmt_squash to ps_fmt_squash_flags, moving most of the guts into aMiles Bader1995-05-031-62/+78
| | | | | | new more general ps_fmt_squash, which is usable for other things than flags. Recalculate the set of ps flags needed by the fmt in ps_fmt_squash (which then allows us to remove more specific code in ps_fmt_squash_flags).
* Add the nominal_fn field to struct ps_fmt_spec, which will be used to decideMiles Bader1995-05-031-2/+23
| | | | | | whether values are `unexciting'. Add entries for proc_stat_list_for_each and proc_stat_list_spec_nominal. Rename ps_fmt_squash to ps_fmt_squash_flags.
* (proc_stat_list_for_each): New function for iterating over proc_stat_lists.Miles Bader1995-05-031-0/+47
| | | | | (proc_stat_list_spec_nominal): New function for deciding if a particular spec is always nominal.