Annotation of 43BSDReno/contrib/isode-beta/snmp/gawk-2.11/s-netstat/mib.mbufs, revision 1.1

1.1     ! root        1: BEGIN {
        !             2:        MSIZE = 128; MCLBYTES = 1024;
        !             3:        keys[0]  = "free";
        !             4:        keys[1]  = "data";
        !             5:        keys[2]  = "packet headers";
        !             6:        keys[3]  = "socket structures";
        !             7:        keys[4]  = "protocol control blocks";
        !             8:        keys[5]  = "routing tables";
        !             9:        keys[6]  = "IMP host tables";
        !            10:        keys[7]  = "address resolution tables";
        !            11:        keys[8]  = "socket names";
        !            12:        keys[9]  = "zombie process status";
        !            13:        keys[10] = "socket options";
        !            14:        keys[11] = "fragment reassembly headers";
        !            15: 
        !            16:        total = 0; inuse = 0;
        !            17: 
        !            18:        didany = 0;
        !            19:        for (i in mbufS) {
        !            20:            didany = 1;
        !            21: 
        !            22:            i = mbufS; j = mbufFrees;
        !            23:            if (i == 0) { printf "no mbufS!?!\n"; exit(1); }
        !            24:            printf "%d/%d mbufs in use:\n", i - j, i;
        !            25:            total += i * MSIZE; inuse += (i - j) * MSIZE;
        !            26: 
        !            27:            didone = 0;
        !            28:            for (i in mbufType) {
        !            29:                didone = 1;
        !            30: 
        !            31:                if (mbufAllocates) {
        !            32:                    printf "\t%d mbufs allocated to ", mbufAllocates;
        !            33:                    if (k = keys[mbufType])
        !            34:                        printf "%s\n", k;
        !            35:                    else
        !            36:                        printf "mbuf type %d\n", mbufType;
        !            37:                }
        !            38:            }
        !            39:            if (!didone && DIAGNOSTIC)
        !            40:                printf "mbufTable: %s\n", DIAGNOSTIC;
        !            41: 
        !            42:            i = mbufClusters; j = mbufFreeClusters
        !            43:            printf "%d/%d mapped pages in use\n", i - j, i;
        !            44:            total += i * MCLBYTES; inuse += (i - j) * MCLBYTES;
        !            45: 
        !            46:            printf "%d Kbytes allocated to network (%d%% in use) ESTIMATE\n",
        !            47:                total / 1024, (inuse * 100) / total;
        !            48:            printf "%d requests for memory denied\n", mbufDrops;
        !            49:        }
        !            50:        if (!didany && DIAGNOSTIC)
        !            51:            printf "mbuf group: %s\n", DIAGNOSTIC;
        !            52:       }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.