mirror of
https://github.com/uutils/procps.git
synced 2026-06-10 16:14:00 -07:00
ps: mapping: Include ones from ps L
There seem to be at least one (nwchan) that is mentioned on manpage but not in `ps L` and some that are totally undocumented.
This commit is contained in:
@@ -31,12 +31,20 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
let mut mapping = HashMap::new();
|
||||
let mut append = |code: &str, header: &str| mapping.insert(code.into(), header.into());
|
||||
|
||||
// Those mapping generated from manpage
|
||||
// This list is mainly generated from both `ps L` output and manpage,
|
||||
// but some are also apparently undocumented.
|
||||
append("%cpu", "%CPU");
|
||||
append("%mem", "%MEM");
|
||||
append("_left", "LLLLLLLL");
|
||||
append("_left2", "L2L2L2L2");
|
||||
append("_right", "RRRRRRRR");
|
||||
append("_right2", "R2R2R2R2");
|
||||
append("_unlimited", "U");
|
||||
append("_unlimited2", "U2");
|
||||
append("ag_id", "AGID");
|
||||
append("ag_nice", "AGNI");
|
||||
append("args", "COMMAND");
|
||||
append("atime", "TIME");
|
||||
append("blocked", "BLOCKED");
|
||||
append("bsdstart", "START");
|
||||
append("bsdtime", "TIME");
|
||||
@@ -50,15 +58,20 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
append("cmd", "CMD");
|
||||
append("comm", "COMMAND");
|
||||
append("command", "COMMAND");
|
||||
append("context", "CONTEXT");
|
||||
append("cp", "CP");
|
||||
append("cpuid", "CPUID");
|
||||
append("cputime", "TIME");
|
||||
append("cputimes", "TIME");
|
||||
append("cuc", "%CUC");
|
||||
append("cuu", "%CUU");
|
||||
append("docker", "DOCKER");
|
||||
append("drs", "DRS");
|
||||
append("dsiz", "DSIZ");
|
||||
append("egid", "EGID");
|
||||
append("egroup", "EGROUP");
|
||||
append("eip", "EIP");
|
||||
append("environ", "ENVIRONM");
|
||||
append("esp", "ESP");
|
||||
append("etime", "ELAPSED");
|
||||
append("etimes", "ELAPSED");
|
||||
@@ -66,26 +79,42 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
append("euser", "EUSER");
|
||||
append("exe", "EXE");
|
||||
append("f", "F");
|
||||
append("fds", "FDS");
|
||||
append("fgid", "FGID");
|
||||
append("fgroup", "FGROUP");
|
||||
append("flag", "F");
|
||||
append("flags", "F");
|
||||
append("fname", "COMMAND");
|
||||
append("fsgid", "FSGID");
|
||||
append("fsgroup", "FSGROUP");
|
||||
append("fsuid", "FSUID");
|
||||
append("fsuser", "FSUSER");
|
||||
append("fuid", "FUID");
|
||||
append("fuser", "FUSER");
|
||||
append("gid", "GID");
|
||||
append("group", "GROUP");
|
||||
append("htprv", "HTPRV");
|
||||
append("htshr", "HTSHR");
|
||||
append("ignored", "IGNORED");
|
||||
append("intpri", "PRI");
|
||||
append("ipcns", "IPCNS");
|
||||
append("label", "LABEL");
|
||||
append("lstart", "STARTED");
|
||||
append("lastcpu", "C");
|
||||
append("lim", "LIM");
|
||||
append("longtname", "TTY");
|
||||
append("lsession", "SESSION");
|
||||
append("lstart", "STARTED");
|
||||
append("luid", "LUID");
|
||||
append("lwp", "LWP");
|
||||
append("lxc", "LXC");
|
||||
append("m_drs", "DRS");
|
||||
append("m_size", "SIZE");
|
||||
append("m_trs", "TRS");
|
||||
append("machine", "MACHINE");
|
||||
append("maj_flt", "MAJFLT");
|
||||
append("min_flt", "MINFLT");
|
||||
append("maj_flt", "MAJFL");
|
||||
append("majflt", "MAJFLT");
|
||||
append("min_flt", "MINFL");
|
||||
append("minflt", "MINFLT");
|
||||
append("mntns", "MNTNS");
|
||||
append("netns", "NETNS");
|
||||
append("ni", "NI");
|
||||
@@ -95,7 +124,11 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
append("nwchan", "WCHAN");
|
||||
append("oom", "OOM");
|
||||
append("oomadj", "OOMADJ");
|
||||
append("opri", "PRI");
|
||||
append("ouid", "OWNER");
|
||||
append("pagein", "PAGEIN");
|
||||
append("pcap", "PCAP");
|
||||
append("pcaps", "PCAPS");
|
||||
append("pcpu", "%CPU");
|
||||
append("pending", "PENDING");
|
||||
append("pgid", "PGID");
|
||||
@@ -106,6 +139,11 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
append("policy", "POL");
|
||||
append("ppid", "PPID");
|
||||
append("pri", "PRI");
|
||||
append("pri_api", "API");
|
||||
append("pri_bar", "BAR");
|
||||
append("pri_baz", "BAZ");
|
||||
append("pri_foo", "FOO");
|
||||
append("priority", "PRI");
|
||||
append("psr", "PSR");
|
||||
append("pss", "PSS");
|
||||
append("rbytes", "RBYTES");
|
||||
@@ -123,11 +161,17 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
append("sched", "SCH");
|
||||
append("seat", "SEAT");
|
||||
append("sess", "SESS");
|
||||
append("session", "SESS");
|
||||
append("sgi_p", "P");
|
||||
append("sgi_rss", "RSS");
|
||||
append("sgid", "SGID");
|
||||
append("sgroup", "SGROUP");
|
||||
append("sid", "SID");
|
||||
append("sig", "PENDING");
|
||||
append("sig_block", "BLOCKED");
|
||||
append("sig_catch", "CATCHED");
|
||||
append("sig_ignore", "IGNORED");
|
||||
append("sig_pend", "SIGNAL");
|
||||
append("sigcatch", "CAUGHT");
|
||||
append("sigignore", "IGNORED");
|
||||
append("sigmask", "BLOCKED");
|
||||
@@ -136,6 +180,7 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
append("spid", "SPID");
|
||||
append("stackp", "STACKP");
|
||||
append("start", "STARTED");
|
||||
append("start_stack", "STACKP");
|
||||
append("start_time", "START");
|
||||
append("stat", "STAT");
|
||||
append("state", "S");
|
||||
@@ -145,7 +190,9 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
append("supgrp", "SUPGRP");
|
||||
append("suser", "SUSER");
|
||||
append("svgid", "SVGID");
|
||||
append("svgroup", "SVGROUP");
|
||||
append("svuid", "SVUID");
|
||||
append("svuser", "SVUSER");
|
||||
append("sz", "SZ");
|
||||
append("tgid", "TGID");
|
||||
append("thcount", "THCNT");
|
||||
@@ -156,16 +203,23 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
append("tname", "TTY");
|
||||
append("tpgid", "TPGID");
|
||||
append("trs", "TRS");
|
||||
append("trss", "TRSS");
|
||||
append("tsig", "PENDING");
|
||||
append("tsiz", "TSIZ");
|
||||
append("tt", "TT");
|
||||
append("tty", "TT");
|
||||
append("tty4", "TTY");
|
||||
append("tty8", "TTY");
|
||||
append("ucmd", "CMD");
|
||||
append("ucomm", "COMMAND");
|
||||
append("uid", "UID");
|
||||
append("uid_hack", "UID");
|
||||
append("uname", "USER");
|
||||
append("unit", "UNIT");
|
||||
append("user", "USER");
|
||||
append("userns", "USERNS");
|
||||
append("uss", "USS");
|
||||
append("util", "C");
|
||||
append("utsns", "UTSNS");
|
||||
append("uunit", "UUNIT");
|
||||
append("vsize", "VSZ");
|
||||
@@ -174,7 +228,9 @@ pub(crate) fn default_mapping() -> HashMap<String, String> {
|
||||
append("wcbytes", "WCBYTES");
|
||||
append("wchan", "WCHAN");
|
||||
append("wchars", "WCHARS");
|
||||
append("wname", "WCHAN");
|
||||
append("wops", "WOPS");
|
||||
append("zone", "ZONE");
|
||||
|
||||
mapping
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user