Add Linux support, code cleanups
[remotetop.git] / rtop.c
diff --git a/rtop.c b/rtop.c
index 410e5c6..85a0eb3 100644 (file)
--- a/rtop.c
+++ b/rtop.c
@@ -34,6 +34,7 @@
 #include <errno.h>
 #include <sys/sysctl.h>
 #include <sys/types.h>
+#include <time.h>
 #include <sys/time.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -102,13 +103,13 @@ main( int argc, char *argv[] ) {
                pmsg = (TCMsg*) cs.buf;
                mu = (MassiveUnit*)pmsg->data;
 
-               printf("\tIP\tLoad\tFree\tTotal\tData\n");
+               printf("\tIP\tLoad\tFree\tTotal\tDate\n");
                for(i=0; i<mu->number; i++) 
                        printf("%s\t%.2f\t%.1fM\t%.1fM\t%s",
                                inet_ntoa(mu->units[i].ip),
                                mu->units[i].top.load,
                                ((float) mu->units[i].top.freemem)/( 1024*1024.0 ),
-                               ((float) mu->units[i].top.usermem)/( 1024*1024.0 ),
+                               ((float) mu->units[i].top.physmem)/( 1024*1024.0 ),
                                ctime( &(mu->units[i].stamp) )
                        );
        }