Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix #617 and Fix #613 - Add a % CPU usage in VirtualMachineControl view (and in chat commands) #618

Merged
merged 14 commits into from

2 participants

@CyrilPeponnet

Tested, works fine, sometime the % > 100 because of sampling time and rounded values (103% is the maximul I have seen for time to time with an endless loop).

Tested with virt-top, the values are coherent.

CyrilPeponnet added some commits
@CyrilPeponnet CyrilPeponnet Revert Repeat change on CPTimer for Screenshots as it is recreated in…
… ImageDidLoad
ba4ef20
@CyrilPeponnet CyrilPeponnet Add a nice sentence when asking the hypervisor about nodeinfo. df0d9a8
@CyrilPeponnet CyrilPeponnet Use a threaded timer to sample cputime
More accuracy is needed... for the next commit :)
c56cfe0
@CyrilPeponnet CyrilPeponnet Merge branch 'master' into add-virtualmachine-cpu-usage 02b504d
@CyrilPeponnet CyrilPeponnet Take sample as tuple (timestamp,cputime) to be more precise when comp…
…uting

The threaded timer is not very precised in time so we must take the
timestamp when sampling cputime from domain (I could also be reused
later to have a stat database for domains).
ee3b1be
@CyrilPeponnet CyrilPeponnet Destroy the CPtimer once triggered, no REPEAT
The CPTimer for CPUusage will be created if there is no current timer
running. We also delete the current timer once the xmpp callback have
been sent.
e2178b8
...ent/archipel-agent/archipel/archipelVirtualMachine.py
((4 lines not shown))
+ def cputime_sampling_Timer(self,Interval):
+ """
+ Create a threaded timer to take timestamp,cputime samples from actual domain
+ """
+ Timer(Interval, self.cputime_sampling_Timer,[Interval]).start()
+ if self.domain and not self.is_freeing:
+ self.cputime_samples.insert(0,(time.time(),self.domain.info()[4]))
+ if len(self.cputime_samples) > 2:
+ self.cputime_samples.pop()
+
+ def compute_cpu_usage(self):
+ """
+ Return the vm CPU usage in percent between two samples
+ """
+ try:
+ prtCPU = 100*(self.cputime_samples[0][1]-self.cputime_samples[1][1])/((self.cputime_samples[0][0]-self.cputime_samples[1][0])*self.hypervisor.get_nodeinfo()['nrCoreperSocket']*1000000000)
@primalmotion Owner

style. space between operators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ent/archipel-agent/archipel/archipelVirtualMachine.py
@@ -672,6 +678,30 @@ def screenshot(self, thumbnail=True):
return (data, size)
return (None, (0, 0))
+ def cputime_sampling_Timer(self,Interval):
@primalmotion Owner

Style. cputime_sampling_timer not cputime_sampling_Timer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...lMachineControls/TNVirtualMachineControlsController.j
@@ -161,6 +164,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
[stepperCPU setMaxValue:[defaults integerForKey:@"TNArchipelControlsMaxVCPUs"]];
[stepperCPU setValueWraps:NO];
[stepperCPU setAutorepeat:NO];
+ [fieldInfoConsumedCPU setStringValue:"--" + @" %"];
@primalmotion Owner

what is that?

Why not simply [fieldInfoConsumedCPU setStringValue:"..."]; ?

@CyrilPeponnet Owner

Just a useless concatenation of two string :p I'll fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ent/archipel-agent/archipel/archipelVirtualMachine.py
@@ -672,6 +678,30 @@ def screenshot(self, thumbnail=True):
return (data, size)
return (None, (0, 0))
+ def cputime_sampling_Timer(self,Interval):
+ """
+ Create a threaded timer to take timestamp,cputime samples from actual domain
+ """
+ Timer(Interval, self.cputime_sampling_Timer,[Interval]).start()
+ if self.domain and not self.is_freeing:
+ self.cputime_samples.insert(0,(time.time(),self.domain.info()[4]))
@primalmotion Owner

Style. spaces between operators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@primalmotion

seems nice. Please fix stuff in my comments, I'll merge it in after.

Thanks!

@CyrilPeponnet

Should be ok now :)

@primalmotion primalmotion merged commit 50c641a into from
@primalmotion

merged. Thanks!

@CyrilPeponnet CyrilPeponnet deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 27, 2013
  1. @CyrilPeponnet
  2. @CyrilPeponnet
  3. @CyrilPeponnet
  4. @CyrilPeponnet
  5. @CyrilPeponnet
  6. @CyrilPeponnet
Commits on Jan 28, 2013
  1. @CyrilPeponnet

    Fix #617 and Final PR for #613

    CyrilPeponnet authored
Commits on Jan 29, 2013
  1. @CyrilPeponnet
  2. @CyrilPeponnet
  3. @CyrilPeponnet

    Use a threaded timer to sample cputime

    CyrilPeponnet authored
    More accuracy is needed... for the next commit :)
Commits on Jan 30, 2013
  1. @CyrilPeponnet
  2. @CyrilPeponnet

    Take sample as tuple (timestamp,cputime) to be more precise when comp…

    CyrilPeponnet authored
    …uting
    
    The threaded timer is not very precised in time so we must take the
    timestamp when sampling cputime from domain (I could also be reused
    later to have a stat database for domains).
  3. @CyrilPeponnet

    Destroy the CPtimer once triggered, no REPEAT

    CyrilPeponnet authored
    The CPTimer for CPUusage will be created if there is no current timer
    running. We also delete the current timer once the xmpp callback have
    been sent.
