[PD] CPU data to pd WAS: Patch Contest Thread/List

Andrew Faraday jbturgid at hotmail.com
Wed Oct 19 14:15:47 CEST 2011


I'm not finished with it yet, but basically it's about reading and parsing the file /proc/stat to get the load of your cpu(s) and then convert it into real-time data (basically the same data the 'system monitor' uses) and turn that into something standardised for PDers to patch on top of. So you could hear how your computer usage (admittedly including Pd) is affecting cpu load. (inspired by my recent realization that my work computer is actually running 8 cores and this data is viewable as a file in unix).

So far I've got the beginning of a ruby parser for that file.

Does anyone know:
  which files I can poll to get the memory usage and network traffic as numerical figures?
  how I would detect the number of cores in the same way?
  where I can find the cpu cores' capacity (so I can express the data as a proportion of this)?

I suppose the ultimate aim would be an abstraction to autodetect all this and feed clean data to pd.

- Andrew


> Date: Wed, 19 Oct 2011 00:59:40 -0400
> From: matju at artengine.ca
> To: jbturgid at hotmail.com
> CC: thecryoflove at gmail.com; pd-list at iem.at
> Subject: Re: [PD] Patch Contest Thread/List
> 
> Le 2011-10-18 à 23:24:00, Andrew Faraday a écrit :
> 
> > Just I'm working on a ruby/pd patch to get a clean feed of CPU usage in 
> > linux, could be a starting point (I.E. where would people take this 
> > real-time data collection).
> 
> May you elaborate on what this is ?
> 
>   ______________________________________________________________________
> | Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20111019/9cde49b0/attachment-0001.htm>


More information about the Pd-list mailing list