diff -u linux-2.6.17.7-vs2.1.1-rc27.7/include/linux/vserver/cacct_cmd.h linux-2.6.17.7-vs2.1.1-rc27.7/include/linux/vserver/cacct_cmd.h --- linux-2.6.17.7-vs2.1.1-rc27.7/include/linux/vserver/cacct_cmd.h 2006-07-30 17:03:00 +0200 +++ linux-2.6.17.7-vs2.1.1-rc27.7/include/linux/vserver/cacct_cmd.h 2006-07-30 17:03:00 +0200 @@ -3,2 +3,32 @@ + +/* accounting status commands */ + +#define VCMD_sock_stat VC_CMD(VSTAT, 5, 0) + +struct vcmd_sock_stat_v0 { + uint32_t field; + uint32_t pad0; + uint64_t count; + uint64_t total; +}; + + +enum sock_stat_field { + SOCK_UNSPEC=0, + SOCK_UNIX, + SOCK_INET, + SOCK_INET6, + SOCK_PACKET, + SOCK_OTHER, +}; + + +#ifdef __KERNEL__ + +#include + +extern int vc_sock_stat(struct vx_info *, void __user *); + +#endif /* __KERNEL__ */ #endif /* _VX_CACCT_CMD_H */ only in patch2: unchanged: --- linux-2.6.17.7-vs2.1.1-rc27.6/include/linux/vserver/limit_cmd.h 2006-07-09 19:26:04 +0200 +++ linux-2.6.17.7-vs2.1.1-rc27.7/include/linux/vserver/limit_cmd.h 2006-07-30 17:06:43 +0200 @@ -22,6 +22,16 @@ struct vcmd_ctx_rlimit_mask_v0 { uint32_t maximum; }; +#define VCMD_rlimit_stat VC_CMD(VSTAT, 1, 0) + +struct vcmd_rlimit_stat_v0 { + uint32_t id; + uint32_t hits; + uint64_t value; + uint64_t minimum; + uint64_t maximum; +}; + #define CRLIM_UNSET (0ULL) #define CRLIM_INFINITY (~0ULL) #define CRLIM_KEEP (~1ULL) @@ -46,6 +56,8 @@ extern int vc_get_rlimit(struct vx_info extern int vc_set_rlimit(struct vx_info *, void __user *); extern int vc_reset_minmax(struct vx_info *, void __user *); +extern int vc_rlimit_stat(struct vx_info *, void __user *); + #ifdef CONFIG_IA32_EMULATION extern int vc_get_rlimit_x32(struct vx_info *, void __user *); only in patch2: unchanged: --- linux-2.6.17.7-vs2.1.1-rc27.6/include/linux/vserver/switch.h 2006-07-09 17:07:13 +0200 +++ linux-2.6.17.7-vs2.1.1-rc27.7/include/linux/vserver/switch.h 2006-07-30 16:32:52 +0200 @@ -34,7 +34,7 @@ DISK | | | | |DLIMIT | | |INODE | | VFS | 32| 33| 34| 35| 36| 37| | 38| 39| -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ - OTHER | | | | | | | |VINFO | | + OTHER |VSTAT | | | | | | |VINFO | | | 40| 41| 42| 43| 44| 45| | 46| 47| =======+=======+=======+=======+=======+=======+=======+ +=======+=======+ SPECIAL|EVENT | | | |FLAGS | | | | | @@ -66,6 +66,7 @@ #define VC_CAT_DLIMIT 36 #define VC_CAT_INODE 38 +#define VC_CAT_VSTAT 40 #define VC_CAT_VINFO 46 #define VC_CAT_EVENT 48 @@ -78,7 +79,7 @@ /* interface version */ -#define VCI_VERSION 0x00020101 +#define VCI_VERSION 0x00020102 #define VCI_LEGACY_VERSION 0x000100FF /* query version */