vshost-util-vserver

Build script and sources for util-vserver.
git clone https://ccx.te2000.cz/git/vshost-util-vserver
Log | Files | Refs

monitor.h (1296B)


      1 #ifndef _VX_MONITOR_H
      2 #define _VX_MONITOR_H
      3 
      4 
      5 enum {
      6 	VXM_UNUSED = 0,
      7 
      8 	VXM_SYNC = 0x10,
      9 
     10 	VXM_UPDATE = 0x20,
     11 	VXM_UPDATE_1,
     12 	VXM_UPDATE_2,
     13 
     14 	VXM_RQINFO_1 = 0x24,
     15 	VXM_RQINFO_2,
     16 
     17 	VXM_ACTIVATE = 0x40,
     18 	VXM_DEACTIVATE,
     19 	VXM_IDLE,
     20 
     21 	VXM_HOLD = 0x44,
     22 	VXM_UNHOLD,
     23 
     24 	VXM_MIGRATE = 0x48,
     25 	VXM_RESCHED,
     26 
     27 	/* all other bits are flags */
     28 	VXM_SCHED = 0x80,
     29 };
     30 
     31 struct _vxm_update_1 {
     32 	uint32_t tokens_max;
     33 	uint32_t fill_rate;
     34 	uint32_t interval;
     35 };
     36 
     37 struct _vxm_update_2 {
     38 	uint32_t tokens_min;
     39 	uint32_t fill_rate;
     40 	uint32_t interval;
     41 };
     42 
     43 struct _vxm_rqinfo_1 {
     44 	uint16_t running;
     45 	uint16_t onhold;
     46 	uint16_t iowait;
     47 	uint16_t uintr;
     48 	uint32_t idle_tokens;
     49 };
     50 
     51 struct _vxm_rqinfo_2 {
     52 	uint32_t norm_time;
     53 	uint32_t idle_time;
     54 	uint32_t idle_skip;
     55 };
     56 
     57 struct _vxm_sched {
     58 	uint32_t tokens;
     59 	uint32_t norm_time;
     60 	uint32_t idle_time;
     61 };
     62 
     63 struct _vxm_task {
     64 	uint16_t pid;
     65 	uint16_t state;
     66 };
     67 
     68 struct _vxm_event {
     69 	uint32_t jif;
     70 	union {
     71 		uint32_t seq;
     72 		uint32_t sec;
     73 	};
     74 	union {
     75 		uint32_t tokens;
     76 		uint32_t nsec;
     77 		struct _vxm_task tsk;
     78 	};
     79 };
     80 
     81 struct _vx_mon_entry {
     82 	uint16_t type;
     83 	uint16_t xid;
     84 	union {
     85 		struct _vxm_event ev;
     86 		struct _vxm_sched sd;
     87 		struct _vxm_update_1 u1;
     88 		struct _vxm_update_2 u2;
     89 		struct _vxm_rqinfo_1 q1;
     90 		struct _vxm_rqinfo_2 q2;
     91 	};
     92 };
     93 
     94 
     95 #endif /* _VX_MONITOR_H */