ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/HostDisplayPanel.java
Revision: 1.48
Committed: Thu Mar 6 12:15:52 2003 UTC (21 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.47: +130 -25 lines
Log Message:
Bring Conient in line with new ihost changes.

Most obvious change is the addition of a new data component for
looking at IO statistics. It looks after two attributes and displays
them next to each other. Nothing fancy really, but is suitable for
paging, networking, and diskio.

Used this new IO data component to implement the above mentioned
new data types, and altered the existing disk and memory items
because of a change in the unit size.

Finally, altered the "time till next packet" counter because it
wasn't very accurate - it never seemed to get to zero. It's clock
based now, so should be spot on. Also added a funky feature to make
it go red and grow in the wrong direction when an expected packet
doesn't arrive :-)

File Contents

# Content
1 /*
2 * i-scream central monitoring system
3 * http://www.i-scream.org.uk
4 * Copyright (C) 2000-2002 i-scream
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21 //---PACKAGE DECLARATION---
22 package uk.org.iscream.cms.conient;
23
24 //---IMPORTS---
25 import uk.org.iscream.cms.util.*;
26 import uk.org.iscream.cms.conient.datacomponents.*;
27 import java.util.HashMap;
28 import java.util.Set;
29 import java.util.Collections;
30 import java.util.Iterator;
31 import javax.swing.BoxLayout;
32 import javax.swing.JPanel;
33 import javax.swing.JProgressBar;
34 import javax.swing.JButton;
35 import javax.swing.JLabel;
36 import javax.swing.JFrame;
37 import javax.swing.Box;
38 import java.awt.event.*;
39 import java.awt.*;
40 import javax.swing.SwingUtilities;
41 import javax.swing.ImageIcon;
42
43 /**
44 * A HostDisplayPanel is simply a JPanel containing
45 * DataComponents which relate to various host
46 * attributes. Once created, it can be asked to
47 * update the data it displays by passing it an XML
48 * packet for the host it displaying for.
49 * This then updates all the DataComponents with the
50 * values in the packet.
51 *
52 * @author $Author: tdb $
53 * @version $Id: HostDisplayPanel.java,v 1.47 2003/02/25 22:14:20 tdb Exp $
54 */
55 public class HostDisplayPanel extends JPanel {
56
57 //---FINAL ATTRIBUTES---
58
59 /**
60 * The current CVS revision of this class
61 */
62 public final String REVISION = "$Revision: 1.47 $";
63
64 //---STATIC METHODS---
65
66 //---CONSTRUCTORS---
67
68 /**
69 * Creates a new Host Display Panel and adds
70 * all the appropriate DataComponents
71 */
72 public HostDisplayPanel(String hostName) {
73 super();
74
75 // set up the Panel
76 setLayout(new BorderLayout());
77 _hostName = hostName;
78
79 // check to config to see if we want extra data or not
80 if(Configuration.getInstance().getProperty("displayExtraData").equals("1")) {
81 _extraData = true;
82 }
83
84 GridBagLayout gridbag = new GridBagLayout();
85 GridBagConstraints c = new GridBagConstraints();
86 c.fill = GridBagConstraints.HORIZONTAL;
87 c.anchor = GridBagConstraints.NORTH;
88 c.weighty = 1.0;
89 _center.setLayout(gridbag);
90
91 JPanel centerHolder = new JPanel();
92 centerHolder.add(_center);
93 add(centerHolder, "Center");
94 add(_north, "North");
95
96 addDataComponent(new StringDataComponent("Packet Type", "packet.attributes.type"));
97
98 final StringDataComponent machineName = new StringDataComponent("Host Name", "packet.attributes.machine_name");
99 addDataComponent(machineName );
100 final StringDataComponent ip = new StringDataComponent("IP Address", "packet.attributes.ip");
101 addDataComponent(ip);
102 final UptimeDataComponent uptime = new UptimeDataComponent("Uptime", "packet.os.uptime");
103 addDataComponent(uptime);
104 final StringDataComponent seq_no = new StringDataComponent("Packets since host started", "packet.attributes.seq_no");
105 addDataComponent(seq_no);
106
107 final StringDataComponent osName = new StringDataComponent("Operating System", "packet.os.name");
108 addDataComponent(osName );
109 final StringDataComponent osVer = new StringDataComponent("Operating System Version", "packet.os.version");
110 addDataComponent(osVer);
111 final StringDataComponent osRelease = new StringDataComponent("Operating System Release", "packet.os.release");
112 addDataComponent(osRelease);
113 final StringDataComponent osSysName = new StringDataComponent("System Name", "packet.os.sysname");
114 addDataComponent(osSysName );
115 final StringDataComponent netbiosName = new StringDataComponent("NetBIOS Name", "packet.os.netbios_name");
116 addDataComponent(netbiosName );
117 final StringDataComponent osPlatform = new StringDataComponent("System Architecture", "packet.os.platform");
118 addDataComponent(osPlatform );
119
120 JButton info = new JButton("Platform Information");
121 info.addActionListener(new ActionListener() {
122 public void actionPerformed(ActionEvent e) {
123 final JFrame infoFrame = new JFrame("Host platform information for - " + _hostName);
124 Box content = Box.createVerticalBox();
125 content.add(machineName);
126 content.add(ip);
127 content.add(uptime);
128 content.add(seq_no);
129 content.add(osName);
130 content.add(osVer);
131 content.add(osRelease);
132 content.add(osSysName);
133 content.add(netbiosName);
134 content.add(osPlatform);
135 infoFrame.getContentPane().add(content, "Center");
136 JButton close = new JButton("Close Window");
137 close.addActionListener(new ActionListener() {
138 public void actionPerformed(ActionEvent e) {
139 infoFrame.dispose();
140 }
141 });
142 infoFrame.getContentPane().add(close, "South");
143 infoFrame.setIconImage((new ImageIcon(getClass().getResource("/resources/server.gif"))).getImage());
144 infoFrame.pack();
145 infoFrame.setVisible(true);
146 }
147 });
148 try {
149 _dataTimer = new PacketTimer("Next Data", Integer.parseInt(Configuration.getInstance().getServerProperty("Host." + hostName, "Host.UDPUpdateTime")));
150 } catch (NumberFormatException e) {
151 throw new NumberFormatException("unable to obtain a valid value for Host.UDPUpdateTime");
152 }
153 _north.setLayout(new GridLayout(3,1));
154 _north.add(new JLabel("Showing data from - " + hostName, JLabel.CENTER));
155 _north.add(_dataTimer);
156 _north.add(info);
157
158
159 JPanel date = new JPanel();
160 addVisibleDataComponent(date, new DateDataComponent("Host Time", "packet.attributes.date"));
161 c.gridy = 0;
162 gridbag.setConstraints(date, c);
163 _center.add(date);
164
165 // holder for labels
166 JLabel label;
167
168 label = new javax.swing.JLabel("--- CPU ---", JLabel.CENTER);
169 c.gridy = 1;
170 gridbag.setConstraints(label, c);
171 _center.add(label);
172
173 // add all the DataComponents that we know about
174 JPanel cpu = new JPanel();
175 cpu.setLayout(new BoxLayout(cpu, BoxLayout.Y_AXIS));
176 addVisibleDataComponent(cpu, new CPUDataComponent("CPU Idle", "packet.cpu.idle"));
177 addVisibleDataComponent(cpu, new CPUDataComponent("CPU User", "packet.cpu.user"));
178 addVisibleDataComponent(cpu, new CPUDataComponent("CPU Kernel", "packet.cpu.kernel"));
179 addVisibleDataComponent(cpu, new CPUDataComponent("CPU i/o wait", "packet.cpu.iowait"));
180 addVisibleDataComponent(cpu, new CPUDataComponent("CPU swapping", "packet.cpu.swap"));
181 c.gridy = 2;
182 gridbag.setConstraints(cpu, c);
183 _center.add(cpu);
184
185 label = new javax.swing.JLabel("--- Load ---", JLabel.CENTER);
186 c.gridy = 3;
187 gridbag.setConstraints(label, c);
188 _center.add(label);
189
190 Box loadData = Box.createHorizontalBox();
191 addVisibleDataComponent(loadData, new ProcessesDataComponent("1 minute", "packet.load.load1"));
192 addVisibleDataComponent(loadData, new ProcessesDataComponent("5 minutes", "packet.load.load5"));
193 addVisibleDataComponent(loadData, new ProcessesDataComponent("15 minutes", "packet.load.load15"));
194
195 c.gridy = 4;
196 gridbag.setConstraints(loadData, c);
197 _center.add(loadData);
198
199 label = new javax.swing.JLabel("--- Processes ---", JLabel.CENTER);
200 c.gridy = 5;
201 gridbag.setConstraints(label, c);
202 _center.add(label);
203
204 Box processesData = Box.createHorizontalBox();
205 addVisibleDataComponent(processesData, new ProcessesDataComponent("Total", "packet.processes.total"));
206 addVisibleDataComponent(processesData, new ProcessesDataComponent("Running", "packet.processes.cpu"));
207 addVisibleDataComponent(processesData, new ProcessesDataComponent("Sleeping", "packet.processes.sleeping"));
208 addVisibleDataComponent(processesData, new ProcessesDataComponent("Stopped", "packet.processes.stopped"));
209 addVisibleDataComponent(processesData, new ProcessesDataComponent("Zombie", "packet.processes.zombie"));
210 c.gridy = 6;
211 gridbag.setConstraints(processesData, c);
212 _center.add(processesData);
213
214 label = new javax.swing.JLabel("--- Memory ---", JLabel.CENTER);
215 c.gridy = 7;
216 gridbag.setConstraints(label, c);
217 _center.add(label);
218
219 // these next two are passed the non-visible datacomponents
220 JPanel memory = new JPanel();
221 memory.setLayout(new BoxLayout(memory, BoxLayout.Y_AXIS));
222 addVisibleDataComponent(memory, new StorageDataComponent("Memory in use", "packet.memory.free", "packet.memory.total", "Mb", 1024*1024));
223 addVisibleDataComponent(memory, new StorageDataComponent("Swap in use", "packet.swap.free", "packet.swap.total", "Mb", 1024*1024));
224 addVisibleDataComponent(memory, new IODataComponent("Pages in/out", "packet.pages.swapins", "packet.pages.swapouts"));
225 // theses next two are DataComponents, but not VisibleDataComponents
226 // this is because they hold the value but do NOT display it
227 // just so we ignore the data, because the StorageDataComponent handles it
228 addDataComponent(new StringDataComponent("packet.pages.swapouts", "packet.pages.swapouts"));
229 addDataComponent(new StringDataComponent("packet.memory.total", "packet.memory.total"));
230 addDataComponent(new StringDataComponent("packet.memory.used", "packet.memory.used"));
231 // maybe this one should be used somewhere?
232 addDataComponent(new StringDataComponent("packet.memory.cache", "packet.memory.cache"));
233 addDataComponent(new StringDataComponent("packet.swap.total", "packet.swap.total"));
234 addDataComponent(new StringDataComponent("packet.swap.used", "packet.swap.used"));
235 c.gridy = 8;
236 gridbag.setConstraints(memory, c);
237 _center.add(memory);
238
239 label = new javax.swing.JLabel("--- Network ---", JLabel.CENTER);
240 c.gridy = 9;
241 gridbag.setConstraints(label, c);
242 _center.add(label);
243 c.gridy = 10;
244 gridbag.setConstraints(_net, c);
245 _center.add(_net);
246
247 label = new javax.swing.JLabel("--- Users ---", JLabel.CENTER);
248 c.gridy = 11;
249 gridbag.setConstraints(label, c);
250 _center.add(label);
251
252 JPanel users = new JPanel();
253 users.setLayout(new BoxLayout(users, BoxLayout.Y_AXIS));
254 addVisibleDataComponent(users, new StringDataComponent("Number of users", "packet.users.count"));
255 UsersDataComponent userList = new UsersDataComponent("User List", "packet.users.list");
256 addVisibleDataComponent(users, userList);
257 c.gridy = 12;
258 gridbag.setConstraints(users, c);
259 _center.add(users);
260
261 label = new javax.swing.JLabel("--- Disks ---", JLabel.CENTER);
262 c.gridy = 13;
263 gridbag.setConstraints(label, c);
264 _center.add(label);
265 c.gridy = 14;
266 gridbag.setConstraints(_disks, c);
267 _center.add(_disks);
268 c.gridy = 15;
269 gridbag.setConstraints(_diskio, c);
270 _center.add(_diskio);
271
272 label = new javax.swing.JLabel("--- System Services ---", JLabel.CENTER);
273 c.gridy = 16;
274 gridbag.setConstraints(label, c);
275 _center.add(label);
276 c.gridy = 17;
277 gridbag.setConstraints(_services, c);
278 _center.add(_services);
279
280 // everything else we get is "extra", but we may still want to display it
281 if (_extraData) {
282 label = new javax.swing.JLabel("--- Extra Data ---", JLabel.CENTER);
283 c.gridy = 18;
284 gridbag.setConstraints(label, c);
285 _center.add(label);
286 c.gridy = 19;
287 gridbag.setConstraints(_extra, c);
288 _center.add(_extra);
289 }
290
291 // a bit of a gap, then a banner to advertise the product
292 c.gridy=20;
293 Component spacer = Box.createRigidArea(new Dimension(468, 30));
294 gridbag.setConstraints(spacer,c);
295 _center.add(spacer);
296 c.gridy=21;
297 JLabel image = new JLabel(new ImageIcon(getClass().getResource("/resources/banner3.gif")));
298 gridbag.setConstraints(image,c);
299 _center.add(image);
300 }
301
302 //---PUBLIC METHODS---
303
304 /**
305 * This method takes an XMLPacket containing
306 * information about the host this HostDisplayPanel
307 * is currently displaying. It then updates all of the
308 * components with the new values.
309 *
310 * It also adds a standard StringDataComponent, should
311 * an attribute come up that there are no DataComponents
312 * associated with.
313 *
314 * @param packet the XML packet
315 * @return if the update was sucessful
316 */
317 public boolean updateHost(XMLPacket packet) {
318 // set that everything is ok so far
319 boolean displaySucessful = true;
320
321 // must be a normal data packet, update the display
322 if((packet.getParam("packet.attributes.type")).equals("data")) {
323 displaySucessful = processPacket(packet);
324 _dataTimer.reset();
325 if(_dataTimerThread == null){
326 _dataTimerThread = new Thread(_dataTimer);
327 _dataTimerThread.start();
328 }
329 }
330 return displaySucessful;
331 }
332
333 //---PRIVATE METHODS---
334
335 /**
336 * Process an incoming packet, updates the components.
337 * If extra data is configured to be displayed, it will
338 * create a new StringDataComponent to display the data.
339 *
340 * @param packet the packet to process
341 *
342 * @return if the proceesing was successful
343 */
344 private boolean processPacket(XMLPacket packet) {
345 // iterate over the packets data
346 boolean displaySucessful = true;
347 Set packetSet = packet.getSet();
348 Iterator i = packetSet.iterator();
349 while (i.hasNext()) {
350 String dataKey = (String) i.next();
351
352 // if there are no components looking after this data
353 // create a new StringDataComponent for it
354 if(!_components.containsKey(dataKey)) {
355 // check if its a disk drive, if it is then we need to deal with it
356 if(dataKey.startsWith("packet.disk.p")) {
357 createDiskPanel(dataKey, packet);
358 // check for diskio stats
359 } else if(dataKey.startsWith("packet.diskio.p")) {
360 createDiskIOPanel(dataKey, packet);
361 // check for network stats
362 } else if(dataKey.startsWith("packet.net.p")) {
363 createNetworkPanel(dataKey, packet);
364 // !check for services here! to display
365 } else if(dataKey.startsWith("packet.services.")) {
366 createServicesPanel(dataKey);
367 // otherwise we don't know about it...
368 } else if (_extraData) {
369 addVisibleDataComponent(_extra, new StringDataComponent(dataKey, dataKey));
370 }
371 }
372
373 // try and update the component, if it doesn't like what it gets
374 // warn the user and set that this was an unsucessful display
375 if(_components.containsKey(dataKey)) {
376
377 try {
378 ((DataComponent) _components.get(dataKey)).setValue(packet);
379 } catch (DataFormatException e) {
380 Conient.addMessage("WARNING{host display}: " + e.getMessage());
381 displaySucessful = false;
382 }
383 }
384 }
385 return displaySucessful;
386 }
387
388 /**
389 * Adds a DataComponent to the list of already
390 * known data components. The list is aware of
391 * what packet attributes that a DataComponent
392 * is looking after.
393 *
394 * @param ref the packet attribute that this Component looks after
395 * @param dataComponent the actual DataComponent
396 */
397 private void addDataComponent(DataComponent dataComponent) {
398 _components.put(dataComponent.getPacketAttribute(), dataComponent);
399 }
400
401 /**
402 * Adds a DataComponent to the list of already
403 * known data components. The list is aware of
404 * what packet attributes that a DataComponent
405 * is looking after.
406 *
407 * Used for VISIBLE data components, as they are added to the display.
408 *
409 * @param ref the packet attribute that this Component looks after
410 * @param dataComponent the actual DataComponent
411 */
412 public void addVisibleDataComponent(Container holder, VisibleDataComponent dataComponent) {
413 _components.put(((DataComponent) dataComponent).getPacketAttribute(), (DataComponent) dataComponent);
414 SwingSafeAdd task = new SwingSafeAdd(holder, dataComponent);
415 SwingUtilities.invokeLater(task);
416 }
417
418 /**
419 * Creates the disk components and adds them
420 * do the list of components. It also displays
421 * any relavant component.
422 *
423 * When a packet attribute is new to the system
424 * and when it starts "packet.disk.p" then this
425 * method is called. Thus it then accounts for
426 * all attributes relating to that new disk.
427 *
428 * @param attribute the name of the attribute first encountered
429 * @param packet the XMLPacket the data is being pulled from
430 */
431 private void createDiskPanel(String attribute, XMLPacket packet) {
432 String diskNumber = "";
433
434 // pos is after "packet.disk.p"
435 int pos = 13;
436 while (attribute.charAt(pos) != '.') {
437 diskNumber = diskNumber + attribute.charAt(pos);
438 pos++;
439 }
440 String devAttribute = "packet.disk.p" + diskNumber + ".attributes.name";
441 String mountAttribute = "packet.disk.p" + diskNumber + ".attributes.mount";
442 String totalAttribute = "packet.disk.p" + diskNumber + ".attributes.total";
443
444 // the only visible component
445 String availAttribute = "packet.disk.p" + diskNumber + ".attributes.avail";
446 DiskDataComponent disk = new DiskDataComponent("Disk", availAttribute, totalAttribute, mountAttribute, devAttribute , "Mb", 1024*1024);
447 addVisibleDataComponent(_disks, disk);
448
449 // currently this data isn't useful, so we don't display it
450 // but we add it so that it is forgotten about
451 addDataComponent(new StringDataComponent(devAttribute, devAttribute));
452 addDataComponent(new StringDataComponent(mountAttribute, mountAttribute));
453 addDataComponent(new StringDataComponent(totalAttribute, totalAttribute));
454
455 // add any further bits of data about this disk so we
456 // don't try and do something with them later
457 // -- this is not that tidy ;)
458 Set packetSet = packet.getSet();
459 Iterator i = packetSet.iterator();
460 while (i.hasNext()) {
461 String dataKey = (String) i.next();
462 if(dataKey.startsWith("packet.disk.p" + diskNumber +".") && !_components.containsKey(dataKey)) {
463 addDataComponent(new StringDataComponent(dataKey, dataKey));
464 }
465 }
466 }
467
468 /**
469 * Creates the diskio components and adds them
470 * do the list of components.
471 *
472 * When a packet attribute is new to the system
473 * and when it starts "packet.diskio.p" then this
474 * method is called. Thus it then accounts for
475 * all attributes relating to that new diskio.
476 *
477 * @param attribute the name of the attribute first encountered
478 * @param packet the XMLPacket the data is being pulled from
479 */
480 private void createDiskIOPanel(String attribute, XMLPacket packet) {
481 String diskNumber = "";
482
483 // pos is after "packet.diskio.p"
484 int pos = 15;
485 while (attribute.charAt(pos) != '.') {
486 diskNumber = diskNumber + attribute.charAt(pos);
487 pos++;
488 }
489
490 // grab the attributes
491 String nameAttribute = "packet.diskio.p" + diskNumber + ".attributes.name";
492 String wbytesAttribute = "packet.diskio.p" + diskNumber + ".attributes.wbytes";
493 String rbytesAttribute = "packet.diskio.p" + diskNumber + ".attributes.rbytes";
494
495 // use an IODataComponent to display the diskio
496 IODataComponent diskio = new IODataComponent(packet.getParam(nameAttribute), rbytesAttribute, wbytesAttribute);
497 addVisibleDataComponent(_diskio, diskio);
498
499 // these attributes are also used, so we hold on to them
500 // (as a side note, this way of "holding on" to attributes sucks ;)
501 addDataComponent(new StringDataComponent(nameAttribute, nameAttribute));
502 addDataComponent(new StringDataComponent(wbytesAttribute, wbytesAttribute));
503 }
504
505 /**
506 * Creates the netwrok components and adds them
507 * do the list of components.
508 *
509 * When a packet attribute is new to the system
510 * and when it starts "packet.net.p" then this
511 * method is called. Thus it then accounts for
512 * all attributes relating to that network device.
513 *
514 * @param attribute the name of the attribute first encountered
515 * @param packet the XMLPacket the data is being pulled from
516 */
517 private void createNetworkPanel(String attribute, XMLPacket packet) {
518 String netNumber = "";
519
520 // pos is after "packet.net.p"
521 int pos = 12;
522 while (attribute.charAt(pos) != '.') {
523 netNumber = netNumber + attribute.charAt(pos);
524 pos++;
525 }
526
527 // grab the attributes
528 String nameAttribute = "packet.net.p" + netNumber + ".attributes.name";
529 String txAttribute = "packet.net.p" + netNumber + ".attributes.tx";
530 String rxAttribute = "packet.net.p" + netNumber + ".attributes.rx";
531
532 // use an IODataComponent to display the diskio
533 IODataComponent net = new IODataComponent(packet.getParam(nameAttribute), rxAttribute, txAttribute);
534 addVisibleDataComponent(_net, net);
535
536 // these attributes are also used, so we hold on to them
537 addDataComponent(new StringDataComponent(nameAttribute, nameAttribute));
538 addDataComponent(new StringDataComponent(txAttribute, txAttribute));
539 }
540
541 /**
542 * Creates the servicecheck components and adds them
543 * do the list of components. It also displays
544 * any relavant component.
545 *
546 * When a packet attribute is new to the system
547 * and when it starts "packet.services." then this
548 * method is called. Thus it then accounts for
549 * all attributes relating to that service.
550 *
551 * @param attribute the name of the attribute first encountered
552 */
553 private void createServicesPanel(String attribute) {
554 String serviceType = "";
555
556 // pos is after "packet.services."
557 int pos = 16;
558 while (attribute.charAt(pos) != '.') {
559 serviceType = serviceType + attribute.charAt(pos);
560 pos++;
561 }
562
563 String statusAttribute = "packet.services." + serviceType + ".attributes.status";
564 // we hide this as the service data component uses this attribute
565 addDataComponent(new StringDataComponent(serviceType + " service status", statusAttribute));
566
567 ServiceDataComponent service = new ServiceDataComponent(serviceType, "packet.services." + serviceType + ".attributes.message", statusAttribute);
568 addVisibleDataComponent(_services, service);
569 }
570
571 //---ACCESSOR/MUTATOR METHODS---
572
573 //---ATTRIBUTES---
574
575 /**
576 * The components that we already know about
577 * connected with the attributes they care about
578 * are stored here.
579 */
580 private HashMap _components = new HashMap();
581
582 /**
583 * The north panel, currently used for the platform info button.
584 */
585 private final JPanel _north = new JPanel();
586
587 /**
588 * The centre panel, where all the data is displayed.
589 */
590 private final JPanel _center = new JPanel();
591
592 /**
593 * The countdown timer for normal data packets
594 */
595 private final PacketTimer _dataTimer;
596
597 /**
598 * A place for the data timer thread
599 */
600 private Thread _dataTimerThread = null;
601
602 /**
603 * The hostname this instance is keeping data for
604 */
605 private final String _hostName;
606
607 /**
608 * The disks panel
609 */
610 private final JPanel _disks = new JPanel();
611 {
612 _disks.setLayout(new BoxLayout(_disks, BoxLayout.Y_AXIS));
613 }
614
615 /**
616 * The diskio panel
617 */
618 private final JPanel _diskio = new JPanel();
619 {
620 _diskio.setLayout(new BoxLayout(_diskio, BoxLayout.Y_AXIS));
621 }
622
623 /**
624 * The network panel
625 */
626 private final JPanel _net = new JPanel();
627 {
628 _net.setLayout(new BoxLayout(_net, BoxLayout.Y_AXIS));
629 }
630
631 /**
632 * The extra panel, used to display unknown data in the packet
633 */
634 private final JPanel _extra = new JPanel();
635 {
636 _extra.setLayout(new BoxLayout(_extra, BoxLayout.Y_AXIS));
637 }
638
639 /**
640 * The services panel, currently used to display host service information
641 * from heartbeat packets.
642 */
643 private final JPanel _services = new JPanel();
644 {
645 _services.setLayout(new BoxLayout(_services, BoxLayout.Y_AXIS));
646 }
647
648 /**
649 * Whether we a worrying about "extra" data
650 * by default we don't, but we look in the configuration
651 * in the constructor.
652 */
653 private boolean _extraData = false;
654
655 //---STATIC ATTRIBUTES---
656
657 }