Age | Commit message (Collapse) | Author |
|
* libps/spec.c (ps_emit_user_name): Do not dereference pw when it is NULL,
dereference u instead.
|
|
Add (and implement) a proc RPC to obtain the number of Mach ports used
by the target task.
Add infrastructure in libps to read this information.
* hurd/process.defs (proc_getnports): New RPC.
* hurd/process_request.defs (proc_getnports_request): New RPC.
* libps/procstat.c (proc_stat_set_flags): Call proc_getnports RPC if
needed.
* libps/ps.h (proc_stat): New `num_ports' field.
(PSTAT_NUM_PORTS): New macro.
(proc_stat_num_ports): New macro.
* libps/spec.c (ps_get_num_ports): New function.
(ps_num_ports_getter): New variable.
(specs): New entry for `ps_num_ports_getter'.
* proc/info.c (S_proc_getnports): New function.
|
|
* spec.c (sprint_frac_value): Added case for values between 1000 and
1023. Make VALUE, FRAC size_t's and return a value of type size_t.
(ps_emit_nice_int): Removed function. Replaced by ...
(ps_emit_nice_size_t): ... this. New Function.
(ps_cmp_size_ts): New function.
(ps_vsize_getter): Return a size_t instead of an int.
(ps_rsize_getter): Likewise.
(ps_get_rmem_frac): MEM_SIZE is now a size_t.
(specs): Use ps_emit_nice_size_t instead of ps_emit_nice_int and use
ps_cmp_size_ts instead of ps_cmp_ints for RSize and VSize.
|
|
* spec.c (ps_emit_wait): Remove local extern decls for functions
actually defined static.
|
|
* ps.h (PSTAT_ENV): New macro.
(struct proc_stat): New members `env', `env_len', `env_vm_alloced'.
(proc_stat_env, proc_stat_env_len): New accessor macros.
(PSTAT_USER_BASE): Increase value to leave more room for additions.
* procstat.c (proc_stat_set_flags): Handle environment.
(_proc_stat_free): Likewise.
* spec.c (ps_get_env, ps_env_getter): New function and constant.
(specs): New spec "Env" using ps_env_getter and ps_emit_args.
|
|
* spec.c (ps_emit_past_time, ps_emit_minutes): Fix return type of
getter fn (int to void).
* spec.c (ps_get_start_time, ps_start_time_getter): New function and
constant to report task_basic_info.creation_time time stamp via
"start_time" spec.
(specs): Add "Start" fmt for it.
|
|
Provide slightly better abbreviations for various port types.
|
|
New function.
(specs):
Use ps_nominal_string for `Args' and `Arg0' fields.
(ps_emit_args, ps_emit_string):
Use `-' for empty values.
|
|
Interpret PS_FMT_FIELD_COLON_MOD flag to mean `print zero as "-"'.
|
|
|
|
|
|
(specs_add_alias): Use a linked list of ps_fmt_spec_blocks instead of
reallocing a block of specs.
(ps_fmt_specs_find): Change searching accordingly.
|
|
|
|
(specs_add_alias): Pass on flags field.
(specs): Add precision & flags fields.
(FG): New macro.
(ps_emit_*): Take FIELD argument instead of WIDTH.
|
|
(ps_emit_seconds): Use new args to fmt_seconds.
(ps_emit_minutes): Use new args to fmt_minutes.
|
|
attributes (that are likely to be noise).
|
|
|
|
(specv_find, specs_add_alias): New functions.
Get rid of mega typedefs, and just use structure pointers like other hurd
libraries. Other misc cleanups.
|
|
|
|
(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.
|
|
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.
|
|
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>.
|
|
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_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_get_cur_priority):
Get this info using PSTAT_THREAD_BASIC instead of PSTAT_THREAD_SCHED.
|
|
(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.
|
|
(state_shadows): New variable.
(ps_emit_state): Use the state_shadows list to turn off some states.
|
|
(ps_nominal_zint, ps_nominal_user, ps_nominal_pri, ps_nominal_nth):
Possible nominal funs.
|
|
TSusp (thread suspend count) output specs.
|
|
sleeping or idle threads' status (as that's presumably the signal thread).
(ps_emit_tty_name): Move guts into into ps_tty_short_name.
Tighten up types used (i.e., don't use int for everything).
|
|
one. Change MsgsIn and MsgsOut to MsgIn and MsgOut.
|
|
(ps_emit_num_blocks): Use int format for int arg.
(sprint_frac_value): Likewise.
|
|
|
|
compatible way (that is, 20 .. -20 instead of 0 .. 24). Use this instead
of ps_emit_int to print all priority fields. This also increases the min
field width for them to 3.
|
|
Use ps_user_t routines instead of querying passwd or getting the owner from
ps->info.
Increase the width of the user name field to 8.
|
|
|