Parsing NMON data (CSV)

1,056 views
Skip to first unread message

meteorfox

unread,
Feb 26, 2012, 6:33:42 PM2/26/12
to Clojure
Hi,

I'm interested in creating graphs for NMON data which is essentially a
csv file. Which library can you recommend for this kind of task?

Here's a brief sample of the data I need to parse in..

AAA,progname,nmon_x86_64_fedora16
AAA,command,./nmon_x86_64_fedora16 -f -s 30 -c 60
AAA,version,14g
AAA,disks_per_line,150
AAA,max_disks,256,set by -d option
AAA,disks,9,
AAA,host,sandybridge
AAA,user,meteorfox
AAA,OS,Linux,3.2.6-3.fc16.x86_64,#1 SMP Mon Feb 13 20:35:42 UTC
2012,x86_64
AAA,runname,sandybridge
AAA,time,22:18.50
AAA,date,24-FEB-2012
AAA,interval,30
AAA,snapshots,60
AAA,cpus,8
AAA,proc_stat_variables,8
AAA,note0, Warning - use the UNIX sort command to order this file
before loading into a spreadsheet
AAA,note1, The First Column is simply to get the output sorted in the
right order
AAA,note2, The T0001-T9999 column is a snapshot number. To work out
the actual time; see the ZZZ section at the end
CPU001,CPU 1 sandybridge,User%,Sys%,Wait%,Idle%
CPU002,CPU 2 sandybridge,User%,Sys%,Wait%,Idle%
CPU003,CPU 3 sandybridge,User%,Sys%,Wait%,Idle%
CPU004,CPU 4 sandybridge,User%,Sys%,Wait%,Idle%
CPU005,CPU 5 sandybridge,User%,Sys%,Wait%,Idle%
CPU006,CPU 6 sandybridge,User%,Sys%,Wait%,Idle%
CPU007,CPU 7 sandybridge,User%,Sys%,Wait%,Idle%
CPU008,CPU 8 sandybridge,User%,Sys%,Wait%,Idle%
CPU_ALL,CPU Total sandybridge,User%,Sys%,Wait%,Idle%,Busy,CPUs
........

Thanks
Carlos Torres

David Santiago

unread,
Feb 27, 2012, 1:02:37 PM2/27/12
to clo...@googlegroups.com
One library you could use is one I wrote called Clojure-CSV, which you
can find at http://github.com/davidsantiago/clojure-csv. If you have
any questions, feel free to email me or message me on github.

David

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

meteorfox

unread,
Feb 27, 2012, 2:16:18 PM2/27/12
to Clojure
Thanks for the suggestion but I'm already using it to parse it, it's
really simple to use.

What I really meant is, what could be a good library for making graphs
based on sampled data?.

Suppose I have the following

<Time Stamp i>, <Data 1>, <Data 2>, <Data 3>
<Time Stamp i+1>, <Data 1>, <Data 2>, <Data 3>
... etc.


On Feb 27, 1:02 pm, David Santiago <david.santi...@gmail.com> wrote:
> One library you could use is one I wrote called Clojure-CSV, which you
> can find athttp://github.com/davidsantiago/clojure-csv. If you have

Alasdair MacLeod

unread,
Feb 28, 2012, 4:36:04 PM2/28/12
to Clojure
On Feb 27, 7:16 pm, meteorfox <ctorresk8guitar....@gmail.com> wrote:
> What I really meant is, what could be a good library for making graphs
> based on sampled data?.

you could try incanter if you want to stay in the clojure world.

Bill Allen

unread,
Feb 28, 2012, 6:59:55 AM2/28/12
to clo...@googlegroups.com

Use incanter.

Reply all
Reply to author
Forward
0 new messages