Added read, write. This members provides total read and write in bytes

* include/glibtop/fsusage.h: Added read, write. This members provides
	total read and write in bytes since boot_time.

	* include/glibtop/netload.h: Added hwaddress : provides harware address,
	eg MAC address. mtu, address and subnet are now guint32.
This commit is contained in:
Benoît Dejean
2004-07-17 12:09:01 +00:00
parent e5a855db7c
commit 644b0ebcf5
3 changed files with 25 additions and 10 deletions

View File

@@ -1,3 +1,11 @@
2004-07-17 Benoît Dejean <tazforever@dlfp.org>
* include/glibtop/fsusage.h: Added read, write. This members provides
total read and write in bytes since boot_time.
* include/glibtop/netload.h: Added hwaddress : provides harware address,
eg MAC address. mtu, address and subnet are now guint32.
2004-07-15 Benoît Dejean <tazforever@dlfp.org> 2004-07-15 Benoît Dejean <tazforever@dlfp.org>
* include/glibtop/procstate.h: Added GLIBTOP_PROCESS_DEAD constant. * include/glibtop/procstate.h: Added GLIBTOP_PROCESS_DEAD constant.

View File

@@ -34,8 +34,9 @@ G_BEGIN_DECLS
#define GLIBTOP_FSUSAGE_FILES 3 #define GLIBTOP_FSUSAGE_FILES 3
#define GLIBTOP_FSUSAGE_FFREE 4 #define GLIBTOP_FSUSAGE_FFREE 4
#define GLIBTOP_FSUSAGE_BLOCK_SIZE 5 #define GLIBTOP_FSUSAGE_BLOCK_SIZE 5
#define GLIBTOP_FSUSAGE_READ 6
#define GLIBTOP_MAX_FSUSAGE 6 #define GLIBTOP_FSUSAGE_WRITE 7
#define GLIBTOP_MAX_FSUSAGE 8
typedef struct _glibtop_fsusage glibtop_fsusage; typedef struct _glibtop_fsusage glibtop_fsusage;
@@ -49,6 +50,7 @@ struct _glibtop_fsusage
files, /* Total file nodes. */ files, /* Total file nodes. */
ffree; /* Free file nodes. */ ffree; /* Free file nodes. */
guint32 block_size; /* Size of a block in bytes. */ guint32 block_size; /* Size of a block in bytes. */
guint64 read, write; /* Total blocks read and written */
}; };
#define glibtop_get_fsusage(fsusage,disk) glibtop_get_fsusage_l(glibtop_global_server, fsusage, disk) #define glibtop_get_fsusage(fsusage,disk) glibtop_get_fsusage_l(glibtop_global_server, fsusage, disk)

View File

@@ -46,8 +46,9 @@ G_BEGIN_DECLS
#define GLIBTOP_NETLOAD_ADDRESS6 14 #define GLIBTOP_NETLOAD_ADDRESS6 14
#define GLIBTOP_NETLOAD_PREFIX6 15 #define GLIBTOP_NETLOAD_PREFIX6 15
#define GLIBTOP_NETLOAD_SCOPE6 16 #define GLIBTOP_NETLOAD_SCOPE6 16
#define GLIBTOP_NETLOAD_HWADDRESS 17
#define GLIBTOP_MAX_NETLOAD 17 #define GLIBTOP_MAX_NETLOAD 18
typedef struct _glibtop_netload glibtop_netload; typedef struct _glibtop_netload glibtop_netload;
@@ -82,11 +83,13 @@ enum GLIBTOP_IF_IN6_SCOPE
struct _glibtop_netload struct _glibtop_netload
{ {
guint64 flags, guint64 flags,
if_flags, /* GLIBTOP_NETLOAD_IF_FLAGS */ if_flags; /* GLIBTOP_NETLOAD_IF_FLAGS */
mtu, /* GLIBTOP_NETLOAD_MTU */
guint32 mtu, /* GLIBTOP_NETLOAD_MTU */
subnet, /* GLIBTOP_NETLOAD_SUBNET */ subnet, /* GLIBTOP_NETLOAD_SUBNET */
address, /* GLIBTOP_NETLOAD_ADDRESS */ address; /* GLIBTOP_NETLOAD_ADDRESS */
packets_in, /* GLIBTOP_NETLOAD_PACKETS_IN */
guint64 packets_in, /* GLIBTOP_NETLOAD_PACKETS_IN */
packets_out, /* GLIBTOP_NETLOAD_PACKETS_OUT */ packets_out, /* GLIBTOP_NETLOAD_PACKETS_OUT */
packets_total, /* GLIBTOP_NETLOAD_PACKETS_TOTAL*/ packets_total, /* GLIBTOP_NETLOAD_PACKETS_TOTAL*/
bytes_in, /* GLIBTOP_NETLOAD_BYTES_IN */ bytes_in, /* GLIBTOP_NETLOAD_BYTES_IN */
@@ -97,9 +100,11 @@ struct _glibtop_netload
errors_total, /* GLIBTOP_NETLOAD_ERRORS_TOTAL */ errors_total, /* GLIBTOP_NETLOAD_ERRORS_TOTAL */
collisions; /* GLIBTOP_NETLOAD_COLLISIONS */ collisions; /* GLIBTOP_NETLOAD_COLLISIONS */
guint8 address6[16]; guint8 address6[16]; /* GLIBTOP_NETLOAD_ADDRESS6 */
guint8 prefix6[16]; guint8 prefix6[16]; /* GLIBTOP_NETLOAD_PREXIF6 */
guint8 scope6; guint8 scope6; /* GLIBTOP_NETLOAD_SCOPE6 */
guint8 hwaddress[8]; /* GLIBTOP_NETLOAD_HWADDRESS */
}; };
#define glibtop_get_netload(netload,interface) glibtop_get_netload_l(glibtop_global_server, netload, interface) #define glibtop_get_netload(netload,interface) glibtop_get_netload_l(glibtop_global_server, netload, interface)