---
title: "/proc/pid/stat 格式"
author: "fosa0989"
date: "2009-11-22T10:48:25Z"
tags: []
slug: "proc-pid-stat"
draft: false
lastmod: "2009-11-22T10:48:25Z"
id: 522981
url: "https://hchen229.iteye.com/blog/522981"
---

From file sp/proc/array.c    line 455

 

   seq\_printf(m, "%d (%s) %c %d %d %d %d %d %u %lu \\  
%lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \\  
%lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %lu %ld\\n",  
        pid\_nr\_ns(pid, ns),  
        tcomm,  
        state,  
        ppid,  
        pgid,  
        sid,  
        tty\_nr,  
        tty\_pgrp,  
        task-&gt;flags,  
        min\_flt,  
        cmin\_flt,  
        maj\_flt,  
        cmaj\_flt,  
        cputime\_to\_clock\_t(utime),  
        cputime\_to\_clock\_t(stime),  
        cputime\_to\_clock\_t(cutime),  
        cputime\_to\_clock\_t(cstime),  
        priority,  
        nice,  
        num\_threads,  
        start\_time,  
        vsize,  
        mm ? get\_mm\_rss(mm) : 0,  
        rsslim,  
        mm ? mm-&gt;start\_code : 0,  
        mm ? mm-&gt;end\_code : 0,  
        (permitted && mm) ? mm-&gt;start\_stack : 0,  
        esp,  
        eip,  
        /* The signal information here is obsolete.  
         * It must be decimal for Linux 2.0 compatibility.  
         * Use /proc/#/status for real-time signals.  
         \*/  
        task-&gt;pending.signal.sig\[0] & 0x7fffffffUL,  
        task-&gt;blocked.sig\[0] & 0x7fffffffUL,  
        sigign      .sig\[0] & 0x7fffffffUL,  
        sigcatch    .sig\[0] & 0x7fffffffUL,  
        wchan,  
        0UL,  
        0UL,  
        task-&gt;exit\_signal,  
        task\_cpu(task),  
        task-&gt;rt\_priority,  
        task-&gt;policy,  
        (unsigned long long)delayacct\_blkio\_ticks(task),  
        cputime\_to\_clock\_t(gtime),  
        cputime\_to\_clock\_t(cgtime));