X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-top%2Fvirt_top.ml;h=dc71a7124a091d45ad8f196a6208c585be1e5a39;hb=9bb5f67c0d8a6e8dad7de72e2488ee73c90f7d43;hp=0638a658907f7db63c5dc72f440e775ed0a528ac;hpb=0e09861c06a0c274bcfdacceaee347f8aaa969cb;p=virt-top.git 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