OpenSource! System Information Monitor

embrace Change

System Information Monitor was born with the idea of breaking free from platforms and installers. 4 weeks and a lot of sleepless nights, we have success.

the Prototype

click to launch the prototype


the Product

the Tech

Features

» Monitors System Information

» Supports Windows, Linux, Unix, Solaris

» No Install, Launch from the browser

» 26 Different Skins

» Open Source

APIs Utilized

» Hyperic Sigar

» JFreeChart

» Swing Application Framework

» Substance

» Swing

The heart of the system

The guts of System Monitor lay in concurrency. At any point in time System Monitor is utilizing a thread pool in order to poll information from the operating system. Each of these sources respond at very diferrent rates so the thread pool keeps things flowing in at a near constant rate.

sharing is Caring

the Glorious Code

Because documentation comes first!

Online JavaDocs

Download

System Information Monitor

Just a taste

// only a snippet to protect the eyes

    @Override
    public void update() {
        final int currentCpu = this.cpu;

        Runnable updateData = new Runnable() {

            public void run() {
                chart.setNotify(false);

                LinkedList<LinkedList<Double>> cpuHistory = cpuProcess.getCpuHistory();
                LinkedList<Double> cpu;

                counter = counter.add(BigInteger.ONE);

                if (dataset.getColumnCount() > 0) {
                    dataset.removeColumn(0);
                }

                if (currentCpu == -1) {
                    // Number of CPUs
                    for (int i = 0; i < cpuHistory.size(); i++) {
                        cpu = cpuHistory.get(i);
                        dataset.addValue((Number) cpu.getFirst(), i, counter);
                    }
                } else {
                    if (currentCpu < cpuHistory.size()) {
                        cpu = cpuHistory.get(currentCpu);
                        dataset.addValue((Number) cpu.getFirst(), currentCpu, counter);
                    }
                }

                chart.setNotify(true);
                chart.fireChartChanged();
            }
        };
        SwingUtilities.invokeLater(updateData);
    }

    /**
     * Moves all the data from the CpuProcess to the dataset.  This operation
     * will do a complete replace on the dataset information.
     */
    private void moveData() {
        final int currentCpu = this.cpu;

        Runnable updateData = new Runnable() {

            public void run() {
                chart.setNotify(false);
                dataset.clear();

                LinkedList<LinkedList<Double>> cpuHistory = cpuProcess.getCpuHistory();
                LinkedList<Double> cpu;

                if (currentCpu == -1) {
                    // Number of CPUs
                    for (int i = 0; i < cpuHistory.size(); i++) {
                        cpu = cpuHistory.get(i);

                        BigInteger beforeCount = counter;

                        // Number of datapoints
                        for (int j = 0; j < cpu.size(); counter = counter.add(BigInteger.ONE), j++) {
                            dataset.addValue((Number) cpu.get(j), i, counter);
                        }

                        counter = beforeCount;
                    }
                } else {
                    cpu = cpuHistory.get(currentCpu);

                    BigInteger beforeCount = counter;

                    // Number of datapoints
                    for (int j = 0; j < cpu.size(); counter = counter.add(BigInteger.ONE), j++) {
                        dataset.addValue((Number) cpu.get(j), currentCpu, counter);
                    }

                    counter = beforeCount;
                }

                counter = counter.add(BigInteger.valueOf(cpuHistory.get(0).size()));

                chart.setNotify(true);
                chart.fireChartChanged();
            }
        };
        SwingUtilities.invokeLater(updateData);
    }
}