]> git.entuzijast.net Git - imunes.git/commitdiff
Wipe out mbuf / cluster usage monitoring routines. Accounting and
authormarko <marko>
Wed, 2 May 2007 11:36:50 +0000 (11:36 +0000)
committermarko <marko>
Wed, 2 May 2007 11:36:50 +0000 (11:36 +0000)
imposing limits on mbuf usage is quite different on FreeBSD -CURRENT
from what it was on 4.11, so don't mess with those details at the
moment.

Bug found by:
Submitted by:
Requested by:
Reviewed by:
Approved by:
Obtained from:

exec.tcl

index 560b7f752ccc85b32200da99e9d77156f59449c8..59ad9a43b271da8bb996a423b80a82e42f2e8084 100755 (executable)
--- a/exec.tcl
+++ b/exec.tcl
@@ -74,48 +74,6 @@ proc nexec { args } {
 }
 
 
-#****f* exec.tcl/nexec_monitor
-# NAME
-#   nexec_monitor -- execute monitor
-# SYNOPSIS
-#   set result [nexec_monitor $args]
-# FUNCTION
-#   Executes the sting given in args variable. The sting is not executed 
-#   if IMUNES is running in editor only mode. Execution of a string can
-#   be local or remote. Opens a monitor socket if it is not yet opened. 
-#   Sends the arguments to monitor socket if the remote execution is 
-#   selected, otherwise executes arguments locally.
-# INPUTS
-#   * args -- the string that should be executed locally or remotely.
-# RESULT
-#   * result -- the standard output of the executed string.
-#****
-proc nexec_monitor { args } {
-    global remote_exec editor_only
-    global monSock 
-
-    if { $remote_exec } {
-       if { ![info exists monSock] || $monSock == "" } { 
-           remoteStart
-       }
-    }
-
-    if { $editor_only } {
-      tk_messageBox -title "Editor only" \
-         -message "Running in editor only mode. Cannot execute commands. Please report this problem." \
-         -type ok
-      exit 5
-    }
-
-    if { $remote_exec } {
-       rexec $monSock $args 
-    } else {
-        eval exec $args
-    }
-}
-
-
-
 #****f* exec.tcl/setOperMode
 # NAME
 #   setOperMode -- set operating mode
@@ -139,7 +97,6 @@ proc nexec_monitor { args } {
 #****
 proc setOperMode { mode } {
     global oper_mode activetool node_list
-    global nmbufs nmbclusters
     global editor_only remote_exec execSock
     global undolevel redolevel
 
@@ -190,9 +147,6 @@ proc setOperMode { mode } {
        .menubar.edit entryconfigure "Undo" -state disabled
        .menubar.edit entryconfigure "Redo" -state disabled
        set oper_mode exec
-       set nmbufs [lindex [split [nexec sysctl kern.ipc.nmbufs]] 1]
-       set nmbclusters [lindex [split [nexec sysctl kern.ipc.nmbclusters]] 1]
-       monitor_loop
        if { $remote_exec } {
            nexec create_conf_file config.imn
            dumpCfg file $execSock
@@ -702,41 +656,6 @@ proc vimageCleanup {} {
 }
 
 
-#****f* exec.tcl/monitor_loop
-# NAME
-#   monitor_loop -- monitor loop
-# SYNOPSIS
-#   monitor_loop
-# FUNCTION
-#   Calculates the usage of cpu, mbuffers and mbuf clusters.
-#   The results are displayed in status line and updated 
-#   every two seconds.
-#****
-proc monitor_loop {} {
-    global oper_mode
-    global nmbufs nmbclusters
-
-    if {$oper_mode != "exec"} {
-       .bottom.cpu_load config -text ""
-       .bottom.mbuf config -text ""
-       return
-    }
-
-    set cpu_load [expr ([lindex [split [nexec_monitor sysctl kern.cp_time_avg]] end] + \
-                       5000) / 10000]
-    .bottom.cpu_load config -text "CPU $cpu_load%"
-
-    set nstout [split [nexec_monitor netstat -m] ]
-    set mbufs [lindex [split [lindex $nstout 0] /] 0]
-    set clusts [lindex [split [lsearch -inline $nstout "*/$nmbclusters"] /] 0]
-    set mbufp [expr $mbufs * 100 / $nmbufs]
-    set clustp [expr $clusts * 100 / $nmbclusters]
-    .bottom.mbuf config -text "mbuf/clus $mbufp%/$clustp%"
-
-    after 2000 { monitor_loop }
-}
-
-
 #****f* exec.tcl/execSetIfcQDisc
 # NAME
 #   execSetIfcQDisc -- in exec mode set interface queuing discipline