reading struct elf_prstatus for process info in linux?
hi,
can anyone please tell me how to extract information from struct elf_prstatus which is in /sys in RHEL 4. i want to get pid,ppid,all times from this structure.is there any api avalable for reading those info from that struct.given below the format of the struct:
processInfo structure:<sys/procfs.h>
struct elf_prstatus
{
struct elf_siginfo pr_info; /* Info associated with signal. */
short int pr_cursig; /* Current signal. */
unsigned long int pr_sigpend; /* Set of pending signals. */
unsigned long int pr_sighold; /* Set of held signals. */
__pid_t pr_pid;
__pid_t pr_ppid;
__pid_t pr_pgrp;
__pid_t pr_sid;
struct timeval pr_utime; /* User time. */
struct timeval pr_stime; /* System time. */
struct timeval pr_cutime; /* Cumulative user time. */
struct timeval pr_cstime; /* Cumulative system time. */
elf_gregset_t pr_reg; /* GP registers. */
int pr_fpvalid; /* True if math copro being used. */
};
Answer me if u please.
thanks in advance..
|