diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/libbb.h b/include/libbb.h index 77f1e0a44..31ded7e9c 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -805,7 +805,7 @@ typedef struct { | |||
805 | DIR *dir; | 805 | DIR *dir; |
806 | /* Fields are set to 0/NULL if failed to determine (or not requested) */ | 806 | /* Fields are set to 0/NULL if failed to determine (or not requested) */ |
807 | char *cmd; | 807 | char *cmd; |
808 | unsigned long vsz; | 808 | unsigned vsz, rss; /* we round it to kbytes */ |
809 | unsigned long stime, utime; | 809 | unsigned long stime, utime; |
810 | unsigned pid; | 810 | unsigned pid; |
811 | unsigned ppid; | 811 | unsigned ppid; |
@@ -813,9 +813,10 @@ typedef struct { | |||
813 | unsigned sid; | 813 | unsigned sid; |
814 | unsigned uid; | 814 | unsigned uid; |
815 | unsigned gid; | 815 | unsigned gid; |
816 | /* basename of executable file in call to exec(2), size from */ | ||
817 | /* sizeof(task_struct.comm) in /usr/include/linux/sched.h */ | ||
818 | char state[4]; | 816 | char state[4]; |
817 | char tty_str[8]; /* "maj,min" or "?" */ | ||
818 | /* basename of executable in exec(2), read from /proc/N/stat, */ | ||
819 | /* size from sizeof(task_struct.comm) in /usr/include/linux/sched.h */ | ||
819 | char comm[COMM_LEN]; | 820 | char comm[COMM_LEN]; |
820 | /* user/group? - use passwd/group parsing functions */ | 821 | /* user/group? - use passwd/group parsing functions */ |
821 | } procps_status_t; | 822 | } procps_status_t; |
@@ -829,12 +830,16 @@ enum { | |||
829 | PSSCAN_CMD = 1 << 6, | 830 | PSSCAN_CMD = 1 << 6, |
830 | PSSCAN_STATE = 1 << 7, | 831 | PSSCAN_STATE = 1 << 7, |
831 | PSSCAN_VSZ = 1 << 8, | 832 | PSSCAN_VSZ = 1 << 8, |
832 | PSSCAN_STIME = 1 << 9, | 833 | PSSCAN_RSS = 1 << 9, |
833 | PSSCAN_UTIME = 1 << 10, | 834 | PSSCAN_STIME = 1 << 10, |
835 | PSSCAN_UTIME = 1 << 11, | ||
836 | PSSCAN_TTY = 1 << 12, | ||
834 | /* These are all retrieved from proc/NN/stat in one go: */ | 837 | /* These are all retrieved from proc/NN/stat in one go: */ |
835 | PSSCAN_STAT = PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID | 838 | PSSCAN_STAT = PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID |
836 | | PSSCAN_COMM | PSSCAN_STATE | 839 | | PSSCAN_COMM | PSSCAN_STATE |
837 | | PSSCAN_VSZ | PSSCAN_STIME | PSSCAN_UTIME, | 840 | | PSSCAN_VSZ | PSSCAN_RSS |
841 | | PSSCAN_STIME | PSSCAN_UTIME | ||
842 | | PSSCAN_TTY, | ||
838 | }; | 843 | }; |
839 | procps_status_t* alloc_procps_scan(int flags); | 844 | procps_status_t* alloc_procps_scan(int flags); |
840 | void free_procps_scan(procps_status_t* sp); | 845 | void free_procps_scan(procps_status_t* sp); |