We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › System/Activity Monitor with Processing
Page Index Toggle Pages: 1
System/Activity Monitor with Processing (Read 742 times)
System/Activity Monitor with Processing
Nov 12th, 2009, 9:07am
 
I was wondering if anyone has heard of or knows of a Processing library that can monitor different computer specs such as cpu load, memory usage, disk usage, etc. Hoping to use this data to create a visualization in Processing. Thanks!
Re: System/Activity Monitor with Processing
Reply #1 - Jan 29th, 2010, 4:56pm
 
have a look at Sigar API ( support.hyperic.com/display/SIGAR/Home )

it's not a processing library but tried adding it like one and seems to work

tried some quick code:

Code:
import org.hyperic.jni.*;
import org.hyperic.sigar.*;

Sigar sigar;
Mem mem;

void setup(){
 sigar = new Sigar();
 mem = new Mem();
 size(1024,768);
 noLoop();
}

void draw() {

}

void mousePressed() {
 try {
   mem = sigar.getMem();
 }
 catch (SigarException se) {
   se.printStackTrace();
 }

 println( "Total system Memory: "+ sigar.formatSize( mem.getTotal() ) ); // use formatSize for human readable string
 println( "Used: "+ mem.getUsed() ); // in raw long format
 println( mem.toString() );  // or in one string available/used/free

}
Page Index Toggle Pages: 1