1 #ifndef _VX_CACCT_PROC_H
2 #define _VX_CACCT_PROC_H
4 #include <linux/vserver/cacct_int.h>
8 "Type\t recv #/bytes\t\t send #/bytes\t\t fail #/bytes\n"
10 static inline int vx_info_proc_cacct(struct _vx_cacct *cacct, char *buffer)
13 static char *type[VXA_SOCK_SIZE] = {
14 "UNSPEC", "UNIX", "INET", "INET6", "PACKET", "OTHER" };
16 length += sprintf(buffer + length, VX_SOCKA_TOP);
17 for (i=0; i<VXA_SOCK_SIZE; i++) {
18 length += sprintf(buffer + length,
21 length += sprintf(buffer + length,
23 ,vx_sock_count(cacct, i, j)
24 ,vx_sock_total(cacct, i, j)
27 buffer[length++] = '\n';
30 length += sprintf(buffer + length, "\n");
31 length += sprintf(buffer + length,
32 "slab:\t %8u %8u %8u %8u\n"
33 ,atomic_read(&cacct->slab[1])
34 ,atomic_read(&cacct->slab[4])
35 ,atomic_read(&cacct->slab[0])
36 ,atomic_read(&cacct->slab[2])
39 length += sprintf(buffer + length, "\n");
41 length += sprintf(buffer + length,
42 "page[%d]: %8u %8u %8u %8u\t %8u %8u %8u %8u\n"
44 ,atomic_read(&cacct->page[i][0])
45 ,atomic_read(&cacct->page[i][1])
46 ,atomic_read(&cacct->page[i][2])
47 ,atomic_read(&cacct->page[i][3])
48 ,atomic_read(&cacct->page[i][4])
49 ,atomic_read(&cacct->page[i][5])
50 ,atomic_read(&cacct->page[i][6])
51 ,atomic_read(&cacct->page[i][7])
58 #endif /* _VX_CACCT_PROC_H */