Commits on Jan 31, 2013
  1. @CyrilPeponnet
This page is out of date. Refresh to see the latest.
View
56 ArchipelAgent/archipel-agent/archipel/archipelHypervisor.py
@@ -59,6 +59,7 @@
ARCHIPEL_ERROR_CODE_HYPERVISOR_UNMANAGE = -9011
ARCHIPEL_ERROR_CODE_HYPERVISOR_MIGRATION_INFO = -9012
ARCHIPEL_ERROR_CODE_HYPERVISOR_SET_ORG_INFO = -9013
+ARCHIPEL_ERROR_CODE_HYPERVISOR_NODE_INFO = -9014
# Namespace
ARCHIPEL_NS_HYPERVISOR_CONTROL = "archipel:hypervisor:control"
@@ -196,7 +197,8 @@ def __init__(self, jid, password, configuration, name, database_file="./database
self.log.warning("Your hypervisor doesn't support libvirt eventing. Using fake event loop.")
self.capabilities = self.get_capabilities()
-
+ self.nodeinfo = self.get_nodeinfo()
+
# action on auth
self.register_hook("HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED", method=self.manage_vcard_hook)
self.register_hook("HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED", method=self.wake_up_virtual_machines_hook, oneshot=True)
@@ -292,6 +294,11 @@ def init_vocabulary(self):
"method": self.message_capabilities,
"permissions": ["capabilities"],
"description": "Get my libvirt capabilities" },
+ { "commands" : ["nodeinfo"],
+ "parameters": [],
+ "method": self.message_nodeinfo,
+ "permissions": ["nodeinfo"],
+ "description": "Get my node informations" },
{ "commands" : ["libvirt uri", "migration info"],
"parameters": [],
"method": self.message_migration_info,
@@ -338,6 +345,7 @@ def init_permissions(self):
self.permission_center.create_permission("ip", "Authorizes users to get hypervisor's IP address", False)
self.permission_center.create_permission("migrationinfo", "Authorizes users to get the migration informations", False)
self.permission_center.create_permission("capabilities", "Authorizes users to access the hypervisor capabilities", False)
+ self.permission_center.create_permission("nodeinfo", "Authorizes users to access the hypervisor Node Information", False)
self.permission_center.create_permission("manage", "Authorizes users make Archipel able to manage external virtual machines", False)
self.permission_center.create_permission("unmanage", "Authorizes users to make Archipel able to unmanage virtual machines", False)
self.permission_center.create_permission("setorginfo", "Authorizes users to change VM Organization information of virtual machines", False)
@@ -484,6 +492,7 @@ def process_iq(self, conn, iq):
- ip
- uri
- capabilities
+ - nodeinfo
- manage
- unmanage
- setorginfo
@@ -515,6 +524,8 @@ def process_iq(self, conn, iq):
reply = self.iq_migration_info(iq)
elif action == "capabilities":
reply = self.iq_capabilities(iq)
+ elif action == "nodeinfo":
+ reply = self.iq_nodeinfo(iq)
elif action == "manage":
reply = self.iq_manage(iq)
elif action == "unmanage":
@@ -733,6 +744,21 @@ def get_capabilities(self):
"""
capp = xmpp.simplexml.NodeBuilder(data=self.libvirt_connection.getCapabilities()).getDom()
return capp
+
+ def get_nodeinfo(self):
+ """
+ Retur hypervisor's node informations
+ """
+ nodeinfo = self.libvirt_connection.getInfo()
+ return {
+ "model": nodeinfo[0],
+ "memory": nodeinfo[1],
+ "nrCPU": nodeinfo[2],
+ "mHzCPU": nodeinfo[3],
+ "nrNumaNodes": nodeinfo[4],
+ "nrSockets": nodeinfo[5],
+ "nrCoreperSocket": nodeinfo[6],
+ "nrThreadperCore": nodeinfo[7]}
def migration_info(self):
"""
@@ -1069,6 +1095,34 @@ def message_capabilities(self, msg):
except Exception as ex:
return build_error_message(self, ex, msg)
+ def iq_nodeinfo(self, iq):
+ """
+ Send the hypervisor node informations.
+ @type iq: xmpp.Protocol.Iq
+ @param iq: the sender request IQ
+ @rtype: xmpp.Protocol.Iq
+ @return: a ready-to-send IQ containing the results
+ """
+ try:
+ reply = iq.buildReply("result")
+ reply.setQueryPayload(self.nodeinfo)
+ except Exception as ex:
+ reply = build_error_iq(self, ex, iq, ARCHIPEL_ERROR_CODE_HYPERVISOR_NODE_INFO)
+ return reply
+
+ def message_nodeinfo(self, msg):
+ """
+ Process the node info message request.
+ @type msg: xmpp.Protocol.Message
+ @param msg: the received message
+ @rtype: xmpp.Protocol.Message
+ @return: a ready to send Message containing the result of the action
+ """
+ try:
+ return "I have %d CPU(s) model %s with %d core(s) each running at %d MHz, I own %d MB of Memory." % (self.nodeinfo['nrSockets'],self.nodeinfo['model'],self.nodeinfo['nrCoreperSocket'],self.nodeinfo['mHzCPU'],self.nodeinfo['memory'])
+ except Exception as ex:
+ return build_error_message(self, ex, msg)
+
def iq_manage(self, iq):
"""
Manage an existing libvirt virtual machine
View
50 ArchipelAgent/archipel-agent/archipel/archipelVirtualMachine.py
@@ -41,6 +41,7 @@
import xmpp
import tempfile
import base64
+import time
from threading import Timer
from archipelcore.archipelAvatarControllableEntity import TNAvatarControllableEntity
@@ -73,6 +74,7 @@
ARCHIPEL_ERROR_CODE_VM_HYPERVISOR_CAPABILITIES = -1019
ARCHIPEL_ERROR_CODE_VM_FREE = -1020
ARCHIPEL_ERROR_CODE_VM_SCREENSHOT = -1021
+ARCHIPEL_ERROR_CODE_VM_HYPERVISOR_NODE_INFO = -1022
ARCHIPEL_ERROR_CODE_VM_MIGRATING = -43
ARCHIPEL_NS_VM_CONTROL = "archipel:vm:control"
@@ -119,6 +121,9 @@ def __init__(self, jid, password, hypervisor, configuration, name, organizationI
self.vm_will_define_hooks = []
self.vcard_infos = {}
self.is_freeing = False
+ self.cputime_samples=[]
+ self.cputime_sampling_Interval = 2.0
+ self.cputime_sampling_timer(self.cputime_sampling_Interval)
if self.configuration.has_option("VIRTUALMACHINE", "vm_perm_path"):
self.vm_perm_base_path = self.configuration.get("VIRTUALMACHINE", "vm_perm_path")
@@ -278,6 +283,7 @@ def init_permissions(self):
self.permission_center.create_permission("define", "Authorizes users to define virtual machine", False)
self.permission_center.create_permission("undefine", "Authorizes users to undefine virtual machine", False)
self.permission_center.create_permission("capabilities", "Authorizes users to access virtual machine's hypervisor capabilities", False)
+ self.permission_center.create_permission("nodeinfo", "Authorizes users to access virtual machine's hypervisor node informations", False)
self.permission_center.create_permission("free", "Authorizes users completly destroy the virtual machine", False)
def add_vm_definition_hook(self, method):
@@ -672,6 +678,30 @@ def screenshot(self, thumbnail=True):
return (data, size)
return (None, (0, 0))
+ def cputime_sampling_timer(self,Interval):
+ """
+ Create a threaded timer to take timestamp,cputime samples from actual domain
+ """
+ Timer(Interval, self.cputime_sampling_timer, [Interval]).start()
+ if self.domain and not self.is_freeing:
+ self.cputime_samples.insert(0, (time.time(), self.domain.info()[4]))
+ if len(self.cputime_samples) > 2:
+ self.cputime_samples.pop()
+
+ def compute_cpu_usage(self):
+ """
+ Return the vm CPU usage in percent between two samples
+ """
+ try:
+ prtCPU = 100 * (self.cputime_samples[0][1] - self.cputime_samples[1][1]) / ((self.cputime_samples[0][0] - self.cputime_samples[1][0]) * self.hypervisor.get_nodeinfo()['nrCoreperSocket'] * 1000000000)
+ except:
+ prtCPU = 0
+
+ if prtCPU > 0:
+ return prtCPU
+ else:
+ return 0
+
def info(self):
"""
Return info of a domain.
@@ -690,7 +720,7 @@ def info(self):
"maxMem": dominfo[1],
"memory": dominfo[2],
"nrVirtCpu": dominfo[3],
- "cpuTime": dominfo[4],
+ "cpuPrct": self.compute_cpu_usage(),
"hypervisor": self.hypervisor.jid,
"autostart": str(autostart)}
@@ -1260,12 +1290,11 @@ def message_info(self, msg):
states = ("no state", "running", "blocked", "paused", "shutdown", "shut off", "crashed")
state = states[i["state"]]
mem = int(i["memory"]) / 1024
- time = int(i["cpuTime"]) / 1000000000
if i["nrVirtCpu"] < 2:
cpuorth = "CPU"
else:
cpuorth = "CPUs"
- return "I'm in state %s, I use %d MB of memory. I've got %d %s and I've consumed %d second(s) of my hypervisor (%s)." % (state, mem, i["nrVirtCpu"], cpuorth, time, i["hypervisor"])
+ return "I'm in state %s, I use %d MB of memory. I've got %d %s and I'm consuming %d percent(s) of my allocated ressources on %s." % (state, mem, i["nrVirtCpu"], cpuorth, i["cpuPrct"], i["hypervisor"])
except Exception as ex:
return build_error_message(self, ex, msg)
@@ -1464,6 +1493,21 @@ def iq_capabilities(self, iq):
reply = build_error_iq(self, ex, iq, ARCHIPEL_ERROR_CODE_VM_HYPERVISOR_CAPABILITIES)
return reply
+ def iq_nodeinfo(self, iq):
+ """
+ Send the virtual machine's hypervisor node informations.
+ @type iq: xmpp.Protocol.Iq
+ @param iq: the sender request IQ
+ @rtype: xmpp.Protocol.Iq
+ @return: a ready-to-send IQ containing the results
+ """
+ try:
+ reply = iq.buildReply("result")
+ reply.setQueryPayload([self.hypervisor.nodeinfo])
+ except Exception as ex:
+ reply = build_error_iq(self, ex, iq, ARCHIPEL_ERROR_CODE_VM_HYPERVISOR_NODE_INFO)
+ return reply
+
def message_insult(self, msg):
"""
Handle insulting message.
View
2  ArchipelClient/ModulesSources/VirtualMachineControls/Info.plist
@@ -41,6 +41,8 @@
<integer>255</integer>
<key>TNArchipelControlsScreenshotRefresh</key>
<integer>10</integer>
+ <key>TNArchipelControlsCpuUsageRefresh</key>
+ <integer>5</integer>
<key>UseModuleMenu</key>
<integer>1</integer>
</dict>
View
6 ArchipelClient/ModulesSources/VirtualMachineControls/Resources/en.lproj/VirtualMachineControls.cib
3 additions, 3 deletions not shown
View
493 ArchipelClient/ModulesSources/VirtualMachineControls/Resources/en.lproj/VirtualMachineControls.xib
@@ -2,10 +2,10 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1080</int>
- <string key="IBDocument.SystemVersion">12D54</string>
+ <string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
- <string key="IBDocument.AppKitVersion">1187.37</string>
- <string key="IBDocument.HIToolboxVersion">626.00</string>
+ <string key="IBDocument.AppKitVersion">1187.34</string>
+ <string key="IBDocument.HIToolboxVersion">625.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">2844</string>
@@ -55,7 +55,7 @@
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomView" id="1005">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -74,6 +74,7 @@
<int key="NSvFlags">269</int>
<string key="NSFrame">{{239, 43}, {228, 28}}</string>
<reference key="NSSuperview" ref="513997119"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="264328598"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="592903924">
@@ -113,6 +114,7 @@ dCBhbmQgYWxsIGl0cyBkYXRhLg</string>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{239, 79}, {168, 20}}</string>
<reference key="NSSuperview" ref="513997119"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="432119258"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="464710419">
@@ -135,6 +137,7 @@ dCBhbmQgYWxsIGl0cyBkYXRhLg</string>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{352, 7}, {118, 32}}</string>
<reference key="NSSuperview" ref="513997119"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="473878697">
<int key="NSCellFlags">-2080374784</int>
@@ -161,6 +164,7 @@ dCBhbmQgYWxsIGl0cyBkYXRhLg</string>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{12, 43}, {208, 28}}</string>
<reference key="NSSuperview" ref="513997119"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="44569652"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="877018181">
@@ -180,6 +184,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{12, 79}, {171, 20}}</string>
<reference key="NSSuperview" ref="513997119"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="157554892"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="250171609">
@@ -198,6 +203,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{105, 7}, {118, 32}}</string>
<reference key="NSSuperview" ref="513997119"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="683077610"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="990808913">
@@ -219,12 +225,14 @@ IHBhcmsuA</string>
</object>
<string key="NSFrame">{{1, 1}, {479, 114}}</string>
<reference key="NSSuperview" ref="871356984"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="317960155"/>
<string key="NSReuseIdentifierKey">_NS:21</string>
</object>
</object>
<string key="NSFrame">{{261, 39}, {481, 116}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="513997119"/>
<string key="NSReuseIdentifierKey">_NS:18</string>
<string key="NSOffsets">{0, 0}</string>
@@ -266,6 +274,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{259, 163}, {485, 18}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="871356984"/>
<string key="NSReuseIdentifierKey">_NS:771</string>
<bool key="NSEnabled">YES</bool>
@@ -297,6 +306,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{20, 498}, {216, 162}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="163596273"/>
<string key="NSReuseIdentifierKey">_NS:499</string>
<string key="NSClassName">NSButton</string>
@@ -306,6 +316,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{266, 339}, {472, 38}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="743849093"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="182903603">
@@ -331,6 +342,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">265</int>
<string key="NSFrame">{{777, 419}, {207, 22}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="911079387"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSearchFieldCell" key="NSCell" id="1016342060">
@@ -409,6 +421,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{964, 96}</string>
<reference key="NSSuperview" ref="724696483"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="186012459"/>
<string key="NSReuseIdentifierKey">_NS:1197</string>
<bool key="NSEnabled">YES</bool>
@@ -419,6 +432,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{964, 17}</string>
<reference key="NSSuperview" ref="186012459"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="724696483"/>
<string key="NSReuseIdentifierKey">_NS:1199</string>
<reference key="NSTableView" ref="262603946"/>
@@ -528,6 +542,7 @@ IHBhcmsuA</string>
</object>
<string key="NSFrame">{{0, 17}, {964, 96}}</string>
<reference key="NSSuperview" ref="995159657"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="262603946"/>
<string key="NSReuseIdentifierKey">_NS:1195</string>
<reference key="NSDocView" ref="262603946"/>
@@ -539,6 +554,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{224, 17}, {15, 102}}</string>
<reference key="NSSuperview" ref="995159657"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="868848856"/>
<string key="NSReuseIdentifierKey">_NS:1214</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
@@ -552,6 +568,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{1, 119}, {223, 15}}</string>
<reference key="NSSuperview" ref="995159657"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="597178269"/>
<string key="NSReuseIdentifierKey">_NS:1216</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
@@ -569,6 +586,7 @@ IHBhcmsuA</string>
</object>
<string key="NSFrameSize">{964, 17}</string>
<reference key="NSSuperview" ref="995159657"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="666955799"/>
<string key="NSReuseIdentifierKey">_NS:1200</string>
<reference key="NSDocView" ref="666955799"/>
@@ -578,6 +596,7 @@ IHBhcmsuA</string>
</object>
<string key="NSFrame">{{0, 24}, {964, 113}}</string>
<reference key="NSSuperview" ref="911079387"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="724696483"/>
<string key="NSReuseIdentifierKey">_NS:1193</string>
<int key="NSsFlags">133680</int>
@@ -595,12 +614,14 @@ IHBhcmsuA</string>
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{964, 26}</string>
<reference key="NSSuperview" ref="911079387"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="810005415"/>
<string key="NSClassName">CPButtonBar</string>
</object>
</object>
<string key="NSFrame">{{20, 274}, {964, 137}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="995159657"/>
<string key="NSClassName">NSView</string>
</object>
@@ -609,6 +630,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{332, 495}, {491, 24}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="56684550"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSegmentedCell" key="NSCell" id="390272215">
@@ -649,6 +671,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{454, 543.5}, {28, 13}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="439646841"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="152692372">
@@ -674,6 +697,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{366, 543.5}, {22, 13}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="538964662"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="808002002">
@@ -695,6 +719,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{386, 541}, {65, 21}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="408701074"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSliderCell" key="NSCell" id="454960474">
@@ -718,6 +743,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{610, 589.5}, {77, 26}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="146402377"/>
<string key="NSClassName">TNTextFieldStepper</string>
</object>
@@ -726,6 +752,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{608, 563}, {77, 24}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="99166188"/>
<string key="NSClassName">TNSwitch</string>
</object>
@@ -734,6 +761,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{828, 591}, {77, 24}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="842116646"/>
<string key="NSClassName">TNSwitch</string>
</object>
@@ -754,6 +782,7 @@ IHBhcmsuA</string>
</object>
<string key="NSFrame">{{365, 595}, {16, 16}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="291882641"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="864971501">
@@ -772,6 +801,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{607, 540.5}, {70, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="929790345"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="536064131">
@@ -790,6 +820,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{727, 542}, {97, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="793795978"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="291367199">
@@ -812,12 +843,13 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{512, 542}, {94, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="177118566"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="927264158">
<int key="NSCellFlags">68157504</int>
<int key="NSCellFlags2">4195328</int>
- <string key="NSContents">CPU time</string>
+ <string key="NSContents">CPU Usage</string>
<reference key="NSSupport" ref="672023766"/>
<reference key="NSControlView" ref="439646841"/>
<reference key="NSBackgroundColor" ref="977635433"/>
@@ -830,6 +862,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{253, 542}, {111, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="818389727"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="703772102">
@@ -848,6 +881,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{826, 540.5}, {70, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="737200575"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="335628228">
@@ -866,6 +900,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{826, 566.5}, {70, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="243192778"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="501840815">
@@ -884,6 +919,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 203.5}, {567, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="612616559"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="449018482">
@@ -902,6 +938,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 421}, {336, 20}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="321440825"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="571330099">
@@ -920,6 +957,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{366, 566.5}, {117, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="655263251"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="690227132">
@@ -938,6 +976,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{384, 592.5}, {96, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="755319072"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="962012248">
@@ -956,6 +995,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{727, 568}, {97, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1017003443"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="820265566">
@@ -974,6 +1014,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{727, 594}, {97, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="976703076"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="381486333">
@@ -992,6 +1033,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{512, 568}, {94, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="132443003"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="306749996">
@@ -1010,6 +1052,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{512, 594}, {94, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="425424343"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1051091884">
@@ -1028,6 +1071,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{253, 568}, {111, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="189844766"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="28980129">
@@ -1046,6 +1090,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{253, 594}, {111, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="500137522"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="359778743">
@@ -1064,6 +1109,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 230}, {235, 26}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1020715076"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="118943805">
@@ -1089,6 +1135,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 449}, {138, 26}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="842917504"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="788143245">
@@ -1110,6 +1157,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{253, 634}, {297, 26}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="906035852"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="34089441">
@@ -1128,30 +1176,33 @@ IHBhcmsuA</string>
</object>
</object>
<string key="NSFrameSize">{1003, 680}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1022529771"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="802415413">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">269</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTextField" id="525034696">
+ <object class="NSTextField" id="690994870">
<reference key="NSNextResponder" ref="802415413"/>
<int key="NSvFlags">269</int>
- <string key="NSFrame">{{205, 60}, {238, 22}}</string>
+ <string key="NSFrame">{{205, 30}, {238, 22}}</string>
<reference key="NSSuperview" ref="802415413"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="648170055">
+ <object class="NSTextFieldCell" key="NSCell" id="244612565">
<int key="NSCellFlags">-1804599231</int>
<int key="NSCellFlags2">268436480</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="986145391"/>
- <string key="NSPlaceholderString">Delay between screenshots</string>
- <reference key="NSControlView" ref="525034696"/>
+ <string key="NSPlaceholderString">Delay between CPU Usage</string>
+ <reference key="NSControlView" ref="690994870"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="20554231"/>
- <object class="NSColor" key="NSTextColor">
+ <object class="NSColor" key="NSTextColor" id="415698394">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textColor</string>
@@ -1160,11 +1211,51 @@ IHBhcmsuA</string>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
+ <object class="NSTextField" id="312948039">
+ <reference key="NSNextResponder" ref="802415413"/>
+ <int key="NSvFlags">269</int>
+ <string key="NSFrame">{{37, 33}, {163, 17}}</string>
+ <reference key="NSSuperview" ref="802415413"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="690994870"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="406398470">
+ <int key="NSCellFlags">68157504</int>
+ <int key="NSCellFlags2">71304192</int>
+ <string key="NSContents">CPU Usage refresh time</string>
+ <reference key="NSSupport" ref="672023766"/>
+ <reference key="NSControlView" ref="312948039"/>
+ <reference key="NSBackgroundColor" ref="977635433"/>
+ <reference key="NSTextColor" ref="96033734"/>
+ </object>
+ <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
+ </object>
+ <object class="NSTextField" id="525034696">
+ <reference key="NSNextResponder" ref="802415413"/>
+ <int key="NSvFlags">269</int>
+ <string key="NSFrame">{{205, 60}, {238, 22}}</string>
+ <reference key="NSSuperview" ref="802415413"/>
+ <reference key="NSWindow"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="648170055">
+ <int key="NSCellFlags">-1804599231</int>
+ <int key="NSCellFlags2">268436480</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="986145391"/>
+ <string key="NSPlaceholderString">Delay between screenshots</string>
+ <reference key="NSControlView" ref="525034696"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <reference key="NSBackgroundColor" ref="20554231"/>
+ <reference key="NSTextColor" ref="415698394"/>
+ </object>
+ <bool key="NSAllowsLogicalLayoutDirection">NO</bool>
+ </object>
<object class="NSTextField" id="954345060">
<reference key="NSNextResponder" ref="802415413"/>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{35, 63}, {165, 17}}</string>
<reference key="NSSuperview" ref="802415413"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="525034696"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="248660292">
@@ -1183,6 +1274,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 106}, {429, 20}}</string>
<reference key="NSSuperview" ref="802415413"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="954345060"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="276652982">
@@ -1201,6 +1293,7 @@ IHBhcmsuA</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 134}, {347, 26}}</string>
<reference key="NSSuperview" ref="802415413"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="116586965"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="577335055">
@@ -1219,6 +1312,8 @@ IHBhcmsuA</string>
</object>
</object>
<string key="NSFrameSize">{462, 180}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="310715739"/>
<string key="NSClassName">NSView</string>
</object>
@@ -1567,6 +1662,14 @@ IHBhcmsuA</string>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
+ <string key="label">fieldPreferencesCpuUsageRefresh</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="690994870"/>
+ </object>
+ <int key="connectionID">221</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="709368042"/>
<reference key="destination" ref="641263015"/>
@@ -2041,6 +2144,8 @@ IHBhcmsuA</string>
<reference ref="116586965"/>
<reference ref="954345060"/>
<reference ref="525034696"/>
+ <reference ref="312948039"/>
+ <reference ref="690994870"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -2362,6 +2467,34 @@ IHBhcmsuA</string>
<reference key="object" ref="835113995"/>
<reference key="parent" ref="641263015"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">217</int>
+ <reference key="object" ref="312948039"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="406398470"/>
+ </object>
+ <reference key="parent" ref="802415413"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">220</int>
+ <reference key="object" ref="406398470"/>
+ <reference key="parent" ref="312948039"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">218</int>
+ <reference key="object" ref="690994870"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="244612565"/>
+ </object>
+ <reference key="parent" ref="802415413"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">219</int>
+ <reference key="object" ref="244612565"/>
+ <reference key="parent" ref="690994870"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -2421,6 +2554,11 @@ IHBhcmsuA</string>
<string>204.IBPluginDependency</string>
<string>206.IBPluginDependency</string>
<string>207.IBPluginDependency</string>
+ <string>217.IBPluginDependency</string>
+ <string>218.IBAttributePlaceholdersKey</string>
+ <string>218.IBPluginDependency</string>
+ <string>219.IBPluginDependency</string>
+ <string>220.IBPluginDependency</string>
<string>23.IBPluginDependency</string>
<string>24.IBPluginDependency</string>
<string>26.IBPluginDependency</string>
@@ -2560,6 +2698,18 @@ IHBhcmsuA</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSMutableDictionary">
+ <string key="NS.key.0">ToolTip</string>
+ <object class="IBToolTipAttribute" key="NS.object.0">
+ <string key="name">ToolTip</string>
+ <reference key="object" ref="690994870"/>
+ <string key="toolTip">Delay before polling new CPU usage</string>
+ </object>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -2669,7 +2819,7 @@ IHBhcmsuA</string>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">216</int>
+ <int key="maxID">221</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -2682,6 +2832,323 @@ IHBhcmsuA</string>
<string key="minorKey">./Classes/TNSwitch.h</string>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">TNVirtualMachineControlsController</string>
+ <string key="superclassName">TNModule</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>destroy:</string>
+ <string>free:</string>
+ <string>manageAdvancedControls:</string>
+ <string>migrate:</string>
+ <string>openFullScreenshotWindow:</string>
+ <string>park:</string>
+ <string>pause:</string>
+ <string>play:</string>
+ <string>reboot:</string>
+ <string>segmentedControlClicked:</string>
+ <string>setAutostart:</string>
+ <string>setMemory:</string>
+ <string>setPreventOOMKiller:</string>
+ <string>setVCPUs:</string>
+ <string>stop:</string>
+ </object>
+ <object class="NSArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>destroy:</string>
+ <string>free:</string>
+ <string>manageAdvancedControls:</string>
+ <string>migrate:</string>
+ <string>openFullScreenshotWindow:</string>
+ <string>park:</string>
+ <string>pause:</string>
+ <string>play:</string>
+ <string>reboot:</string>
+ <string>segmentedControlClicked:</string>
+ <string>setAutostart:</string>
+ <string>setMemory:</string>
+ <string>setPreventOOMKiller:</string>
+ <string>setVCPUs:</string>
+ <string>stop:</string>
+ </object>
+ <object class="NSArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">destroy:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">free:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">manageAdvancedControls:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">migrate:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">openFullScreenshotWindow:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">park:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">pause:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">play:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">reboot:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">segmentedControlClicked:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">setAutostart:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">setMemory:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">setPreventOOMKiller:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">setVCPUs:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">stop:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>boxAdvancedCommands</string>
+ <string>buttonBarMigration</string>
+ <string>buttonBarTransport</string>
+ <string>buttonKill</string>
+ <string>buttonPark</string>
+ <string>buttonScreenshot</string>
+ <string>checkBoxAdvancedCommands</string>
+ <string>fieldInfoConsumedCPU</string>
+ <string>fieldInfoMem</string>
+ <string>fieldInfoState</string>
+ <string>fieldOOMAdjust</string>
+ <string>fieldOOMScore</string>
+ <string>fieldPreferencesCpuUsageRefresh</string>
+ <string>fieldPreferencesScreenshotRefresh</string>
+ <string>filterHypervisors</string>
+ <string>imageState</string>
+ <string>imageViewFullScreenshot</string>
+ <string>popoverWindowScreenshot</string>
+ <string>sliderMemory</string>
+ <string>stepperCPU</string>
+ <string>switchAutoStart</string>
+ <string>switchPreventOOMKiller</string>
+ <string>tableHypervisors</string>
+ <string>viewTableHypervisorsContainer</string>
+ </object>
+ <object class="NSArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSBox</string>
+ <string>CPButtonBar</string>
+ <string>NSSegmentedControl</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
+ <string>CPCheckBox</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSSearchField</string>
+ <string>NSImageView</string>
+ <string>NSImageView</string>
+ <string>NSPopover</string>
+ <string>NSSlider</string>
+ <string>TNTextFieldStepper</string>
+ <string>TNSwitch</string>
+ <string>TNSwitch</string>
+ <string>NSTableView</string>
+ <string>NSView</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>boxAdvancedCommands</string>
+ <string>buttonBarMigration</string>
+ <string>buttonBarTransport</string>
+ <string>buttonKill</string>
+ <string>buttonPark</string>
+ <string>buttonScreenshot</string>
+ <string>checkBoxAdvancedCommands</string>
+ <string>fieldInfoConsumedCPU</string>
+ <string>fieldInfoMem</string>
+ <string>fieldInfoState</string>
+ <string>fieldOOMAdjust</string>
+ <string>fieldOOMScore</string>
+ <string>fieldPreferencesCpuUsageRefresh</string>
+ <string>fieldPreferencesScreenshotRefresh</string>
+ <string>filterHypervisors</string>
+ <string>imageState</string>
+ <string>imageViewFullScreenshot</string>
+ <string>popoverWindowScreenshot</string>
+ <string>sliderMemory</string>
+ <string>stepperCPU</string>
+ <string>switchAutoStart</string>
+ <string>switchPreventOOMKiller</string>
+ <string>tableHypervisors</string>
+ <string>viewTableHypervisorsContainer</string>
+ </object>
+ <object class="NSArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">boxAdvancedCommands</string>
+ <string key="candidateClassName">NSBox</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">buttonBarMigration</string>
+ <string key="candidateClassName">CPButtonBar</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">buttonBarTransport</string>
+ <string key="candidateClassName">NSSegmentedControl</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">buttonKill</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">buttonPark</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">buttonScreenshot</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">checkBoxAdvancedCommands</string>
+ <string key="candidateClassName">CPCheckBox</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fieldInfoConsumedCPU</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fieldInfoMem</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fieldInfoState</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fieldOOMAdjust</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fieldOOMScore</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fieldPreferencesCpuUsageRefresh</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fieldPreferencesScreenshotRefresh</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">filterHypervisors</string>
+ <string key="candidateClassName">NSSearchField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">imageState</string>
+ <string key="candidateClassName">NSImageView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">imageViewFullScreenshot</string>
+ <string key="candidateClassName">NSImageView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">popoverWindowScreenshot</string>
+ <string key="candidateClassName">NSPopover</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">sliderMemory</string>
+ <string key="candidateClassName">NSSlider</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">stepperCPU</string>
+ <string key="candidateClassName">TNTextFieldStepper</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">switchAutoStart</string>
+ <string key="candidateClassName">TNSwitch</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">switchPreventOOMKiller</string>
+ <string key="candidateClassName">TNSwitch</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tableHypervisors</string>
+ <string key="candidateClassName">NSTableView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">viewTableHypervisorsContainer</string>
+ <string key="candidateClassName">NSView</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/TNVirtualMachineControlsController.h</string>
+ </object>
+ </object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
View
43 ArchipelClient/ModulesSources/VirtualMachineControls/TNVirtualMachineControlsController.j
@@ -114,6 +114,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
@outlet CPTextField fieldInfoState;
@outlet CPTextField fieldOOMAdjust;
@outlet CPTextField fieldOOMScore;
+ @outlet CPTextField fieldPreferencesCpuUsageRefresh;
@outlet CPTextField fieldPreferencesScreenshotRefresh;
@outlet CPView viewTableHypervisorsContainer;
@outlet TNSwitch switchAutoStart;
@@ -130,6 +131,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
CPImage _imageStop;
CPNumber _VMLibvirtStatus;
CPString _currentHypervisorJID;
+ CPTimer _cpuUsageTimer;
CPTimer _screenshotTimer;
TNStropheContact _virtualMachineToFree;
TNTableViewDataSource _datasourceHypervisors;
@@ -148,6 +150,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
// register defaults defaults
[defaults registerDefaults:[CPDictionary dictionaryWithObjectsAndKeys:
+ [bundle objectForInfoDictionaryKey:@"TNArchipelControlsCpuUsageRefresh"], @"TNArchipelControlsCpuUsageRefresh",
[bundle objectForInfoDictionaryKey:@"TNArchipelControlsMaxVCPUs"], @"TNArchipelControlsMaxVCPUs",
[bundle objectForInfoDictionaryKey:@"TNArchipelControlsScreenshotRefresh"], @"TNArchipelControlsScreenshotRefresh"
]];
@@ -161,6 +164,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
[stepperCPU setMaxValue:[defaults integerForKey:@"TNArchipelControlsMaxVCPUs"]];
[stepperCPU setValueWraps:NO];
[stepperCPU setAutorepeat:NO];
+ [fieldInfoConsumedCPU setStringValue:"..."];
_imagePlay = [[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"IconsButtons/play.png"] size:CGSizeMake(16, 16)];
_imageStop = [[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"IconsButtons/stop.png"] size:CGSizeMake(16, 16)];
@@ -274,6 +278,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
return NO;
_screenshotTimer = nil;
+ _cpuUsageTimer = nil;
[self checkIfRunning];
[buttonScreenshot setImage:_imageScreenShutDown];
@@ -304,6 +309,11 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
if (_screenshotTimer)
[_screenshotTimer invalidate];
_screenshotTimer = nil;
+
+ if (_cpuUsageTimer)
+ [_cpuUsageTimer invalidate];
+ _cpuUsageTimer = nil;
+
[buttonScreenshot setImage:_imageScreenShutDown];
[super willHide];
}
@@ -326,6 +336,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
var defaults = [CPUserDefaults standardUserDefaults];
[defaults setInteger:[fieldPreferencesScreenshotRefresh intValue] forKey:@"TNArchipelControlsScreenshotRefresh"];
+ [defaults setInteger:[fieldPreferencesCpuUsageRefresh intValue] forKey:@"TNArchipelControlsCpuUsageRefresh"];
}
/*! called when user gets preferences
@@ -335,6 +346,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
var defaults = [CPUserDefaults standardUserDefaults];
[fieldPreferencesScreenshotRefresh setIntValue:[defaults integerForKey:@"TNArchipelControlsScreenshotRefresh"]];
+ [fieldPreferencesCpuUsageRefresh setIntValue:[defaults integerForKey:@"TNArchipelControlsCpuUsageRefresh"]];
}
/*! called when user permissions changed
@@ -434,6 +446,13 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
}
}
+/*! proxy for CpuUsage timer
+*/
+- (void)getCpuUsage:(CPTimer)aTimer
+{
+ [self getVirtualMachineInfo];
+}
+
/*! proxy for screenshot timer
*/
- (void)getThumbnailScreenshot:(CPTimer)aTimer
@@ -755,6 +774,9 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
"action": TNArchipelTypeVirtualMachineControlInfo}];
[self sendStanza:stanza andRegisterSelector:@selector(_didReceiveVirtualMachineInfo:)];
+ if (_cpuUsageTimer)
+ [_cpuUsageTimer invalidate];
+ [_cpuUsageTimer = nil];
}
/*! compute virtual machine answer about its information
@@ -768,7 +790,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
defaults = [CPUserDefaults standardUserDefaults],
infoNode = [aStanza firstChildWithName:@"info"],
libvirtState = [infoNode valueForAttribute:@"state"],
- cpuTime = Math.round(parseInt([infoNode valueForAttribute:@"cpuTime"]) / 60000000000),
+ cpuPrct = parseInt([infoNode valueForAttribute:@"cpuPrct"]),
mem = parseFloat([infoNode valueForAttribute:@"memory"]),
maxMem = parseFloat([infoNode valueForAttribute:@"maxMem"]),
autostart = parseInt([infoNode valueForAttribute:@"autostart"]),
@@ -779,7 +801,7 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
[fieldInfoMem setTextColor:[CPColor blackColor]];
[fieldInfoMem setStringValue:parseInt(mem / 1024) + @" MB"];
- [fieldInfoConsumedCPU setStringValue:cpuTime + @" min"];
+ [fieldInfoConsumedCPU setStringValue:cpuPrct + @" %"];
[stepperCPU setDoubleValue:[nvCPUs intValue]];
@@ -792,6 +814,15 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
[self setControl:sliderMemory enabledAccordingToPermission:@"memory"];
[self setControl:stepperCPU enabledAccordingToPermission:@"setvcpus"];
+ if (!_cpuUsageTimer && [self isVisible])
+ {
+ _cpuUsageTimer = [CPTimer scheduledTimerWithTimeInterval:[defaults integerForKey:@"TNArchipelControlsCpuUsageRefresh"]
+ target:self
+ selector:@selector(getCpuUsage:)
+ userInfo:nil
+ repeats:NO];
+ }
+
if (!_screenshotTimer && [self isVisible])
{
[self getThumbnailScreenshot];
@@ -813,6 +844,9 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
if (_screenshotTimer)
[_screenshotTimer invalidate];
+ if (_cpuUsageTimer)
+ [_cpuUsageTimer invalidate];
+
[sliderMemory setEnabled:NO];
[sliderMemory setMinValue:0];
[sliderMemory setMaxValue:100];
@@ -1130,6 +1164,11 @@ var TNArchipelPushNotificationDefinition = @"archipel:push:virtualmac
[_screenshotTimer invalidate];
_screenshotTimer = nil;
}
+ if (_cpuUsageTimer)
+ {
+ [_cpuUsageTimer invalidate];
+ _cpuUsageTimer = nil;
+ }
[[TNGrowlCenter defaultCenter] pushNotificationWithTitle:[_entity nickname]
message:CPBundleLocalizedString(@"Virtual machine has been destroyed.", @"Virtual machine has been destroyed.")];
}
Something went wrong with that request. Please try again.