diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2007-10-17 16:34:23 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2007-10-17 16:34:23 +0100 |
commit | 9bb5f67c0d8a6e8dad7de72e2488ee73c90f7d43 (patch) | |
tree | 6018351784418e4ae965f353c4e96719c4009a5e /virt-top/virt_top.ml | |
parent | 0e09861c06a0c274bcfdacceaee347f8aaa969cb (diff) | |
download | virt-top-9bb5f67c0d8a6e8dad7de72e2488ee73c90f7d43.tar.gz virt-top-9bb5f67c0d8a6e8dad7de72e2488ee73c90f7d43.tar.xz virt-top-9bb5f67c0d8a6e8dad7de72e2488ee73c90f7d43.zip |
Added GNU GPL/LGPL copyright notices everywhere.
Fixed display of time which was accidentally broken in previous code move.
Diffstat (limited to 'virt-top/virt_top.ml')
-rw-r--r-- | virt-top/virt_top.ml | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/virt-top/virt_top.ml b/virt-top/virt_top.ml index 0638a65..dc71a71 100644 --- a/virt-top/virt_top.ml +++ b/virt-top/virt_top.ml @@ -1,5 +1,21 @@ (* 'top'-like tool for libvirt domains. - *) + (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc. + http://libvirt.org/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*) open Printf open ExtList @@ -489,7 +505,6 @@ let collect, clear_pcpu_display_data = let tm = Unix.localtime time in let printable_time = sprintf "%02d:%02d:%02d" tm.Unix.tm_hour tm.Unix.tm_min tm.Unix.tm_sec in - mvaddstr top_lineno 0 ("virt-top " ^ printable_time ^ " - "); (* What's the total CPU time elapsed since we were last called? (ns) *) let total_cpu_per_pcpu = 1_000_000_000. *. (time -. !last_time) in @@ -802,6 +817,9 @@ let redraw = (* Get the screen/window size. *) let lines, cols = get_size () in + (* Time. *) + mvaddstr top_lineno 0 ("virt-top " ^ printable_time ^ " - "); + (* Basic node_info. *) addstr (sprintf "%s %d/%dCPU %dMHz %LdMB " node_info.C.model node_info.C.cpus nr_pcpus node_info.C.mhz |